Update LSP Config to enable Helm chart syntax highlighting

This commit is contained in:
Daniel McKnight 2025-06-26 11:42:47 -07:00
parent 4cb5bb7608
commit 038e63d813

View file

@ -1,122 +1,140 @@
return { return {
{ {
"mason-org/mason.nvim", "mason-org/mason.nvim",
tag = "v1.11.0", tag = "v1.11.0",
config = function() config = function()
require("mason").setup({}) require("mason").setup({})
end, end,
}, },
{ {
"WhoIsSethDaniel/mason-tool-installer.nvim", "WhoIsSethDaniel/mason-tool-installer.nvim",
config = function() config = function()
require("mason-tool-installer").setup({ require("mason-tool-installer").setup({
ensure_installed = { ensure_installed = {
"stylua", "stylua",
"mdformat", "mdformat",
"hadolint", "hadolint",
"yamllint", "yamllint",
"gh-actions-language-server", "gh-actions-language-server",
"ansible-language-server", "ansible-language-server",
"ansible-lint", "ansible-lint",
}, },
}) })
end, end,
}, },
{ {
"mason-org/mason-lspconfig.nvim", "mason-org/mason-lspconfig.nvim",
tag = "v1.32.0", tag = "v1.32.0",
config = function() config = function()
require("mason-lspconfig").setup({ require("mason-lspconfig").setup({
ensure_installed = { ensure_installed = {
"lua_ls", "lua_ls",
"bashls", "bashls",
"helm_ls", "helm_ls",
"jsonls", "jsonls",
"nginx_language_server", "nginx_language_server",
"basedpyright", "basedpyright",
"ruff", "ruff",
"yamlls", "yamlls",
}, },
}) })
end, end,
}, },
{ {
"nvimtools/none-ls.nvim", "nvimtools/none-ls.nvim",
config = function() config = function()
local null_ls = require("null-ls") local null_ls = require("null-ls")
null_ls.setup({ null_ls.setup({
sources = { sources = {
null_ls.builtins.formatting.stylua, null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.mdformat, null_ls.builtins.formatting.mdformat,
null_ls.builtins.diagnostics.hadolint, null_ls.builtins.diagnostics.hadolint,
null_ls.builtins.diagnostics.yamllint.with({ null_ls.builtins.diagnostics.yamllint.with({
extra_args = { "-d", "rules:\n document-start: disable" }, extra_args = { "-d", "rules:\n document-start: disable" },
}), }),
}, },
}) })
vim.keymap.set("n", "<leader>af", vim.lsp.buf.format, { desc = "Auto-Format File" }) vim.keymap.set("n", "<leader>af", vim.lsp.buf.format, { desc = "Auto-Format File" })
end, end,
}, },
{ {
"neovim/nvim-lspconfig", "qvalentin/helm-ls.nvim",
tag = "v1.8.0", ft = "helm",
lazy = true, opts = {
event = { "BufReadPost", "BufNewFile" }, conceal_templates = { enabled = true },
dependencies = { indent_hints = { enabled = true },
"mason-org/mason.nvim", },
"mason-org/mason-lspconfig.nvim", { "neovim/nvim-lspconfig", event = { "BufReadPre", "BufNewFile", "BufEnter" } },
"WhoIsSethDaniel/mason-tool-installer.nvim", },
}, {
config = function() "neovim/nvim-lspconfig",
local capabilities = require("cmp_nvim_lsp").default_capabilities() tag = "v1.8.0",
local lspconfig = require("lspconfig") lazy = true,
lspconfig.ts_ls.setup({ event = { "BufReadPost", "BufNewFile" },
capabilities = capabilities, dependencies = {
}) "mason-org/mason.nvim",
lspconfig.lua_ls.setup({ capabilities = capabilities }) "mason-org/mason-lspconfig.nvim",
lspconfig.bashls.setup({ "WhoIsSethDaniel/mason-tool-installer.nvim",
capabilities = capabilities, },
cmd = { "bash-language-server", "start" }, config = function()
filetypes = { "sh", "bash" }, local capabilities = require("cmp_nvim_lsp").default_capabilities()
}) local lspconfig = require("lspconfig")
lspconfig.gh_actions_ls.setup({ capabilities = capabilities }) lspconfig.ts_ls.setup({
lspconfig.helm_ls.setup({ capabilities = capabilities,
capabilities = capabilities, })
filetypes = { "tpl", "helm"}, lspconfig.lua_ls.setup({ capabilities = capabilities })
}) lspconfig.bashls.setup({
lspconfig.jsonls.setup({ capabilities = capabilities }) capabilities = capabilities,
lspconfig.basedpyright.setup({ cmd = { "bash-language-server", "start" },
capabilities = capabilities, filetypes = { "sh", "bash" },
settings = { })
basedpyright = { lspconfig.gh_actions_ls.setup({ capabilities = capabilities })
analysis = { lspconfig.helm_ls.setup({
typeCheckingMode = "off", capabilities = capabilities,
diagnosticSeverityOverrides = { -- filetypes = { "tpl", "helm" },
reportUnusedImport = false, settings = {
reportUnusedVariable = false, ["helm_ls"] = {
}, yamlls = {
}, path = "yaml-language-server",
}, },
}, },
}) },
lspconfig.nginx_language_server.setup({ capabilities = capabilities }) })
lspconfig.ruff.setup({ lspconfig.jsonls.setup({ capabilities = capabilities })
capabilities = capabilities, lspconfig.basedpyright.setup({
init_options = { capabilities = capabilities,
settings = { settings = {
lineLength = 79, basedpyright = {
}, analysis = {
}, typeCheckingMode = "off",
}) diagnosticSeverityOverrides = {
lspconfig.yamlls.setup({ capabilities = capabilities }) reportUnusedImport = false,
lspconfig.ansiblels.setup({ capabilities = capabilities }) reportUnusedVariable = false,
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" }) },
vim.keymap.set("n", "<leader>cr", vim.lsp.buf.rename, { desc = "Refactor Name" }) },
vim.keymap.set("n", "<leader>vr", vim.lsp.buf.references, { desc = "View References" }) })
vim.keymap.set("n", "<leader>pp", vim.diagnostic.goto_prev, { desc = "Previous Issue" }) lspconfig.nginx_language_server.setup({ capabilities = capabilities })
vim.keymap.set("n", "<leader>pn", vim.diagnostic.goto_next, { desc = "Next Issue" }) lspconfig.ruff.setup({
end, capabilities = capabilities,
}, init_options = {
settings = {
lineLength = 79,
},
},
})
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" })
vim.keymap.set("n", "<leader>cr", vim.lsp.buf.rename, { desc = "Refactor Name" })
vim.keymap.set("n", "<leader>vr", vim.lsp.buf.references, { desc = "View References" })
vim.keymap.set("n", "<leader>pp", vim.diagnostic.goto_prev, { desc = "Previous Issue" })
vim.keymap.set("n", "<leader>pn", vim.diagnostic.goto_next, { desc = "Next Issue" })
end,
},
} }