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
local lspconfig = require("lspconfig")
lspconfig.pyls.setup {
on_attach = on_attach,
settings = {
pyls = {
plugins = {
flake8 = {enabled = false},
pylint = {enabled = true, executable = "pylint"},
pyflakes = {enabled = false},
pycodestyle = {enabled = false},
jedi_completion = {fuzzy = true},
pyls_isort = {enabled = true},
pyls_mypy = {enabled = true}
}
}
},
flags = {
debounce_text_changes = 500,
lspconfig.pyls.setup{
on_attach = on_attach,
settings = {
pyls = {
plugins = {
flake8 = {enabled = false},
pylint = {enabled = true, executable = "pylint"},
pyflakes = {enabled = false},
pycodestyle = {enabled = false},
jedi_completion = {fuzzy = true},
pyls_isort = {enabled = true},
pyls_mypy = {enabled = true}
}
}
},
flags = {
debounce_text_changes = 500,
}
}
lspconfig.clangd.setup{
@ -156,7 +157,7 @@ require'compe'.setup {
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', '<CR>', "compe#confirm('<CR>')", {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
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
-- Python indent (follows the PEP8 style)