-
-
Notifications
You must be signed in to change notification settings - Fork 889
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
[Improvement] make single entry point for lsp-mode #376
Comments
Any thoughts on how best to define the mapping from major mode <-> lsp client definition? Maybe the client's language id. More generally, I'm already working on something that'll work with the current many-packages ecosystem and basically just aim to automate the "typical case" setup (potentially even automating installing the appropriate lsp-(language) package and downloading the necessary language server executables). I hope to get it usable and published over this weekend. It may need to be yet another separate mode (in order not to pollute the main lsp-mode package with URLs of external, potentially non-GPL binaries). |
I was thinking about extending "languages": [
{
"id": "java",
"extensions": [
".class"
],
"configuration": "./language-configuration.json"
}
], Few more things to consider(not sure whether it is related to your effort):
|
See also: #424 |
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 The following things are implemented: 1. Changed
I vote for this too! |
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 The following things are implemented: 1. Changed
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 The following things are implemented: 1. Changed
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 The following things are implemented: 1. 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` 2. 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. 3. Refactored 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
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 The following things are implemented: 1. 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` 2. 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. 3. Refactored 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
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 emacs-lsp#392 emacs-lsp#390 emacs-lsp#359 emacs-lsp#340 emacs-lsp#225 The following things are implemented: 1. 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` 2. 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. 3. 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
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 emacs-lsp#392 emacs-lsp#390 emacs-lsp#359 emacs-lsp#340 emacs-lsp#225 The following things are implemented: 1. 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` 2. 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. 3. 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 4. lsp-ui and company-lsp should be adapted as well. I will prepare separate CLs. 5. Implemented frontend for reviewing what servers are running, which buffers are managed, and so on. 6. Reworked the modeline so it can provide info for the servers currently handling current file.
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 emacs-lsp#392 emacs-lsp#390 emacs-lsp#359 emacs-lsp#340 emacs-lsp#225 The following things are implemented: 1. Moved `lsp-mode` related code into single file. Now clients should either require `lsp-mode` or `lsp`. I am still trying to figure out what is the best way to to this conditional require. 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. 7. Reworked the modeline so it can provide info for the servers currently handling current file.
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 emacs-lsp#392 emacs-lsp#390 emacs-lsp#359 emacs-lsp#340 emacs-lsp#225 The following things are implemented: 1. Moved `lsp-mode` related code into single file. Now clients should either require `lsp-mode` or `lsp`. I am still trying to figure out what is the best way to to this conditional require. 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. 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.
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 emacs-lsp#392 emacs-lsp#390 emacs-lsp#359 emacs-lsp#340 emacs-lsp#225 The following things are implemented: 1. Moved `lsp-mode` related code into single file. Now clients should either require `lsp-mode` or `lsp`. I am still trying to figure out what is the best way to to this conditional require. 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. 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.
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 emacs-lsp#392 emacs-lsp#390 emacs-lsp#359 emacs-lsp#340 emacs-lsp#225 The following things are implemented: 1. Moved `lsp-mode` related code into single file. Now clients should either require `lsp-mode` or `lsp`. I am still trying to figure out what is the best way to to this conditional require. 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. 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.
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 emacs-lsp#392 emacs-lsp#390 emacs-lsp#359 emacs-lsp#340 emacs-lsp#225 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`.
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 emacs-lsp#392 emacs-lsp#390 emacs-lsp#359 emacs-lsp#340 emacs-lsp#225 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`.
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 emacs-lsp#392 emacs-lsp#390 emacs-lsp#359 emacs-lsp#340 emacs-lsp#225 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/")))) ```
Fixes emacs-lsp#225 emacs-lsp#424 emacs-lsp#376 emacs-lsp#360 emacs-lsp#280 emacs-lsp#285 emacs-lsp#264 emacs-lsp#229 emacs-lsp#117 emacs-lsp#111 emacs-lsp#335 emacs-lsp#392 emacs-lsp#390 emacs-lsp#359 emacs-lsp#340 emacs-lsp#225 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/")))) ```
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 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/")))) ```
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/")))) ```
Currently, every extension has its own entry point. We could change the code to start the proper LS server based on the major mode via generic method like
lsp-start
.The text was updated successfully, but these errors were encountered: