Helm ls is switching working directory
TrayserCassa opened this issue · comments
Hey,
first of all, thank you for the lang server, this is really helpful if you start on a new helm Project.
Improvement
Setting the root_dir of the lang server to util.find_git_ancestor
as in the yamlls to prevent switching of the working directory.
Reason
As my helm chart is a part of the operator and will be generated by a makefile it's kind of getting annoying that the working directory is changing if I check the output of the templates.
Information
I searched in the code and also some other references and found out the some lang server let's you overwrite this. Is this also doable for helm-ls? Or have I overseen something?
Hi, this is configured in the nvim-lspconfig repo: https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/helm_ls.lua#L15
But you should be able to easily overwrite it in your nvim config with something like this:
-- setup helm-ls
lspconfig.helm_ls.setup {
root_dir = util.find_git_ancestor,
settings = {
['helm-ls'] = {
yamlls = {
path = "yaml-language-server",
}
}
}
}