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,15 +1,15 @@
return {
-- {
-- "L3MON4D3/LuaSnip",
-- dependencies = {
-- "saadparwaiz1/cmp_luasnip", -- Snippets source for nvim-cmp
-- "rafamadriz/friendly-snippets", -- Collection of snippets
-- },
-- },
{
"L3MON4D3/LuaSnip",
-- dependencies = {
-- "saadparwaiz1/cmp_luasnip", -- Snippets source for nvim-cmp
-- "rafamadriz/friendly-snippets", -- Collection of snippets
-- },
},
{
"hrsh7th/nvim-cmp",
config = function()
-- require("luasnip.loaders.from_vscode").lazy_load() -- Load snippets from friendly-snippets
-- require("luasnip.loaders.from_vscode").lazy_load() -- Load snippets from friendly-snippets
local cmp = require("cmp")
cmp.setup({

View file

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