add completion icons, and path completion

This commit is contained in:
Szwendacz99 2022-11-02 14:33:54 +01:00
parent c4c719241d
commit d09b527e0f
3 changed files with 164 additions and 150 deletions

View file

@ -12,10 +12,13 @@ Plug 'hrsh7th/nvim-cmp'
Plug 'williamboman/mason.nvim' Plug 'williamboman/mason.nvim'
Plug 'williamboman/mason-lspconfig.nvim' Plug 'williamboman/mason-lspconfig.nvim'
Plug 'mfussenegger/nvim-lint' Plug 'mfussenegger/nvim-lint'
"Plug 'dense-analysis/ale' Plug 'onsails/lspkind.nvim'
" various plugins " various plugins
Plug 'windwp/nvim-ts-autotag'
Plug 'hrsh7th/cmp-path'
Plug 'L3MON4D3/LuaSnip', {'tag': 'v1.*'} Plug 'L3MON4D3/LuaSnip', {'tag': 'v1.*'}
Plug 'saadparwaiz1/cmp_luasnip'
Plug 'lambdalisue/suda.vim' Plug 'lambdalisue/suda.vim'
Plug 'airblade/vim-gitgutter' Plug 'airblade/vim-gitgutter'
Plug 'akinsho/bufferline.nvim', { 'tag': 'v3.*' } Plug 'akinsho/bufferline.nvim', { 'tag': 'v3.*' }

View file

@ -40,6 +40,7 @@ codewindow.apply_default_keybinds()
-- Set up nvim-cmp. -- Set up nvim-cmp.
local cmp = require 'cmp' local cmp = require 'cmp'
local lspkind = require('lspkind')
cmp.setup({ cmp.setup({
snippet = { snippet = {
@ -61,13 +62,21 @@ snippet = {
}), }),
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = 'nvim_lsp' }, { name = 'nvim_lsp' },
{ name = 'vsnip' }, -- For vsnip users. --{ name = 'vsnip' }, -- For vsnip users.
-- { name = 'luasnip' }, -- For luasnip users. { name = 'luasnip' }, -- For luasnip users.
-- { name = 'ultisnips' }, -- For ultisnips users. -- { name = 'ultisnips' }, -- For ultisnips users.
-- { name = 'snippy' }, -- For snippy users. -- { name = 'snippy' }, -- For snippy users.
}, { }, {
{ name = 'buffer' }, { 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. -- Set configuration for specific filetype.
@ -97,7 +106,6 @@ cmp.setup.cmdline(':', {
}) })
}) })
require("nvim-tree").setup({ require("nvim-tree").setup({
create_in_closed_folder = true, create_in_closed_folder = true,
hijack_cursor = true, hijack_cursor = true,

View file

@ -7,6 +7,9 @@ require('lint').linters_by_ft = {
local pydocstyle = require('lint.linters.pydocstyle') local pydocstyle = require('lint.linters.pydocstyle')
pydocstyle.args = { pydocstyle.args = {
'--ignore=D100', -- disable missing module docstring info '--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') local pylint = require('lint.linters.pylint')
pylint.args = { pylint.args = {