diff options
| author | Michael Weimann <mail@michael-weimann.eu> | 2021-05-05 19:52:51 +0200 |
|---|---|---|
| committer | Michael Weimann <mail@michael-weimann.eu> | 2021-05-06 20:23:43 +0200 |
| commit | 5cd9366a063403893481f68be0ed0b1af9a59468 (patch) | |
| tree | db36bda741bb0b47f5a9b935c29786f3bee829fc /lua | |
| parent | Merge pull request #878 from neovim/remove-tabs (diff) | |
| download | nvim-lspconfig-5cd9366a063403893481f68be0ed0b1af9a59468.tar nvim-lspconfig-5cd9366a063403893481f68be0ed0b1af9a59468.tar.gz nvim-lspconfig-5cd9366a063403893481f68be0ed0b1af9a59468.tar.bz2 nvim-lspconfig-5cd9366a063403893481f68be0ed0b1af9a59468.tar.lz nvim-lspconfig-5cd9366a063403893481f68be0ed0b1af9a59468.tar.xz nvim-lspconfig-5cd9366a063403893481f68be0ed0b1af9a59468.tar.zst nvim-lspconfig-5cd9366a063403893481f68be0ed0b1af9a59468.zip | |
add pylsp
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/pylsp.lua | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lua/lspconfig/pylsp.lua b/lua/lspconfig/pylsp.lua new file mode 100644 index 00000000..d98ff432 --- /dev/null +++ b/lua/lspconfig/pylsp.lua @@ -0,0 +1,37 @@ +local configs = require 'lspconfig/configs' +local util = require 'lspconfig/util' + +configs.pylsp = { + default_config = { + cmd = {"pylsp"}; + filetypes = {"python"}; + root_dir = function(fname) + local root_files = { + "pyproject.toml", + "setup.py", + "setup.cfg", + "requirements.txt", + "Pipfile" + } + return util.root_pattern(unpack(root_files))(fname) or + util.find_git_ancestor(fname) or + util.path.dirname(fname) + end; + }; + docs = { + description = [[ +https://github.com/python-lsp/python-lsp-server + +A Python 3.6+ implementation of the Language Server Protocol. + +The language server has to be installed separately for example by `pipx install python-lsp-server`. +Further instructions can be found in the [project's README](https://github.com/python-lsp/python-lsp-server). + +Note: This is a community for of `pyls`. + ]]; + default_config = { + root_dir = "vim's starting directory"; + }; + }; +}; +-- vim:et ts=2 sw=2 |
