mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-11-17 20:36:25 +00:00
Add signature help
This commit is contained in:
parent
eebddac3de
commit
2eba3d8bc6
@ -275,6 +275,19 @@ use({
|
||||
end,
|
||||
})
|
||||
|
||||
use({
|
||||
"ray-x/lsp_signature.nvim",
|
||||
config = function()
|
||||
require("lsp_signature").setup({
|
||||
extra_trigger_chars = { "(", "," },
|
||||
auto_close_after = nil,
|
||||
-- Toggle these to use hint only
|
||||
floating_window = true,
|
||||
hint_enable = false,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
-- Fuzzy Finder
|
||||
use({
|
||||
"nvim-telescope/telescope.nvim",
|
||||
|
@ -90,12 +90,14 @@ local function get_default_attach(override_capabilities)
|
||||
lsp_keymap("p", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts)
|
||||
lsp_keymap("n", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
|
||||
|
||||
-- Set insert keymap for signature help
|
||||
buf_set_keymap("i", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
||||
|
||||
-- Older keymaps
|
||||
buf_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
||||
buf_set_keymap("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
||||
buf_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
||||
buf_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
|
||||
buf_set_keymap("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
||||
buf_set_keymap("n", "<leader>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
|
||||
buf_set_keymap("n", "<leader>wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", opts)
|
||||
buf_set_keymap("n", "<leader>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", opts)
|
||||
|
Loading…
Reference in New Issue
Block a user