| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
The current version of the config will let you do formatting manually
`:lua vim.lsp.buf.format()` but the lsp doesn't have capabilities
registered correctly so if you use auto formatting like outlined in
[help pages](https://neovim.io/doc/user/lsp.html#lsp-attach)
if not client:supports_method('textDocument/willSaveWaitUntil')
and client:supports_method('textDocument/formatting') then
vim.api.nvim_create_autocmd('BufWritePre', {
group = vim.api.nvim_create_augroup('my.lsp', {clear=false}),
buffer = args.buf,
callback = function()
vim.lsp.buf.format({ bufnr = args.buf, id = client.id, timeout_ms = 1000 })
end,
})
end
, it won't enable for the yaml lsp because
`client:supports_method('textDocument/formatting')` returns false.
Solution:
The `on_init` hook, while hacky, will mark the capability as true.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Faking capabilities isn't necessary to enable formatting support. It's a
dynamically registered capability that yamlls announces whenever yaml
formatting is enabled in settings, which it isn't by default.
See
https://github.com/redhat-developer/yaml-language-server/blob/3821411ee8c92e5b7e5ca88f84ab443ae3b2791a/src/yamlServerInit.ts#L128
https://github.com/redhat-developer/yaml-language-server/blob/3821411ee8c92e5b7e5ca88f84ab443ae3b2791a/src/languageserver/handlers/settingsHandlers.ts#L159-L174
Fixes: 63a016437e44 ("feat(yamlls): document formatting support #4003")
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
this adds config for starting helm_ls and yamlls with the new filetype
yaml.helm-values that will be added to the neovim helm_ls extension by
https://github.com/qvalentin/helm-ls.nvim/pull/8
Files of this type should have both yamlls and helm-ls running.
This is required because helm-ls now supports editing values.yaml files
but should only be active for certain yaml files.
|
| | |
|
| |
|
|
|
| |
- brief should live at the top of each file
- fix indentation for some docs
|
| |
|
|
|
|
|
|
| |
Problem:
Since configs now live in `lsp/`, the docgen needs to be updated.
Solution:
Read the configs from `lsp/`. Parse the `@brief` docstring to get the
docs.
|
|
|
Problem:
Nvim 0.11 has vim.lsp.config, which mostly replaces the legacy
nvim-lspconfig "framework".
Solution:
Migrate all configs to `lsp/*` variants. The old configs in
`lua/lspconfig/` are "frozen".
The new configs include these changes:
- `commands` field became raw calls to
`vim.api.nvim_buf_create_user_command` inside `on_attach`.
- `root_dir` became:
- `root_markers` whenever the file list was simple didn't need to mach `*`
- if the logic was complicated, or needed to match something like
'\*.c', it was defined as a vim.lsp.Config `root_dir` callback.
- `on_config_change` became `before_init`. I don't actually know if this
is the correct approach, but looking around the documentation of
`nvim-lspconfig` a saw that it was defined as the function that gets
called as soon as the config have `root_dir`, and so I thought
`before_init` might be the closest alternative.
- `docs.description` became a luadoc `@brief` docstring.
- `single_file_support = false`?
Co-authored-by: Aliou Diallo <aliou@users.noreply.github.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
|