1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00
This commit is contained in:
jdhao 2021-07-04 14:16:46 +08:00
parent d3ee056f96
commit c1ba7af97e
2 changed files with 20 additions and 19 deletions

View File

@ -56,24 +56,25 @@ local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true capabilities.textDocument.completion.completionItem.snippetSupport = true
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
lspconfig.pyls.setup {
on_attach = on_attach, lspconfig.pyls.setup{
settings = { on_attach = on_attach,
pyls = { settings = {
plugins = { pyls = {
flake8 = {enabled = false}, plugins = {
pylint = {enabled = true, executable = "pylint"}, flake8 = {enabled = false},
pyflakes = {enabled = false}, pylint = {enabled = true, executable = "pylint"},
pycodestyle = {enabled = false}, pyflakes = {enabled = false},
jedi_completion = {fuzzy = true}, pycodestyle = {enabled = false},
pyls_isort = {enabled = true}, jedi_completion = {fuzzy = true},
pyls_mypy = {enabled = true} pyls_isort = {enabled = true},
} pyls_mypy = {enabled = true}
} }
},
flags = {
debounce_text_changes = 500,
} }
},
flags = {
debounce_text_changes = 500,
}
} }
lspconfig.clangd.setup{ lspconfig.clangd.setup{
@ -156,7 +157,7 @@ require'compe'.setup {
vim.o.completeopt = "menuone,noselect" vim.o.completeopt = "menuone,noselect"
-- nvim-comple mappings -- nvim-compe mappings
vim.api.nvim_set_keymap('i', '<C-Space>', 'compe#complete()', {expr = true}) vim.api.nvim_set_keymap('i', '<C-Space>', 'compe#complete()', {expr = true})
vim.api.nvim_set_keymap('i', '<CR>', "compe#confirm('<CR>')", {expr = true}) vim.api.nvim_set_keymap('i', '<CR>', "compe#confirm('<CR>')", {expr = true})
vim.api.nvim_set_keymap('i', '<ESC>', "compe#close('<ESC>')", {expr = true}) vim.api.nvim_set_keymap('i', '<ESC>', "compe#close('<ESC>')", {expr = true})

View File

@ -22,7 +22,7 @@ require('packer').startup(
-- Python syntax highlighting and more -- Python syntax highlighting and more
if (vim.g.is_mac == 1) or (vim.g.is_win == 1) then if (vim.g.is_mac == 1) or (vim.g.is_win == 1) then
use {'numirias/semshi', run = ':UpdateRemotePlugins', ft = {'python', }} use {'numirias/semshi', run = ':UpdateRemotePlugins', ft = 'python'}
end end
-- Python indent (follows the PEP8 style) -- Python indent (follows the PEP8 style)