add python lsp

This commit is contained in:
herz 2023-01-07 09:02:45 +00:00
parent e7ff24fcc2
commit c5faea761d
1 changed files with 3 additions and 10 deletions

View File

@ -7,18 +7,9 @@ lsp.ensure_installed({
'eslint', 'eslint',
'sumneko_lua', 'sumneko_lua',
'rust_analyzer', 'rust_analyzer',
'pyright',
}) })
-- Fix Undefined global 'vim'
lsp.configure('sumneko_lua', {
settings = {
Lua = {
diagnostics = {
globals = { 'vim' }
}
}
}
})
local cmp = require('cmp') local cmp = require('cmp')
@ -49,6 +40,8 @@ lsp.set_preferences({
} }
}) })
lsp.on_attach(function(client, bufnr) lsp.on_attach(function(client, bufnr)
local opts = {buffer = bufnr, remap = false} local opts = {buffer = bufnr, remap = false}