All Projects → muffinmad → anakin-language-server

muffinmad / anakin-language-server

Licence: GPL-3.0 license
Yet another Jedi Python language server

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to anakin-language-server

Dockerfile Language Server Nodejs
A language server for Dockerfiles powered by Node.js, TypeScript, and VSCode technologies.
Stars: ✭ 170 (+529.63%)
Mutual labels:  language-server
Csharp Language Server Protocol
Language Server Protocol in C#
Stars: ✭ 230 (+751.85%)
Mutual labels:  language-server
dftools
Tools for Star Wars: Dark Forces assets.
Stars: ✭ 18 (-33.33%)
Mutual labels:  jedi
Nox
Nox is a lightweight, high-performance LSP client for Emacs
Stars: ✭ 181 (+570.37%)
Mutual labels:  language-server
Ide Python
Python language support for Atom-IDE :atom: 🐍
Stars: ✭ 213 (+688.89%)
Mutual labels:  language-server
Ocaml Language Server
A language server for OCaml and related languages
Stars: ✭ 238 (+781.48%)
Mutual labels:  language-server
Vala Language Server
Code Intelligence for Vala & Genie
Stars: ✭ 156 (+477.78%)
Mutual labels:  language-server
theia-xtext
A Theia Application with DSL support through an Xtext Language Server
Stars: ✭ 29 (+7.41%)
Mutual labels:  language-server
Lua Lsp
A Lua language server
Stars: ✭ 219 (+711.11%)
Mutual labels:  language-server
jedi-faker
Faker extension for Star Wars junkie
Stars: ✭ 15 (-44.44%)
Mutual labels:  jedi
Vscode As3mxml
ActionScript & MXML language extension for Visual Studio Code. Develop apps for Adobe AIR, Adobe Flash Player, or Apache Royale.
Stars: ✭ 205 (+659.26%)
Mutual labels:  language-server
Intelephense
Intellisense for PHP
Stars: ✭ 212 (+685.19%)
Mutual labels:  language-server
TheVimIDE
Modern Vim IDE with support for C/C++, Java, Python, Lua, PHP, JavaScript, Ruby and much more ...
Stars: ✭ 33 (+22.22%)
Mutual labels:  jedi
Langserver Swift
A Swift implementation of the open Language Server Protocol.
Stars: ✭ 171 (+533.33%)
Mutual labels:  language-server
holocron
An extendable static blog generator powered by the Force. =/
Stars: ✭ 16 (-40.74%)
Mutual labels:  jedi
Elm Language Client Vscode
Improving your Elm experience since 2019
Stars: ✭ 162 (+500%)
Mutual labels:  language-server
Vshaxe
Haxe Support for Visual Studio Code
Stars: ✭ 234 (+766.67%)
Mutual labels:  language-server
LanguageServer.NET
A .NET Standard server-side implementation of Language Server Protocol 2.0/3.x infrastructure library.
Stars: ✭ 78 (+188.89%)
Mutual labels:  language-server
gedi
a python code completion plugin for gedit3+
Stars: ✭ 33 (+22.22%)
Mutual labels:  jedi
python-tools
🔧 Atom plugin which uses jedi to provide numerous tools useful for developing python code in atom.
Stars: ✭ 96 (+255.56%)
Mutual labels:  jedi

anakin-language-server

Yet another Jedi Python language server

Requirements

  • Python >= 3.6
  • pygls >= 0.10.2,<0.11
  • Jedi >= 0.18
  • pyflakes ~= 2.2
  • pycodestyle ~= 2.5
  • yapf ~=0.30

Optional requirements

  • mypy

Implemented features

  • textDocument/completion
  • textDocument/hover
  • textDocument/signatureHelp
  • textDocument/definition
  • textDocument/references
  • textDocument/publishDiagnostics
  • textDocument/documentSymbol
  • textDocument/codeAction (Inline variable)
  • textDocument/formatting
  • textDocument/rangeFormatting
  • textDocument/rename
  • textDocument/documentHighlight

Initialization option

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

    Server restart is needed after changing one of the configuration files.

  • mypy

    Install mypy in the same environment as anakinls and set mypy_enabled configuration option.

Configuration options

Configuration options must be passed under anakinls key in workspace/didChangeConfiguration notification.

Available options:

Option Description Default
help_on_hover Use help instead of infer for textDocument/hover. True
completion_snippet_first Tweak sortText property so snippet completion appear before plain completion. False
completion_fuzzy Value of the fuzzy parameter for complete. False
diagnostic_on_open Publish diagnostics on textDocument/didOpen True
diagnostic_on_change Publish diagnostics on textDocument/didChange False
diagnostic_on_save Publish diagnostics on textDocument/didSave True
pyflakes_errors Diagnostic severity will be set to Error if Pyflakes message class name is in this list. See Pyflakes messages. ['UndefinedName']
pycodestyle_config In addition to project and user level config, specify pycodestyle config file. Same as --config option for pycodestyle. None
mypy_enabled Use mypy to provide diagnostics. False
yapf_style_config Either a style name or a path to a file that contains formatting style settings. 'pep8'
jedi_settings Global Jedi settings.
E.g. set it to {"case_insensitive_completion": False} to turn off case insensitive completion
{}

Configuration 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"))

;; Also treat UnusedVariable as error
(setq-default eglot-workspace-configuration
              '((:anakinls :pyflakes_errors ["UndefinedName" "UnusedVariable"])))

Installation

pip install anakin-language-server
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].