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.*' }
|
||||
|
|
|
@ -34,15 +34,16 @@ codewindow.setup({
|
|||
show_cursor = true,
|
||||
exclude_filetypes = {}, -- Choose certain filetypes to not show minimap on
|
||||
z_index = 1, -- The z-index the floating window will be on
|
||||
})
|
||||
})
|
||||
codewindow.apply_default_keybinds()
|
||||
|
||||
|
||||
-- Set up nvim-cmp.
|
||||
local cmp = require'cmp'
|
||||
local cmp = require 'cmp'
|
||||
local lspkind = require('lspkind')
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
snippet = {
|
||||
-- REQUIRED - you must specify a snippet engine
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||
|
@ -61,22 +62,30 @@ 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.
|
||||
cmp.setup.filetype('gitcommit', {
|
||||
sources = cmp.config.sources({
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
|
||||
}, {
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
||||
|
@ -97,7 +106,6 @@ cmp.setup.cmdline(':', {
|
|||
})
|
||||
})
|
||||
|
||||
|
||||
require("nvim-tree").setup({
|
||||
create_in_closed_folder = true,
|
||||
hijack_cursor = true,
|
||||
|
@ -165,7 +173,7 @@ require("nvim-tree").setup({
|
|||
watcher = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
--Gruvbox theme settings
|
||||
-- setup must be called before loading the colorscheme
|
||||
|
@ -187,7 +195,7 @@ require("gruvbox").setup({
|
|||
transparent_mode = false,
|
||||
})
|
||||
|
||||
require('bufferline').setup {
|
||||
require('bufferline').setup {
|
||||
options = {
|
||||
mode = "buffers", -- set to "tabs" to only show tabpages instead
|
||||
numbers = "buffer_id",
|
||||
|
@ -238,8 +246,8 @@ require("gruvbox").setup({
|
|||
hover = {
|
||||
enabled = true,
|
||||
delay = 200,
|
||||
reveal = {'close'}
|
||||
reveal = { 'close' }
|
||||
},
|
||||
sort_by = 'tabs'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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