Install luasnip for LSP support

Install and configure LSP for helm and ansible
This commit is contained in:
Daniel McKnight 2025-06-15 20:37:59 -07:00
parent b8772ae9b4
commit b9d65bd05a
2 changed files with 50 additions and 44 deletions

View file

@ -1,11 +1,11 @@
return { return {
-- { {
-- "L3MON4D3/LuaSnip", "L3MON4D3/LuaSnip",
-- dependencies = { -- dependencies = {
-- "saadparwaiz1/cmp_luasnip", -- Snippets source for nvim-cmp -- "saadparwaiz1/cmp_luasnip", -- Snippets source for nvim-cmp
-- "rafamadriz/friendly-snippets", -- Collection of snippets -- "rafamadriz/friendly-snippets", -- Collection of snippets
-- }, -- },
-- }, },
{ {
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
config = function() config = function()

View file

@ -16,6 +16,8 @@ return {
"hadolint", "hadolint",
"yamllint", "yamllint",
"gh-actions-language-server", "gh-actions-language-server",
"ansible-language-server",
"ansible-lint",
}, },
}) })
end, end,
@ -28,7 +30,7 @@ return {
ensure_installed = { ensure_installed = {
"lua_ls", "lua_ls",
"bashls", "bashls",
--"helm_ls", "helm_ls",
"jsonls", "jsonls",
"nginx_language_server", "nginx_language_server",
"basedpyright", "basedpyright",
@ -78,7 +80,10 @@ return {
filetypes = { "sh", "bash" }, filetypes = { "sh", "bash" },
}) })
lspconfig.gh_actions_ls.setup({ capabilities = capabilities }) lspconfig.gh_actions_ls.setup({ capabilities = capabilities })
-- lspconfig.helm_ls.setup({ capabilities = capabilities }) lspconfig.helm_ls.setup({
capabilities = capabilities,
filetypes = { "tpl", "helm"},
})
lspconfig.jsonls.setup({ capabilities = capabilities }) lspconfig.jsonls.setup({ capabilities = capabilities })
lspconfig.basedpyright.setup({ lspconfig.basedpyright.setup({
capabilities = capabilities, capabilities = capabilities,
@ -104,6 +109,7 @@ return {
}, },
}) })
lspconfig.yamlls.setup({ capabilities = capabilities }) lspconfig.yamlls.setup({ capabilities = capabilities })
lspconfig.ansiblels.setup({ capabilities = capabilities })
vim.keymap.set("n", "<leader>vd", vim.lsp.buf.hover, { desc = "View Docstring" }) vim.keymap.set("n", "<leader>vd", vim.lsp.buf.hover, { desc = "View Docstring" })
vim.keymap.set("n", "<leader>gt", vim.lsp.buf.definition, { desc = "Go To Definition" }) vim.keymap.set("n", "<leader>gt", vim.lsp.buf.definition, { desc = "Go To Definition" })
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "Show Code Actions" }) vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "Show Code Actions" })