Skip to content

Commit

Permalink
Update nvim lspconfig example
Browse files Browse the repository at this point in the history
  • Loading branch information
qvalentin committed Nov 12, 2023
1 parent 9d50cb7 commit 5ecc59f
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,16 @@ chmod +x /usr/local/bin/helm_ls

## nvim-lspconfig setup
```lua
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"},
settings = {
['helm-ls'] = {
yamlls = {
path = "yaml-language-server",
}
}
}
}
```

Expand Down

0 comments on commit 5ecc59f

Please sign in to comment.