diff options
-rw-r--r-- | .config/nvim/lua/opts.lua | 21 | ||||
-rw-r--r-- | .config/nvim/lua/plugins.lua | 1 |
2 files changed, 21 insertions, 1 deletions
diff --git a/.config/nvim/lua/opts.lua b/.config/nvim/lua/opts.lua index 520184e..21f69fd 100644 --- a/.config/nvim/lua/opts.lua +++ b/.config/nvim/lua/opts.lua @@ -52,7 +52,6 @@ cmp.setup { sources = { { name = 'nvim_lsp' }, { name = 'ultisnips' }, - { name = 'buffer' }, }, } @@ -96,6 +95,25 @@ require'lspconfig'.sumneko_lua.setup { }, } +require'lsp_signature'.setup { + cfg = { + floating_window = true, + floating_window_above_cur_line = true, + fix_pos = false, -- set to true, the floating window will not auto-close until finish all parameters + hi_parameter = "LspSignatureActiveParameter", -- how your parameter will be highlight + max_height = 12, + max_width = 120, + handler_opts = { + border = "single" -- double, single, shadow, none + }, + extra_trigger_chars = {}, -- Array of extra characters that will trigger signature completion, e.g., {"(", ","} + zindex = 200, -- by default it will be on top of all floating windows, set to <= 50 send it to bottom + padding = '', -- character to pad on left and right of signature can be ' ', or '|' etc + timer_interval = 200, -- default timer check interval set to lower value if you want to reduce latency + toggle_key = nil -- toggle signature on and off in insert mode, e.g. toggle_key = '<M-x>' + } +} + -- HTML, CSS, JS (TS), BASH require'lspconfig'.html.setup{} require'lspconfig'.cssls.setup{} @@ -120,5 +138,6 @@ require("toggleterm").setup{ } -- Misc +require "lsp_signature".setup() require('kommentary.config').use_extended_mappings() vim.o.tabline = '%!v:lua.require\'luatab\'.tabline()' diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index e230423..29eb25a 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -16,6 +16,7 @@ require('packer').startup(function() use 'b3nj5m1n/kommentary' use 'mhinz/vim-startify' use "akinsho/toggleterm.nvim" + use "ray-x/lsp_signature.nvim" use { 'nvim-telescope/telescope.nvim', |