add completion icons, and path completion
This commit is contained in:
parent
c4c719241d
commit
d09b527e0f
3 changed files with 164 additions and 150 deletions
5
init.vim
5
init.vim
|
@ -12,10 +12,13 @@ Plug 'hrsh7th/nvim-cmp'
|
|||
Plug 'williamboman/mason.nvim'
|
||||
Plug 'williamboman/mason-lspconfig.nvim'
|
||||
Plug 'mfussenegger/nvim-lint'
|
||||
"Plug 'dense-analysis/ale'
|
||||
Plug 'onsails/lspkind.nvim'
|
||||
|
||||
" various plugins
|
||||
Plug 'windwp/nvim-ts-autotag'
|
||||
Plug 'hrsh7th/cmp-path'
|
||||
Plug 'L3MON4D3/LuaSnip', {'tag': 'v1.*'}
|
||||
Plug 'saadparwaiz1/cmp_luasnip'
|
||||
Plug 'lambdalisue/suda.vim'
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
Plug 'akinsho/bufferline.nvim', { 'tag': 'v3.*' }
|
||||
|
|
|
@ -40,6 +40,7 @@ codewindow.apply_default_keybinds()
|
|||
|
||||
-- Set up nvim-cmp.
|
||||
local cmp = require 'cmp'
|
||||
local lspkind = require('lspkind')
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
|
@ -61,13 +62,21 @@ snippet = {
|
|||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'vsnip' }, -- For vsnip users.
|
||||
-- { name = 'luasnip' }, -- For luasnip users.
|
||||
--{ name = 'vsnip' }, -- For vsnip users.
|
||||
{ name = 'luasnip' }, -- For luasnip users.
|
||||
-- { name = 'ultisnips' }, -- For ultisnips users.
|
||||
-- { name = 'snippy' }, -- For snippy users.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
}),
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
--mode = 'symbol', -- show only symbol annotations
|
||||
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
|
||||
ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
-- Set configuration for specific filetype.
|
||||
|
@ -97,7 +106,6 @@ cmp.setup.cmdline(':', {
|
|||
})
|
||||
})
|
||||
|
||||
|
||||
require("nvim-tree").setup({
|
||||
create_in_closed_folder = true,
|
||||
hijack_cursor = true,
|
||||
|
|
|
@ -7,6 +7,9 @@ require('lint').linters_by_ft = {
|
|||
local pydocstyle = require('lint.linters.pydocstyle')
|
||||
pydocstyle.args = {
|
||||
'--ignore=D100', -- disable missing module docstring info
|
||||
'--ignore=D203', -- disable one line before class docstring required
|
||||
'--ignore=D213', -- disable multiline docstring summary
|
||||
-- should start at the second line
|
||||
}
|
||||
local pylint = require('lint.linters.pylint')
|
||||
pylint.args = {
|
||||
|
|
Loading…
Reference in a new issue