summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2023-01-25 23:09:34 +0000
committerJosh Rahm <rahm@google.com>2023-01-25 23:09:34 +0000
commit57c7f8c5512a73825f5e37fc94960871096de855 (patch)
tree2f1e225acc737e6bbaf422d42f05e8307973f25a /lua
parent6bb56e5bb598af2fe77e09176c6ca9e3b267fd33 (diff)
downloadconfig.vim-57c7f8c5512a73825f5e37fc94960871096de855.tar.gz
config.vim-57c7f8c5512a73825f5e37fc94960871096de855.tar.bz2
config.vim-57c7f8c5512a73825f5e37fc94960871096de855.zip
add pylsp configuration
Diffstat (limited to 'lua')
-rw-r--r--lua/lsp.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/lua/lsp.lua b/lua/lsp.lua
index b16a478..8c12deb 100644
--- a/lua/lsp.lua
+++ b/lua/lsp.lua
@@ -34,6 +34,15 @@ configs.hls = {
}
}
+configs.pylsp = {
+ default_config = {
+ cmd = { 'pylsp' },
+ filetypes = { "python" },
+ settings = {},
+ root_dir = nvim_lsp.util.root_pattern(""),
+ }
+}
+
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
@@ -195,6 +204,11 @@ nvim_lsp.hls.setup({
on_attach = M.on_attach,
})
+nvim_lsp.pylsp.setup({
+ capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()),
+ on_attach = M.on_attach,
+})
+
vim.cmd[[hi DiagnosticUnderlineError gui=undercurl guisp=salmon]]
vim.cmd[[hi DiagnosticUnderlineWarn gui=undercurl guisp=gold]]