-
-
Notifications
You must be signed in to change notification settings - Fork 890
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
Multi LSP Server support #469
Conversation
|
Can Thanks in advance. |
|
@FirstLoveLife I will have to take a look what is causing that issue. For the record, I am using |
c87df9c
to
77a00e9
Compare
77a00e9
to
0c61899
Compare
|
I still haven't examined all of this, unfortunately. Thanks for submitting this, I'll be sure to have a complete review ready by next week. |
|
@vibhavp thanks, it still not 100% ready, some parts are missing, I have posted it only for reviewing the general idea. I do a PR for |
0c61899
to
845fe63
Compare
845fe63
to
dca7f07
Compare
- contains the changes needed so `company-lsp` work against emacs-lsp/lsp-mode#469
- contains the changes needed so `company-lsp` work against emacs-lsp/lsp-mode#469 Do not merge until emacs-lsp/lsp-mode#469 is in.
- contains the changes needed so `lsp-ui` work against emacs-lsp/lsp-mode#469 Do not merge until emacs-lsp/lsp-mode#469 is in.
The packages like `lsp-ui` and `company-lsp` do use some internal `lsp-mode` functions. This CL defines them so then can be implmeneted by `lsp.el` (see emacs-lsp#469) This will allow `lsp-ui` and `company-lsp` to work aganst both `lsp.el` and `lsp-mode.el`.
dca7f07
to
1a6f790
Compare
1a6f790
to
3f88121
Compare
|
Since merging |
|
I will try to do that. Not sure whether this is going to result in better diff. |
3f88121
to
2e2d2f4
Compare
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.
If this merges the existing lsp-*.el files, LG
The packages like `lsp-ui` and `company-lsp` do use some internal `lsp-mode` functions. This CL defines them so then can be implmeneted by `lsp.el` (see #469) This will allow `lsp-ui` and `company-lsp` to work aganst both `lsp.el` and `lsp-mode.el`.
2e2d2f4
to
d71f1e0
Compare
- contains the changes needed so `company-lsp` work against emacs-lsp/lsp-mode#469
Fixes emacs-lsp#462 emacs-lsp#444 emacs-lsp#424 emacs-lsp#419 emacs-lsp#392 emacs-lsp#390 emacs-lsp#376 emacs-lsp#360 emacs-lsp#359 emacs-lsp#340 emacs-lsp#335 emacs-lsp#333 emacs-lsp#285 emacs-lsp#280 emacs-lsp#229 Fixes emacs-lsp#225 emacs-lsp#153 emacs-lsp#111 emacs-lsp#117 emacs-lsp#140 emacs-lsp#77 Higher level goals: * Allow multiple servers to work in one project and in one file * Make finding of project roots easier and more explicit for the users. * Removed all synchronous calls from the server startup. * Improved hadling of status messages. * Implemented workspace folders support as a first class citisen instead of being a patch in the existing configuration. * Simplified the code as much as possible The following things are implemented: 1. Moved `lsp-mode` related code into single file. Now clients should either require `lsp-mode` or `lsp`. After this CL `lsp-mode.el` and `lsp.el` extesions like `ccls` and `lsp-ui` will be able to work against either of these. `lsp-mode` will be used by default and if you want to use the new `lsp.el` you should do `(require 'lsp)` before loading lsp-mode. 2. Introduced `lsp-session` which will be resposible for handling project session configuration like: * What currently imported projects. * What server are running and the folders that are associated with the session. * What folders are ignored and wont be used to initialize a project in it. The session is persisted and automatically loaded the first time user calls `lsp` 3. Introduced `lsp-language-id-configuration` which will hold the configuration "language" -> emacs major mode. This map is used to render eldoc information and also to determine the language id when sending various notifications to the server. 4. Restructored `lsp--client` by removing the runtime related stuff (like last-id) so it can be used as a template for registration. This will simplify the way lsp client registration and it will make easier to add new functionality 5. lsp-ui and company-lsp should be adapted as well. I will prepare separate CLs. 6. Implemented frontend for reviewing what servers are running, which buffers are managed, and so on the method have replaced the existing `lsp-capabilities` method. 7. Reworked the modeline so it can provide info for the servers currently handling current file. 8. Moved snippet configuration into `lsp-mode` from `company-lsp` since snippet support will be needed as part of implementing snippet support in lsp-mode emacs-lsp#350. Aa a result it was possible to clean registration related methods since they where used only by company-lsp. 9. Added the option each client to define the location of its libraries and thus avoid starting LSP servers for library folders. 10. Method selection based on the configuration in `lsp-method->capabilities`. Sample client implementation: ``` emacs-lisp (lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection "pyls") :major-modes '(python-mode) :server-id 'pyls :library-folders-fn (lambda (_workspace) (list "/usr/")))) ```
d71f1e0
to
7c55ba5
Compare
- contains the changes needed so `company-lsp` work against emacs-lsp/lsp-mode#469
|
How do I make use of this? In my |
Fixes #225 #424 #376 #360 #280 #285 #264 #229 #117 #111 #335 #392 #390 #359 #340 #225
Higher level goals:
being a patch in the existing configuration.
The following things are implemented:
Moved
lsp-moderelated code into single file. Now clients should eitherrequire
lsp-modeorlsp. After this CLlsp-mode.elandlsp.elextesionslike
cclsandlsp-uiwill be able to work against either of these.lsp-modewill be used by default and if you want to use the newlsp.elyoushould do
(require 'lsp)before loading lsp-mode.Introduced
lsp-sessionwhich will be resposible for handling projectsession configuration like:
session is persisted and automatically loaded the first time user calls
lspIntroduced
lsp-language-id-configurationwhich will hold the configuration"language" -> emacs major mode. This map is used to render eldoc information and
also to determine the language id when sending various notifications to the
server.
Restructored
lsp--clientby removing the runtime relatedstuff (like last-id) so it can be used as a template for registration. This will
simplify the way lsp client registration and it will make easier to add new
functionality
lsp-ui and company-lsp should be adapted as well. I will prepare separate CLs.
Implemented frontend for reviewing what servers are running, which buffers
are managed, and so on the method have replaced the existing
lsp-capabilitiesmethod.
Reworked the modeline so it can provide info for the servers currently
handling current file.
Moved snippet configuration into
lsp-modefromcompany-lspsince snippetsupport will be needed as part of implementing snippet support in lsp-mode Snippet support in completion-at-point #350.
Aa a result it was possible to clean registration related methods since they
where used only by company-lsp.
Added the option each client to define the location of its libraries and thus
avoid starting LSP servers for library folders.
Method selection based on the configuration in
lsp-method->capabilities.Sample client implementation: