From 57c7f8c5512a73825f5e37fc94960871096de855 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Wed, 25 Jan 2023 23:09:34 +0000 Subject: add pylsp configuration --- lua/lsp.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lua') 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]] -- cgit