Yet another Jedi Python language server
Project description
anakin-language-server
Yet another Jedi Python language server
Requirements
- Python >= 3.6
- pygls == 0.8.1
- Jedi == 0.17.0
- pyflakes == 2.2.0
- pycodestyle == 2.5.0
Implemented features
textDocument/completion
textDocument/hover
textDocument/signatureHelp
textDocument/definition
textDocument/references
textDocument/publishDiagnostics
Initialization option
venv
- path to virtualenv
Also one can set VIRTUAL_ENV
or CONDA_PREFIX
before running anakinls
so Jedi will find proper environment. See get_default_environment.
Diagnostics
Diagnostics are published on document open and save.
Diagnostics providers:
- Jedi. See get_syntax_errors.
- pyflakes
- pycodestyle
Example
Here is eglot configuration:
(defvar my/lsp-venv nil
"Name of virtualenv.
Set it in project's dir-locals file.")
(defclass my/eglot-anakinls (eglot-lsp-server) ()
:documentation
"Own eglot server class.")
(cl-defmethod eglot-initialization-options ((_server my/eglot-anakinls))
"Pass initialization param to anakinls."
`(:venv ,(when my/lsp-venv
(expand-file-name
(concat "~/.virtualenvs/" my/lsp-venv)))))
;; Add this server to eglot programs to handle python-mode and run `anakinls'
(add-to-list 'eglot-server-programs
'(python-mode my/eglot-anakinls "anakinls"))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for anakin-language-server-1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d2ceb044ceee2fa02074e31d79051c5a51ee9ff45f73c5cb8abe65c7cbd61b1 |
|
MD5 | f85d525d12a1cbfdf1a49e02eb10e827 |
|
BLAKE2b-256 | 2ca937c8f758e9bdd12dd0ab2132c865cf9698307b3855279511d4b3ef3c4174 |
Close
Hashes for anakin_language_server-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e40a0bfc90d4fc9a202426151dc9065e3c963a18e75e6413d1260e7d2c6f1643 |
|
MD5 | 5a46fa2b93adfb93bc328331c25ed06a |
|
BLAKE2b-256 | 5646587be91209c74ad3144a3690e7560e0511ca7b455a36807fd90046cb4482 |