diff options
| author | Christian Clason <christian.clason@uni-due.de> | 2019-11-14 19:46:50 +0100 |
|---|---|---|
| committer | Ashkan Kiani <ashkan.k.kiani@gmail.com> | 2019-11-14 10:46:50 -0800 |
| commit | 9100b3af6e310561167361536fd162bbe588049a (patch) | |
| tree | b9f67c9b0bd05d222dd26533dd40f5075de96755 /lua | |
| parent | Fix clangd's status (diff) | |
| download | nvim-lspconfig-9100b3af6e310561167361536fd162bbe588049a.tar nvim-lspconfig-9100b3af6e310561167361536fd162bbe588049a.tar.gz nvim-lspconfig-9100b3af6e310561167361536fd162bbe588049a.tar.bz2 nvim-lspconfig-9100b3af6e310561167361536fd162bbe588049a.tar.lz nvim-lspconfig-9100b3af6e310561167361536fd162bbe588049a.tar.xz nvim-lspconfig-9100b3af6e310561167361536fd162bbe588049a.tar.zst nvim-lspconfig-9100b3af6e310561167361536fd162bbe588049a.zip | |
Add initial support for python-language-server (#3)
* initial support for python-language-server
* put settings in documentation
also:
update docgen script
update setup call examples in README_preamble
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim_lsp.lua | 1 | ||||
| -rw-r--r-- | lua/nvim_lsp/pyls.lua | 65 |
2 files changed, 66 insertions, 0 deletions
diff --git a/lua/nvim_lsp.lua b/lua/nvim_lsp.lua index 7868e3a4..a28bc4d5 100644 --- a/lua/nvim_lsp.lua +++ b/lua/nvim_lsp.lua @@ -2,6 +2,7 @@ local skeleton = require 'nvim_lsp/skeleton' require 'nvim_lsp/gopls' require 'nvim_lsp/texlab' require 'nvim_lsp/clangd' +require 'nvim_lsp/pyls' local M = { util = require 'nvim_lsp/util'; diff --git a/lua/nvim_lsp/pyls.lua b/lua/nvim_lsp/pyls.lua new file mode 100644 index 00000000..c4691f5d --- /dev/null +++ b/lua/nvim_lsp/pyls.lua @@ -0,0 +1,65 @@ +local skeleton = require 'nvim_lsp/skeleton' +local util = require 'nvim_lsp/util' +local lsp = vim.lsp + +local cwd = vim.loop.cwd() + +skeleton.pyls = { + default_config = { + cmd = {"pyls"}; + filetypes = {"python"}; + root_dir = function() return cwd end; + log_level = lsp.protocol.MessageType.Warning; + settings = {}; + }; + -- on_new_config = function(new_config) end; + -- on_attach = function(client, bufnr) end; + docs = { + description = [[ +https://github.com/palantir/python-language-server + +python-language-server, a language server for Python + +the following settings (with default options) are supported: +```lua +settings = { + pyls = { + enable = true; + trace = { server = "verbose"; }; + commandPath = ""; + configurationSources = { "pycodestyle" }; + plugins = { + jedi_completion = { enabled = true; }; + jedi_hover = { enabled = true; }; + jedi_references = { enabled = true; }; + jedi_signature_help = { enabled = true; }; + jedi_symbols = { + enabled = true; + all_scopes = true; + }; + mccabe = { + enabled = true; + threshold = 15; + }; + preload = { enabled = true; }; + pycodestyle = { enabled = true; }; + pydocstyle = { + enabled = false; + match = "(?!test_).*\\.py"; + matchDir = "[^\\.].*"; + }; + pyflakes = { enabled = true; }; + rope_completion = { enabled = true; }; + yapf = { enabled = true; }; + }; + }; +}; +``` + ]]; + default_config = { + root_dir = "vim's starting directory"; + }; + }; +}; + +-- vim:et ts=2 sw=2 |
