feat: add lsp definition previewer
This commit is contained in:
parent
6a11e858fb
commit
bb99479014
3 changed files with 14 additions and 2 deletions
|
@ -12,8 +12,8 @@
|
|||
"dressing.nvim": { "branch": "master", "commit": "6ef1ca479d37d4ff66f13eed44d08912caff483a" },
|
||||
"formatter.nvim": { "branch": "master", "commit": "eb89a1f3e079f1b9680bc7293b75fffccb5e1598" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "4daf7022f1481edf1e8fb9947df13bb07c18e89a" },
|
||||
"goto-preview": { "branch": "main", "commit": "8a671ae123532bd7a8393ed2b1475bb40baf968f" },
|
||||
"incline.nvim": { "branch": "main", "commit": "16fc9c073e3ea4175b66ad94375df6d73fc114c0" },
|
||||
"inlay-hint.nvim": { "branch": "main", "commit": "eb5f0579537db271dfedd7f38460cdacb238176f" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "b1134ab82ee4279e31f7ddf7e34b2a99eb9b7bc9" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" },
|
||||
"lsp-zero.nvim": { "branch": "v4.x", "commit": "19a8b90340c6c522219c84f7befe784d657ab28e" },
|
||||
|
|
|
@ -15,6 +15,11 @@ vim.opt.rtp:prepend(lazypath)
|
|||
|
||||
require("lazy").setup({
|
||||
--: Behaviour {{{
|
||||
{
|
||||
"rmagatti/goto-preview",
|
||||
event = "BufEnter",
|
||||
config = true, -- necessary as per https://github.com/rmagatti/goto-preview/issues/88
|
||||
},
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua",
|
||||
|
|
|
@ -4,6 +4,7 @@ wk.add({
|
|||
{ "<leader>bt", "<cmd>BlameToggle virtual<cr>", desc = "Toggle Virtual Blame" },
|
||||
{ "<leader>c", desc = "NerdCommenter" },
|
||||
{ "<leader>f", desc = "Telescope - Finder" },
|
||||
|
||||
{ "<leader>fb", "<cmd>Telescope buffers<CR>", desc = "Find Open Buffers" },
|
||||
{ "<leader>ff", require("telescope").extensions.file_browser.file_browser, desc = "Find File" },
|
||||
{ "<leader>fg", "<cmd>Telescope live_grep<CR>", desc = "Live Grep" },
|
||||
|
@ -11,17 +12,23 @@ wk.add({
|
|||
{ "<leader>fi", "<cmd>Telescope builtin<cr>", desc = "Search all Telescope builtins" },
|
||||
{ "<leader>ft", "<cmd>TodoTelescope <cr>", desc = "Open Todo in Telescope" },
|
||||
{ "<leader>fu", "<cmd>UrlView<cr>", desc = "Display and open URLs in current buffer" },
|
||||
|
||||
{ "<leader>n", desc = "Terminal" },
|
||||
{ "<leader>nb", "<cmd>lua _Lazygit_toggle()<CR>", desc = "Open Lazygit" },
|
||||
{ "<leader>nj", "<cmd>ToggleTerm<CR>", desc = "Open Terminal" },
|
||||
|
||||
{ "<leader>r", "<cmd>lua vim.lsp.buf.rename()<CR>", desc = "Rename a token" },
|
||||
{ "<leader>t1", "<Cmd>BufferGoto 1<CR>", desc = "Go to Buffer 1" },
|
||||
{ "<leader>td", "<Cmd>BufferClose<CR>", desc = "Close Current Buffer" },
|
||||
|
||||
{ "<leader>x", desc = "Toggle Trouble" },
|
||||
{ "<leader>xl", "<cmd>Trouble loclist toggle<cr>", desc = "" },
|
||||
{ "<leader>xq", "<cmd>Trouble quickfix toggle<cr>", desc = "" },
|
||||
{ "<leader>xr", "<cmd>Trouble lsp_references toggle<cr>", desc = "" },
|
||||
{ "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Open Trouble" },
|
||||
{ "<leader>tt", require("telescope").extensions.file_browser.file_browser, desc = "Open the file browser" },
|
||||
|
||||
{ "/", require("telescope.builtin").current_buffer_fuzzy_find, desc = "Search for a string in the current buffer" },
|
||||
|
||||
{ "<leader>gpd", require("goto-preview").goto_preview_definition, desc = "Open definition preview" },
|
||||
{ "<leader>gpt", require("goto-preview").goto_preview_type_definition, desc = "Open type definition preview" },
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue