From c5faea761d2db52da28b643d43f63f9047279529 Mon Sep 17 00:00:00 2001 From: herz Date: Sat, 7 Jan 2023 09:02:45 +0000 Subject: [PATCH] add python lsp --- nvim/after/plugin/lsp.lua | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/nvim/after/plugin/lsp.lua b/nvim/after/plugin/lsp.lua index 084a3aa..c58ee78 100644 --- a/nvim/after/plugin/lsp.lua +++ b/nvim/after/plugin/lsp.lua @@ -7,18 +7,9 @@ lsp.ensure_installed({ 'eslint', 'sumneko_lua', 'rust_analyzer', + 'pyright', }) --- Fix Undefined global 'vim' -lsp.configure('sumneko_lua', { - settings = { - Lua = { - diagnostics = { - globals = { 'vim' } - } - } - } -}) local cmp = require('cmp') @@ -49,6 +40,8 @@ lsp.set_preferences({ } }) + + lsp.on_attach(function(client, bufnr) local opts = {buffer = bufnr, remap = false}