aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim_lsp/pyls.lua
blob: 36d631090d060be0aac178bc3b01b32ffaa5fc4e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
local skeleton = require 'nvim_lsp/skeleton'
local util = require 'nvim_lsp/util'
local lsp = vim.lsp

skeleton.pyls = {
  default_config = {
    cmd = {"pyls"};
    filetypes = {"python"};
    root_dir = vim.loop.os_homedir;
    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