Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Nvim Lspconfig | 7,427 | 4 days ago | 38 | apache-2.0 | Lua | |||||
Quickstart configs for Nvim LSP | ||||||||||
Lua Language Server | 2,352 | a day ago | 228 | mit | Lua | |||||
A language server that offers Lua language support - programmed in Lua | ||||||||||
Eglot | 1,911 | a month ago | 76 | gpl-3.0 | Emacs Lisp | |||||
A client for Language Server Protocol servers | ||||||||||
Metals | 1,899 | 26 | 16 hours ago | 39 | August 10, 2022 | 241 | apache-2.0 | Scala | ||
Scala language server with rich IDE features 🚀 | ||||||||||
Bash Language Server | 1,609 | 2 days ago | 45 | mit | TypeScript | |||||
A language server for Bash | ||||||||||
Zls | 1,523 | a day ago | 99 | mit | Zig | |||||
The @ziglang language server for all your Zig editor tooling needs, from autocomplete to goto-def! | ||||||||||
Lsp | 1,486 | 2 days ago | 70 | mit | Python | |||||
Client implementation of the Language Server Protocol for Sublime Text | ||||||||||
Typescript Language Server | 1,325 | 77 | 32 | 3 days ago | 106 | June 24, 2022 | 25 | other | TypeScript | |
TypeScript & JavaScript Language Server | ||||||||||
Kotlin Language Server | 1,212 | 9 days ago | 1 | March 10, 2021 | 161 | mit | Kotlin | |||
Kotlin code completion, linting and more for any editor/IDE using the Language Server Protocol | ||||||||||
Elixir Ls | 1,166 | 2 days ago | 1 | February 21, 2020 | 82 | apache-2.0 | Elixir | |||
A frontend-independent IDE "smartness" server for Elixir. Implements the "Language Server Protocol" standard and provides debugger support via the "Debug Adapter Protocol" |
lsp-mode
client leveraging Microsoft’s python-language-server.
This project is marked as DEPRECATED, since [Microsoft’s Python Lang Server](https://github.com/microsoft/python-language-server) has already been archived and is replaced by [pyright](https://github.com/microsoft/pyright). The successor is [lsp-pyright](https://github.com/emacs-lsp/lsp-pyright).
Include lsp-python-ms
in the configuration file:
(require 'lsp-python-ms)
(setq lsp-python-ms-auto-install-server t)
(add-hook 'python-mode-hook #'lsp) ; or lsp-deferred
A minimal use-package
initialization might be:
(use-package lsp-python-ms
:ensure t
:init (setq lsp-python-ms-auto-install-server t)
:hook (python-mode . (lambda ()
(require 'lsp-python-ms)
(lsp)))) ; or lsp-deferred
Building the executable manually is difficult on NixOS, but it can be easily installed via the package manager. At the time of writing (May 2020), it is not available on the 20.03 release, but can be acquired on the unstable branch.
nix-channel --add https://nixos.org/channels/nixos-unstable nixos
nix-channel --update nixos
You can then install the executable by running nix-env -iA nixpkgs.python-language-server
or by adding nixpkgs.python-language-server
to your configuration.nix
and creating a new generation.
Note that python37Packages.python-language-server
refers to Palintir’s language server, not Microsoft’s.
Finally, ensure that Emacs knows where to find the executable by setting lsp-python-ms-executable
.
(use-package lsp-python-ms
:ensure t
:hook (python-mode . (lambda ()
(require 'lsp-python-ms)
(lsp)))
:init
(setq lsp-python-ms-executable (executable-find "python-language-server")))
Normally the python-language-server will be downloaded automatically if it doesn’t exist while opening the python scripts.
If you have troubles to download the package, you can also build the server yourselves.
git clone https://github.com/Microsoft/python-language-server.git
cd python-language-server/src/LanguageServer/Impl
dotnet publish -c Release -r osx-x64 # mac
Change the -r
flag according to your architecture and operating system.
See Microsoft’s Runtime ID Catalog for the right value for your system.
Then make the binary executable.
chmod a+x $(git rev-parse --show-toplevel)/output/bin/Release/osx-x64/publish/Microsoft.Python.LanguageServer
NOTE: on some systems (for example, Fedora), the executable comes out as
Microsoft.Python.LanguageServer.LanguageServer
.
lsp-python-ms-executable
.
;; for executable of language server, if it's not symlinked on your PATH
(setq lsp-python-ms-executable
"~/python-language-server/output/bin/Release/osx-x64/publish/Microsoft.Python.LanguageServer")
For development, you might find it useful to run cask install
.
Set workspace root of `lsp-mode` properly, and add the extra directories to lsp-python-ms-extra-paths
or PYTHONPATH
.
Refer to Troubleshooting - Unresolved import warnings and #96.
The folder may have huge folders and files, and the server takes a long time to index them. So please DO NOT put huge files in the project/workspace folder.
Set the variable lsp-python-ms-python-executable
before the `lsp-mode` being loaded.
First, add hack-local-variables-hook
in `init.el` to achieve loading `lsp-mode` after the `.dir-locals.el` file of each project/workspace being loaded.
(add-hook 'hack-local-variables-hook
(lambda ()
(when (derived-mode-p 'python-mode)
(require 'lsp-python-ms)
(lsp)))) ; or lsp-deferred
Second, create `.dir-locals.el` file in the root directory of project to specify the varibale lsp-python-ms-python-executable
for the project/workspace.
((python-mode . ((lsp-python-ms-python-executable . "/.../bin/python"))))
All credit to cpbotha on vxlabs! This just tidies and packages his work there.