Replies: 3 comments 2 replies
|
See #230 for a more extreme idea inspired by this question. |
0 replies
|
This seems like a good idea. Took me a good 30 minutes to wrap my head around dynamic registration. Just so we're on the same page, can you give me an example of a use case for this? Further, what parts of the none-ls codebase would have to change? I'm guessing we have some real-world servers we could parrot the dynamic code from? |
0 replies
|
Caveat: I'm not entirely sure I have my head wrapped around what none-ls is doing, but I believe the idea is for it to only advertise itself as capable of certain things (formatting, for example), if there's a none-ls builtin enabled that knows how to format the given file. |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
See
none-ls.nvim/lua/null-ls/client.lua
Lines 78 to 84 in caf8556
IIUC, we're monkeypatching
supports_methodso we can dynamically respond to capabilities (as documented here). This works, but feels brittle to me (we recently had to change this to a class method).It seems to me that we could we rid of this monkeypatching if we instead leveraged LSP's support for dynamic capabilities. See:
Perhaps we aren't doing that just because none-ls predates this functionality? Is there some other reason not to use this?
All reactions