-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Commands interface #1937
Comments
I very much like and need this specific functionality, but I can understand wanting to keep the core clean. If anything, maybe we can come up with a plan to move this to a community plugin like https://github.com/p00f/clangd_extensions.nvim |
There are extensions for other LSP servers, having a separate plugin for some additional commands doesn't sound very convenient. Many people complain about the complexity of nvim-lspconfig, so forcing them to install additional plugins to get basic functionality, like And I don't understand how the commands feature can be a maintenance issue. It's just a few lines of code and many people maintain the language servers they use. If a command breaks - the people who use it will fix it. Basically, the configurations in this plugin are maintained in exactly this way. |
Multiplied by 100 or more--on top of the other activity already in this repo, which is, again, strictly a set of quickstart configs, not a factory for all things that could possibly be useful for each random langserver. I would like to know if we can auto-complete server extensions instead. That's worth having in core. |
Users maintain language servers they add. Why it becomes a problem to maintain 1-2 commands (if they exists, most servers don't have it) for the language server they use? How it different from maintaining the language server configuration?
Commands was always here. Why break people configs? Is there any maintenance problem with this feature? I would consider commands as a part of server configuration (as it was in VSCode when you installing a plugin for specific language).
Not sure how it could work. |
Just noticed something (added 8 months ago: ba90dc2) in CONTRIBUTING.md: https://github.com/neovim/nvim-lspconfig/blob/d57b24c3f46c92cf7e1d93919678565ae49e1e23/CONTRIBUTING.md#scope-of-lspconfig
But the example given later in CONTRIBUTING.md mentions |
closed duplicate #1750 . I will implement it later. |
@glepnir how it is this related? It's a different issue. |
that can support custom command in server settings then you can do it right? |
The issue you mentioned is about custom command handlers, if I understand correctly. This issue is about Neovim commands specific to a server. For example, rust_analyzer (see below in |
not a command handler. you can custom a command in server setting.then you can use this command in neovim cmdline. |
This is how it currently works as far as I know. |
maybe I understand wrong you want the comand clangd switch source header in default? i am on mobile phone.now.sry |
No, I like how commands works right now. |
Oh I think I understand. sorry for closed it before. I've been away for a while due to physical problems. Missed some progress on lsp in neovim. I've been trying to look at these codes recently. Check out the roadmap with lspconfig provides basic settings for all servers. And do some actions around the lsp service such as At present our main work is to promote the progress of lsp on the neovim core. Development of some features. Currently known backward features such as inlay hint smantictoken are not implemented yet. These will have higher priority. cc @bennypowers #2089 also do same thing , explain in there. |
Yes, there are a lot of configs in the repo... But aren't servers loading lazily?
Of course, I can and have already added the commands I need to my config. But if I understand correctly, then the API for such a command is planned to be removed. So I won't be able to define my custom commands in my config either :( |
API can be open. I'll check if it's missing. I'll re-add it if I can. Yes, most people use lspconfig as lazyload use autocmd event. |
I'm thinking we might want some sort of "sub-command" entrypoint so that langserver-specific commands can be discovered. E.g.
|
I will think about this then make a pr for it . |
Note: this would be a core |
Tracked in Nvim core at neovim/neovim#28329 |
Clarification: lspconfig is intended to be pure "data"; and the builtin Nvim LSP client ( I've been thinking about this more, and have relaxed on the idea of putting command wrappers in lspconfig. But we need to make sure that those are minimal, and we don't end up building bespoke plugins for each config. Tracking issues:
Reopening this issue just for visbility. |
We currently have API which allows to set language server specific commands. Example from clangd:
nvim-lspconfig/lua/lspconfig/server_configurations/clangd.lua
Lines 52 to 59 in c5dae15
But @justinmk suggested to remove them.
I personally find them useful, especially
ClangdSwitchSourceHeader
. I don't think it's good for users to copy them from other people's configs. And having a separate plugin for a few lines of code forClangdSwitchSourceHeader
is also weird. So I think having them here is the right place.So it's more like a feature keep request :)
The text was updated successfully, but these errors were encountered: