-
-
Notifications
You must be signed in to change notification settings - Fork 192
languages: inherit lspconfig options from language options #643
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
Conversation
0a00dd5 to
d827ac8
Compare
20deb1a to
c670c27
Compare
| { | ||
| offsetEncoding = { "utf-8", "utf-16" }, | ||
| textDocument = { | ||
| completion = { | ||
| editsNearCursor = true | ||
| } | ||
| } |
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.
this doesn't extend default capabilities does it? should do so otherwise snippets/other stuff won't work
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.
This is the default value in lspconfig.
The situation is a bit annoying; since option values are converted verbatim using variables is out of the question, lest they turned into the following:
capabilities = local ccap = capabilities
capabilities = ccap.extend(Bad representation, but the point is that it has to be inline.)
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.
capabilities = vim.tbl_deep_extend("force", capabilities, { offsetEncoding = { "utf-8", "utf-16" }, textDocument = { completion = { editsNearCursor = true } } })Maybe like this? lmao
02ee4cc to
bc978c4
Compare
6e6c9dd to
00ef9a6
Compare
5b69869 to
077a27d
Compare
077a27d to
0376d8d
Compare
Bumps [beatlabs/delete-old-branches-action](https://github.com/beatlabs/delete-old-branches-action) from 0.0.10 to 0.0.11. - [Release notes](https://github.com/beatlabs/delete-old-branches-action/releases) - [Commits](beatlabs/delete-old-branches-action@v0.0.10...v0.0.11) --- updated-dependencies: - dependency-name: beatlabs/delete-old-branches-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* eslint_d: added conditions for launching eslint_d * eslint_d: documented changes to docs/release-notes/rl-0.8.md --------- Co-authored-by: raf <[email protected]>
Add missing word in sentence: `let`.
| vim.lsp.lspconfig = { | ||
| enable = true; | ||
| sources.asm-lsp = '' | ||
| lspconfig.${toLuaObject cfg.lsp.server}.setup(${toLuaObject cfg.lsp.options}) | ||
| ''; | ||
| }; |
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.
Could something like this be handled directlly in the lspconfig module? Example from personal configuration: https://github.com/LilleAila/nvf-config/blob/main/config/languages/lspconfig.nix
, rather than having raw lua code in the modules themselves?
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.
That is what I have in mind, instead of making LSP setups a part of language modules I intend to create a lower-level API to configure LSPs, possibly as vim.lsp or something similar. I would appreciate your feedback or/and proposals here
| cmd = | ||
| if isList cfg.lsp.package | ||
| then expToLua cfg.lsp.package | ||
| else ["${getExe cfg.lsp.package}"]; |
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.
Would it be possible to make this be possibly null? When cmd is unset, it picks the LSP directly from PATH, which allows for installing them directly in devshells, but in this configuration, it is necessary to specify it.
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.
Yes, that's a good idea. The current idea was to set a ["lsp-cmd"] to execute from PATH, but null might work if we filter those.
EDIT: turns out nvim supports on_attach natively with this I think we can get rid of lspconfig for configuring LSPs, we still keep lspconfig for default server configs, but we don't use their API anymore (oh my god I can already feel the amount of plugins breakages because of this) |
|
Is there anything i can do to help move this along? I would love to have this configurability in my config |
I should've closed this PR, as it's superseded by #801 in its entirety. The new |
|
✅ Preview has been deleted successfully! |
Converts all language modules to a newer, more robust
lsp.optionsformat that allows seamless overrides. This should be considered the first step of the grand language rework, where other options (diagnostics, formatters) will follow.Adds
lib.lspOptionsto expose an extensible attribute set to provide the option table for eachLSP server template via lspconfig.
Converted languages: