aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim_lsp.lua1
-rw-r--r--lua/nvim_lsp/pyls.lua65
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