Neovim: add LSP signature and change cmp setting
This commit is contained in:
@ -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"
|
||||||
|
|||||||
@ -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',
|
||||||
|
|||||||
@ -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 = {
|
||||||
|
|||||||
@ -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'
|
||||||
|
|||||||
8
.config/nvim/lua/plugins/lspsignature.lua
Normal file
8
.config/nvim/lua/plugins/lspsignature.lua
Normal 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)
|
||||||
Reference in New Issue
Block a user