nvim: use lsp.signature_help() instead of extra plugin
This commit is contained in:
1 parent
2771cfbf27
commit
9f33e03463
4 files changed
+3
-8
No files matched your search
@@ -34,6 +34,8 @@ map("n", "<leader>ld", "<cmd> Telescope lsp_definitions<CR>", default_opts) -- S
|
|||||||
map("n", "<leader>le", "<cmd> Telescope diagnostics<CR>", default_opts) -- Show errors and warnings
|
map("n", "<leader>le", "<cmd> Telescope diagnostics<CR>", default_opts) -- Show errors and warnings
|
||||||
map("n", "<leader>lf", "<cmd> lua vim.lsp.buf.format {async = true }<CR>", default_opts) -- Format buffer with LSP
|
map("n", "<leader>lf", "<cmd> lua vim.lsp.buf.format {async = true }<CR>", default_opts) -- Format buffer with LSP
|
||||||
map("n", "<leader>lh", "<cmd> lua vim.lsp.buf.hover()<CR>", default_opts) -- Show info of symbol (double tap to enter)
|
map("n", "<leader>lh", "<cmd> lua vim.lsp.buf.hover()<CR>", default_opts) -- Show info of symbol (double tap to enter)
|
||||||
|
map("i", "<C-l>", "<cmd> lua vim.lsp.buf.signature_help()<CR>", default_opts) -- Show function signature
|
||||||
|
map("n", "<C-l>", "<cmd> lua vim.lsp.buf.signature_help()<CR>", default_opts) -- Show function signature
|
||||||
map("n", "<leader>ln", "<cmd> lua vim.lsp.buf.rename()<CR>", default_opts) -- Rename LSP symbol
|
map("n", "<leader>ln", "<cmd> lua vim.lsp.buf.rename()<CR>", default_opts) -- Rename LSP symbol
|
||||||
map("n", "<leader>lr", "<cmd> Telescope lsp_references<CR>", default_opts) -- Show all LSP references
|
map("n", "<leader>lr", "<cmd> Telescope lsp_references<CR>", default_opts) -- Show all LSP references
|
||||||
map("n", "<leader>ls", "<cmd> Telescope lsp_workspace_symbols<CR>", default_opts) -- Search for LSP symbols
|
map("n", "<leader>ls", "<cmd> Telescope lsp_workspace_symbols<CR>", default_opts) -- Search for LSP symbols
|
||||||
@@ -72,8 +74,7 @@ wk.register({
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- Telescope + telescope-symbols
|
-- Telescope + telescope-symbols
|
||||||
map("n", "<leader>ie", "<cmd> lua require'telescope.builtin'.symbols{ sources = { 'emoji', 'gitmoji' } }<CR>",
|
map("n", "<leader>ie", "<cmd> lua require'telescope.builtin'.symbols{ sources = { 'emoji', 'gitmoji' } }<CR>", default_opts) -- Show emojis
|
||||||
default_opts) -- Show emojis
|
|
||||||
map("n", "<leader>im", "<cmd> lua require'telescope.builtin'.symbols{ sources = { 'julia' } }<CR>", default_opts) -- Show math symbols
|
map("n", "<leader>im", "<cmd> lua require'telescope.builtin'.symbols{ sources = { 'julia' } }<CR>", default_opts) -- Show math symbols
|
||||||
map("n", "<leader>in", "<cmd> lua require'telescope.builtin'.symbols{ sources = { 'nerd' } }<CR>", default_opts) -- Show nerd icons
|
map("n", "<leader>in", "<cmd> lua require'telescope.builtin'.symbols{ sources = { 'nerd' } }<CR>", default_opts) -- Show nerd icons
|
||||||
wk.register({
|
wk.register({
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ return require('packer').startup(function(use)
|
|||||||
requires = {
|
requires = {
|
||||||
"williamboman/nvim-lsp-installer", -- Easy to install LSP servers
|
"williamboman/nvim-lsp-installer", -- Easy to install LSP servers
|
||||||
"simrat39/rust-tools.nvim", -- Cooler LSP stuff for Rust
|
"simrat39/rust-tools.nvim", -- Cooler LSP stuff for Rust
|
||||||
"ray-x/lsp_signature.nvim" -- show function signatures, when typing
|
|
||||||
},
|
},
|
||||||
config = function() require('plugins.nvim-lspconfig-conf') end,
|
config = function() require('plugins.nvim-lspconfig-conf') end,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -25,10 +25,6 @@ local sig = require('lsp_signature') -- function signatures
|
|||||||
|
|
||||||
function my_attach (client, bufnr)
|
function my_attach (client, bufnr)
|
||||||
navic.attach(client, bufnr) -- breadcrumbs
|
navic.attach(client, bufnr) -- breadcrumbs
|
||||||
sig.on_attach({
|
|
||||||
floating_window = false,
|
|
||||||
hint_prefix = ""
|
|
||||||
}, bufnr) -- function signatures
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Normal LSPs
|
-- Normal LSPs
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
require("nvim-tree").setup()
|
|
||||||
Reference in new issue
Block a user