add cmp-cmdline, small lsp conf fixes
This commit is contained in:
parent
fda3d3ea1f
commit
e50da7681e
3 changed files with 23 additions and 14 deletions
|
@ -9,8 +9,8 @@ cmp.setup({
|
|||
end,
|
||||
},
|
||||
window = {
|
||||
-- completion = cmp.config.window.bordered(),
|
||||
-- documentation = cmp.config.window.bordered(),
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
|
@ -55,12 +55,17 @@ cmp.setup.cmdline({ '/', '?' }, {
|
|||
}
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
-- `:` cmdline setup.
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
{
|
||||
name = 'cmdline',
|
||||
option = {
|
||||
ignore_cmds = { 'Man', '!' }
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -97,10 +97,9 @@ local cfg = {
|
|||
require 'lsp_signature'.setup(cfg) -- no need to specify bufnr if you don't use toggle_key
|
||||
|
||||
|
||||
require 'lspconfig'.pyright.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
-----------------
|
||||
-- attaching all lsp servers, order matters (for example in autocompletion)
|
||||
-----------------
|
||||
require 'lspconfig'.pylsp.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities
|
||||
|
@ -127,7 +126,7 @@ require 'lspconfig'.pylsp.setup {
|
|||
pyflakes = { enabled = true },
|
||||
pyodestyle = { enabled = true },
|
||||
pydocstyle = {
|
||||
enabled = false,
|
||||
enabled = true,
|
||||
ignore = {
|
||||
'D100', -- disable missing module docstring info
|
||||
'D203', -- disable one line before class docstring required
|
||||
|
@ -139,6 +138,14 @@ require 'lspconfig'.pylsp.setup {
|
|||
}
|
||||
}
|
||||
}
|
||||
require'lspconfig'.jedi_language_server.setup{
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
require 'lspconfig'.pyright.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
require 'lspconfig'.pyre.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
|
@ -237,7 +244,3 @@ require 'lspconfig'.marksman.setup {
|
|||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
require'lspconfig'.jedi_language_server.setup{
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@ return require('packer').startup(function(use)
|
|||
use 'neovim/nvim-lspconfig'
|
||||
use 'hrsh7th/cmp-nvim-lsp'
|
||||
use 'hrsh7th/cmp-buffer'
|
||||
use 'hrsh7th/cmp-cmdline'
|
||||
use 'hrsh7th/cmp-path'
|
||||
use 'hrsh7th/nvim-cmp'
|
||||
use 'williamboman/mason.nvim'
|
||||
use 'williamboman/mason-lspconfig.nvim'
|
||||
|
@ -20,7 +22,6 @@ return require('packer').startup(function(use)
|
|||
use 'petertriho/nvim-scrollbar'
|
||||
use 'kevinhwang91/nvim-hlslens'
|
||||
use 'windwp/nvim-ts-autotag'
|
||||
use 'hrsh7th/cmp-path'
|
||||
use { 'L3MON4D3/LuaSnip', tag = '*' }
|
||||
use 'saadparwaiz1/cmp_luasnip'
|
||||
use 'lambdalisue/suda.vim'
|
||||
|
|
Loading…
Reference in a new issue