mirror of
https://github.com/TheM1Stery/dotfiles.git
synced 2025-04-20 00:51:11 +00:00
feat: add nav-buddy
This commit is contained in:
parent
5f4a30c8cc
commit
5d5d7f6e27
@ -36,6 +36,7 @@
|
|||||||
"nvim-dap-ui": { "branch": "master", "commit": "334cf3038c4756e6ab999cbac67c847fb654c190" },
|
"nvim-dap-ui": { "branch": "master", "commit": "334cf3038c4756e6ab999cbac67c847fb654c190" },
|
||||||
"nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" },
|
"nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "d70633830acf605ec03d9728698d9e7232442eb4" },
|
"nvim-lspconfig": { "branch": "master", "commit": "d70633830acf605ec03d9728698d9e7232442eb4" },
|
||||||
|
"nvim-navbuddy": { "branch": "master", "commit": "f22bac988f2dd073601d75ba39ea5636ab6e38cb" },
|
||||||
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
|
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "632024157d01e8bc48fd7df6a7de8ffe3fdd4f3a" },
|
"nvim-nio": { "branch": "master", "commit": "632024157d01e8bc48fd7df6a7de8ffe3fdd4f3a" },
|
||||||
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
||||||
|
@ -27,6 +27,7 @@ return {
|
|||||||
|
|
||||||
-- extras
|
-- extras
|
||||||
"SmiteshP/nvim-navic",
|
"SmiteshP/nvim-navic",
|
||||||
|
"SmiteshP/nvim-navbuddy",
|
||||||
"Decodetalkers/csharpls-extended-lsp.nvim",
|
"Decodetalkers/csharpls-extended-lsp.nvim",
|
||||||
|
|
||||||
-- rust
|
-- rust
|
||||||
@ -122,12 +123,15 @@ return {
|
|||||||
|
|
||||||
local navic = require("nvim-navic")
|
local navic = require("nvim-navic")
|
||||||
|
|
||||||
|
local navbuddy = require("nvim-navbuddy")
|
||||||
|
|
||||||
lsp.on_attach(function(client, bufnr)
|
lsp.on_attach(function(client, bufnr)
|
||||||
local opts = { buffer = bufnr, remap = false }
|
local opts = { buffer = bufnr, remap = false }
|
||||||
lsp.default_keymaps({ buffer = bufnr })
|
lsp.default_keymaps({ buffer = bufnr })
|
||||||
vim.lsp.inlay_hint.enable(true)
|
vim.lsp.inlay_hint.enable(true)
|
||||||
if client.server_capabilities.documentSymbolProvider then
|
if client.server_capabilities.documentSymbolProvider then
|
||||||
navic.attach(client, bufnr)
|
navic.attach(client, bufnr)
|
||||||
|
navbuddy.attach(client, bufnr)
|
||||||
end
|
end
|
||||||
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||||
vim.keymap.set("n", "<leader>dc", function() vim.lsp.buf.hover() end, opts)
|
vim.keymap.set("n", "<leader>dc", function() vim.lsp.buf.hover() end, opts)
|
||||||
@ -137,11 +141,13 @@ return {
|
|||||||
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
|
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
|
||||||
-- for the code action key map to work you need to change key binding('.' symbol) of your terminal, otherwise it won't work
|
-- for the code action key map to work you need to change key binding('.' symbol) of your terminal, otherwise it won't work
|
||||||
vim.keymap.set("n", "<C-.>", function() vim.lsp.buf.code_action() end, opts)
|
vim.keymap.set("n", "<C-.>", function() vim.lsp.buf.code_action() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
|
vim.keymap.set("n", "<leader>drr", function() vim.lsp.buf.references() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
||||||
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
||||||
-- sometimes lsp fails, we can restart it with this keymap
|
-- sometimes lsp fails, we can restart it with this keymap
|
||||||
vim.keymap.set('n', "<leader>lr", vim.cmd.LspRestart, opts)
|
vim.keymap.set('n', "<leader>lr", vim.cmd.LspRestart, opts)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>nv", function() navbuddy.open() end, opts)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
require("mason").setup({});
|
require("mason").setup({});
|
||||||
@ -172,7 +178,7 @@ return {
|
|||||||
float = {
|
float = {
|
||||||
style = 'minimal',
|
style = 'minimal',
|
||||||
border = 'rounded',
|
border = 'rounded',
|
||||||
source = 'always',
|
source = true,
|
||||||
header = '',
|
header = '',
|
||||||
prefix = '',
|
prefix = '',
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user