aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/yamlls.lua
Commit message (Collapse)AuthorAgeFilesLines
* feat(yamlls): force documentFormattingProvider=true #4016Christopher Johnstone2025-08-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* fix: separate type annotation from `@brief` docstring #4017Igor Lacerda2025-08-191-0/+1
|
* refactor(yamlls): non-hacky way to enable formatting #4012Tomáš Janoušek2025-08-191-4/+2
| | | | | | | | | | | 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")
* chore: add type annotation for configsIgor2025-08-181-0/+1
|
* feat(yamlls): document formatting support #4003Christopher Johnstone2025-08-171-0/+4
|
* feat(helm_ls,yamlls): support custom filetype for helm-ls #3881qvalentin2025-06-011-1/+1
| | | | | | | | | 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.
* docs: cleanup #3791Justin M. Keyes2025-04-261-2/+2
|
* docs: cleanupJustin M. Keyes2025-04-181-58/+58
| | | | | - brief should live at the top of each file - fix indentation for some docs
* fix(docs): docgen.lua reads from `lua/*.lua` #3708Justin M. Keyes2025-04-121-1/+1
| | | | | | | | 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.
* feat: migrate to vim.lsp.config #3659Lorenzo Bellina2025-04-121-0/+69
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>