aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorPeter Lithammer <peter.lithammer@gmail.com>2021-05-07 09:34:14 +0200
committerGitHub <noreply@github.com>2021-05-07 09:34:14 +0200
commite808cea2c1b3a43fa8a6b08016c78a3d1a1403ca (patch)
treee3aa44110df910c6bae2644ef0ed1e182e1c3f81 /lua
parentMerge pull request #884 from WhyNotHugo/patch-2 (diff)
parentadd pylsp (diff)
downloadnvim-lspconfig-e808cea2c1b3a43fa8a6b08016c78a3d1a1403ca.tar
nvim-lspconfig-e808cea2c1b3a43fa8a6b08016c78a3d1a1403ca.tar.gz
nvim-lspconfig-e808cea2c1b3a43fa8a6b08016c78a3d1a1403ca.tar.bz2
nvim-lspconfig-e808cea2c1b3a43fa8a6b08016c78a3d1a1403ca.tar.lz
nvim-lspconfig-e808cea2c1b3a43fa8a6b08016c78a3d1a1403ca.tar.xz
nvim-lspconfig-e808cea2c1b3a43fa8a6b08016c78a3d1a1403ca.tar.zst
nvim-lspconfig-e808cea2c1b3a43fa8a6b08016c78a3d1a1403ca.zip
Merge pull request #883 from weeman1337/feature-pylsp
Add pylsp
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/pylsp.lua37
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