-
Notifications
You must be signed in to change notification settings - Fork 149
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
Maybe refactor features #316
Comments
Some thoughts here: On the implementation front: Anything that starts splitting up the (multiple) god objects, and makes it easier to externally build and test new/alternate features is good. However, so long as all the features it can support are hard-coded, this will only take us so far, as it will not be simple to dynamically extend with one of the 100 messages we don't support yet. So being able to also claim access to some specific messages/responses may be important. I've started down this road on the kernel PR, as having to update message names in 3/4 places is not going to scale, long term, and I think it's folly to try to "protect" features developers from LSP. On the architecture front: Absolutely, each feature should be a plugin, and should document/expose itself with an interface which can be replaced, so that other interfaces, and features, can rely on features. Where possible, we should go further, such as with diagnostics, and split out the current ui panel to just have to listen to what the Feature is putting out. So...
On the packaging front: It is not strictly required to make each plugin a separate package... a single Some deployment scenarios:
1 is mutually exclusive with 3, probably. |
Thanks for sharing thoughts, all makes sense!
Right!
Done!
Kind of done, but not really the way you would expect I guess. For now, dependencies are supported via accessing the sibling-features from a map fed to the feature by
So say we have token
Yes, I'm for (1) for the default plugins. A thing to consider is how do we disable features from the GUI (say the user does not want the diagnostics). Disabling from the command line (i.e. the actual plugin/npm package) is not strictly needed for the immediate use-case of kite integration which can just request to disable our completer in favours of theirs (via |
Closing as the refactor is done and we are tracking the architecture/source organization elsewhere. |
Feature = LSP functionality, e.g. completion, jumper, diagnostics.
Make it possible to split up the features and install the extra features.
What are you trying to do?
Expose a token
LSPFeatureManager
which will be used to register the features. It would have a register method:The new feature interface:
each feature would then be an extension:
To consider:
How is it done today, and what are the limits of current practice?
What is new in your approach and why do you think it will be successful?
The text was updated successfully, but these errors were encountered: