replace hover.nvim with lsp_signature

This commit is contained in:
sudacode 2023-02-17 09:37:30 -08:00
parent 34f6f4c805
commit 721e48df99
3 changed files with 40 additions and 40 deletions

View File

@ -36,7 +36,7 @@ source ~/.config/nvim/plugin-confs/nvim-cmp.lua
source ~/.config/nvim/plugin-confs/fidget.lua source ~/.config/nvim/plugin-confs/fidget.lua
source ~/.config/nvim/plugin-confs/symbols-outline.lua source ~/.config/nvim/plugin-confs/symbols-outline.lua
" source ~/.config/nvim/plugin-confs/copilot.lua " source ~/.config/nvim/plugin-confs/copilot.lua
" source ~/.config/nvim/plugin-confs/lsp-signature.lua source ~/.config/nvim/plugin-confs/lsp-signature.lua
" source ~/.config/nvim/plugin-confs/nvim-docs-view.lua " source ~/.config/nvim/plugin-confs/nvim-docs-view.lua
" nvim and vim plugins " nvim and vim plugins

View File

@ -79,42 +79,42 @@ require('packer').startup(function(use)
run = function() vim.fn['fzf#install']() end run = function() vim.fn['fzf#install']() end
} }
use { -- use {
"lewis6991/hover.nvim", -- "lewis6991/hover.nvim",
config = function() -- config = function()
require("hover").setup { -- require("hover").setup {
init = function() -- init = function()
-- Require providers -- -- Require providers
require("hover.providers.lsp") -- require("hover.providers.lsp")
-- require('hover.providers.gh') -- -- require('hover.providers.gh')
-- require('hover.providers.jira') -- -- require('hover.providers.jira')
require('hover.providers.man') -- require('hover.providers.man')
require('hover.providers.dictionary') -- require('hover.providers.dictionary')
end, -- end,
preview_opts = { -- preview_opts = {
border = "rounded" -- border = "rounded"
-- border = { -- -- border = {
-- { "╭", "FloatBorder" }, -- -- { "╭", "FloatBorder" },
-- { "─", "FloatBorder" }, -- -- { "─", "FloatBorder" },
-- { "╮", "FloatBorder" }, -- -- { "╮", "FloatBorder" },
-- { "│", "FloatBorder" }, -- -- { "│", "FloatBorder" },
-- { "╯", "FloatBorder" }, -- -- { "╯", "FloatBorder" },
-- { "─", "FloatBorder" }, -- -- { "─", "FloatBorder" },
-- { "╰", "FloatBorder" }, -- -- { "╰", "FloatBorder" },
-- { "│", "FloatBorder" }, -- -- { "│", "FloatBorder" },
-- -- }
-- },
-- -- Whether the contents of a currently open hover window should be moved
-- -- to a :h preview-window when pressing the hover keymap.
-- preview_window = false,
-- title = true
-- } -- }
},
-- Whether the contents of a currently open hover window should be moved
-- to a :h preview-window when pressing the hover keymap.
preview_window = false,
title = true
}
-- Setup keymaps -- -- Setup keymaps
vim.keymap.set("n", "K", require("hover").hover, {desc = "hover.nvim"}) -- vim.keymap.set("n", "K", require("hover").hover, {desc = "hover.nvim"})
vim.keymap.set("n", "gK", require("hover").hover_select, {desc = "hover.nvim (select)"}) -- vim.keymap.set("n", "gK", require("hover").hover_select, {desc = "hover.nvim (select)"})
end -- end
} -- }
use 'ap/vim-css-color' use 'ap/vim-css-color'
use 'jiangmiao/auto-pairs' use 'jiangmiao/auto-pairs'
@ -190,7 +190,7 @@ require('packer').startup(function(use)
use { use {
'onsails/lspkind-nvim' 'onsails/lspkind-nvim'
} }
-- use 'ray-x/lsp_signature.nvim' use 'ray-x/lsp_signature.nvim'
use { use {
'rmagatti/goto-preview' 'rmagatti/goto-preview'
} }

View File

@ -6,20 +6,20 @@ cfg = {
bind = true, -- This is mandatory, otherwise border config won't get registered. bind = true, -- This is mandatory, otherwise border config won't get registered.
-- If you want to hook lspsaga or other signature handler, pls set to false -- If you want to hook lspsaga or other signature handler, pls set to false
doc_lines = 12, -- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated); doc_lines = 15, -- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated);
-- set to 0 if you DO NOT want any API comments be shown -- set to 0 if you DO NOT want any API comments be shown
-- This setting only take effect in insert mode, it does not affect signature help in normal -- This setting only take effect in insert mode, it does not affect signature help in normal
-- mode, 10 by default -- mode, 10 by default
floating_window = true, -- show hint in a floating window, set to false for virtual text only mode floating_window = true, -- show hint in a floating window, set to false for virtual text only mode
floating_window_above_cur_line = true, -- try to place the floating above the current line when possible Note: floating_window_above_cur_line = false, -- try to place the floating above the current line when possible Note:
-- will set to true when fully tested, set to false will use whichever side has more space -- will set to true when fully tested, set to false will use whichever side has more space
-- this setting will be helpful if you do not want the PUM and floating win overlap -- this setting will be helpful if you do not want the PUM and floating win overlap
floating_window_off_x = 1, -- adjust float windows x position. floating_window_off_x = 1, -- adjust float windows x position.
floating_window_off_y = -1, -- adjust float windows y position. floating_window_off_y = -1, -- adjust float windows y position.
fix_pos = false, -- set to true, the floating window will not auto-close until finish all parameters fix_pos = true, -- set to true, the floating window will not auto-close until finish all parameters
hint_enable = true, -- virtual hint enable hint_enable = true, -- virtual hint enable
hint_prefix = "", -- Panda for parameter hint_prefix = "", -- Panda for parameter
hint_scheme = "String", hint_scheme = "String",