Neovim: add LSP signature and change cmp setting

This commit is contained in:
2023-07-08 15:20:41 +03:00
parent 3d107e59dc
commit bf2d128338
5 changed files with 20 additions and 4 deletions

View File

@ -21,8 +21,8 @@ opt.timeoutlen = 500
opt.ts = 4 opt.ts = 4
-- opt.wrap = false -- opt.wrap = false
-- :FormatJson command using jq -- :JsonFormat command using jq
cmd 'autocmd FileType json :command! FormatJson %!jq .' cmd 'autocmd FileType json :command! JsonFormat %!jq .'
-- trigger autoread on file change -- trigger autoread on file change
cmd "autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * if mode() != 'c' | checktime | endif" cmd "autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * if mode() != 'c' | checktime | endif"

View File

@ -57,6 +57,12 @@ require('packer').startup(function()
after = 'vim-vsnip' after = 'vim-vsnip'
} }
-- lsp signature
use {
'ray-x/lsp_signature.nvim',
config = function() require('plugins.lspsignature') end
}
-- autopairs -- autopairs
use { use {
'windwp/nvim-autopairs', 'windwp/nvim-autopairs',

View File

@ -15,7 +15,7 @@ cmp.setup({
['<C-e>'] = cmp.mapping.close(), ['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm({ ['<CR>'] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace, behavior = cmp.ConfirmBehavior.Replace,
select = true select = false
}) })
}, },
sources = { sources = {

View File

@ -1,4 +1,6 @@
-- colorscheme -- colorscheme
vim.cmd 'colorscheme wal' vim.cmd 'colorscheme wal'
-- vim.cmd 'colorscheme monokai' -- misc colorscheme fixes
vim.cmd 'highlight Pmenu ctermbg=black' vim.cmd 'highlight Pmenu ctermbg=black'
vim.cmd 'highlight FloatBorder cterm=none'
vim.cmd 'highlight NormalFloat cterm=none'

View File

@ -0,0 +1,8 @@
cfg = {
hint_prefix = " ", -- Panda for parameter
handler_opts = {
border = "single" -- double, rounded, single, shadow, none
},
}
require "lsp_signature".setup(cfg)