-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CoC configuration #76
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,6 +178,33 @@ settings = { | |
See [examples/nvim/init.lua](https://github.com/mrjosh/helm-ls/blob/master/examples/nvim/init.lua) for an | ||
complete example, which also includes yaml-language-server. | ||
|
||
#### Neovim + CoC plugin | ||
|
||
Using the [coc.nvim](https://github.com/neoclide/coc.nvim) plugin, you don't need the previous configuration in lua. Coc will handle the configuration instead. | ||
|
||
You only need to configure the use of `helm_ls` in the "`langageserver`" section of your `coc-settings.json` file. | ||
|
||
Open Neovim and type the command `:CocConfig` to access the configuration file. Find the `langageserver` section, or create one if necessary, and add this configuration: | ||
|
||
|
||
```json | ||
"languageserver": { | ||
"helm": { | ||
"command": "helm_ls", | ||
"args": ["serve"], | ||
"filetypes": ["yaml", "helm", "helmfile"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Im not sure about having yaml here. How did you setup the filetypes helm and helmfile in your config? With towolf/vim-helm? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes right. Maybe I can remove yaml from the list. I will do it today. |
||
"rootPatterns": ["Chart.yaml"] | ||
} | ||
}, | ||
``` | ||
|
||
Note that you can install `helm_ls` in a directory that is not in your PATH, and then specify the full path to the executable in the `command` field. | ||
|
||
Save the configuration file and then, either: | ||
- Reastart neovim | ||
- Type `:CocRestart` in neovim to restart the language server. | ||
|
||
Open a Helm file, and you should be able to see errors, documentation, completion, etc. | ||
|
||
### VSCode | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should restructure the readme to something like:
Neovim config
explain filetypes etc (anything that must be done for both nvim-lspconfig and coc)
nvim-lspconfig
explain setup with nvim-lspconfig
coc
explain setup with coc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any update on this?