Coder Social home page Coder Social logo

nemethf / python-lsp-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from python-lsp/python-lsp-server

0.0 1.0 0.0 1.03 MB

Fork of the python-language-server project, maintained by the Spyder IDE team and the community

License: MIT License

Python 99.78% Shell 0.22%

python-lsp-server's Introduction

Python LSP Server

image image image image

A Python 3.6+ implementation of the Language Server Protocol.

Installation

The base language server requires Jedi to provide Completions, Definitions, Hover, References, Signature Help, and Symbols:

pip install python-lsp-server

If the respective dependencies are found, the following optional providers will be enabled:

  • Rope for Completions and renaming
  • Pyflakes linter to detect various errors
  • McCabe linter for complexity checking
  • pycodestyle linter for style checking
  • pydocstyle linter for docstring style checking (disabled by default)
  • autopep8 for code formatting
  • YAPF for code formatting (preferred over autopep8)

Optional providers can be installed using the extras syntax. To install YAPF formatting for example:

pip install 'python-lsp-server[yapf]'

All optional providers can be installed using:

pip install 'python-lsp-server[all]'

If you get an error similar to 'install_requires' must be a string or list of strings then please upgrade setuptools before trying again.

pip install -U setuptools

3rd Party Plugins

Installing these plugins will add extra functionality to the language server:

Please see the above repositories for examples on how to write plugins for the Python LSP Server. Please file an issue if you require assistance writing a plugin.

Configuration

Configuration is loaded from zero or more configuration sources. Currently implemented are:

  • pycodestyle: discovered in ~/.config/pycodestyle, setup.cfg, tox.ini and pycodestyle.cfg.
  • flake8: discovered in ~/.config/flake8, setup.cfg, tox.ini and flake8.cfg

The default configuration source is pycodestyle. Change the pylsp.configurationSources setting to ['flake8'] in order to respect flake8 configuration instead.

Overall configuration is computed first from user configuration (in home directory), overridden by configuration passed in by the language client, and then overriden by configuration discovered in the workspace.

To enable pydocstyle for linting docstrings add the following setting in your LSP configuration: "pylsp.plugins.pydocstyle.enabled": true

LSP Server Features

  • Auto Completion
  • Code Linting
  • Signature Help
  • Go to definition
  • Hover
  • Find References
  • Document Symbols
  • Document Formatting
  • Code folding
  • Multiple workspaces

Development

To run the test suite:

pip install .[test] && pytest

License

This project is made available under the MIT License.

python-lsp-server's People

Contributors

andfoy avatar benmezger avatar bnavigator avatar ccordoba12 avatar dalthviz avatar dependabot[bot] avatar e-kwsm avatar evandrocoan avatar exploide avatar ferozco avatar gatesn avatar gnattishness avatar goanpeca avatar jroitgrund avatar kashewnuts avatar krassowski avatar lgeiger avatar marimeireles avatar mpanarin avatar mrclary avatar muffinmad avatar randy3k avatar rkiyanchuk avatar ruhulio avatar rupert avatar steff456 avatar talamuyal avatar tomv564 avatar xiaoxiae avatar youben11 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.