From b7035c2140c1ce0342291b1725114ae91b8183f4 Mon Sep 17 00:00:00 2001 From: Prajakt Shastry Date: Thu, 28 Dec 2023 22:25:20 -0500 Subject: [PATCH] Moved lsp helm ls config --- init.lua | 21 --------------------- lua/custom/lsp.lua | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/init.lua b/init.lua index f497d935..676fa0e4 100644 --- a/init.lua +++ b/init.lua @@ -269,26 +269,5 @@ require('litee.gh').setup({ } }) -local configs = require('lspconfig.configs') -local lspconfig = require('lspconfig') -local util = require('lspconfig.util') - -if not configs.helm_ls then - configs.helm_ls = { - default_config = { - cmd = { "helm_ls", "serve" }, - filetypes = { 'helm' }, - root_dir = function(fname) - return util.root_pattern('Chart.yaml')(fname) - end, - }, - } -end - -lspconfig.helm_ls.setup { - filetypes = { "helm" }, - cmd = { "helm_ls", "serve" }, -} - -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/lsp.lua b/lua/custom/lsp.lua index 13144677..9e184b0c 100644 --- a/lua/custom/lsp.lua +++ b/lua/custom/lsp.lua @@ -88,3 +88,23 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, { pattern = { "*.tf", "*.tfvars" }, }) +local configs = require('lspconfig.configs') +local lspconfig = require('lspconfig') +local util = require('lspconfig.util') + +if not configs.helm_ls then + configs.helm_ls = { + default_config = { + cmd = { "helm_ls", "serve" }, + filetypes = { 'helm' }, + root_dir = function(fname) + return util.root_pattern('Chart.yaml')(fname) + end, + }, + } +end + +lspconfig.helm_ls.setup { + filetypes = { "helm" }, + cmd = { "helm_ls", "serve" }, +}