1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Use glance.nvim for lsp references/implementations preview (#388)

This commit is contained in:
jdhao 2025-03-30 17:55:51 +02:00 committed by GitHub
parent a8a1b92921
commit 12147bec86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 1 deletions

12
lua/config/glance.lua Normal file
View File

@ -0,0 +1,12 @@
local glance = require("glance")
glance.setup {
height = 25,
border = {
enable = true,
},
}
vim.keymap.set("n", "<space>gd", "<cmd>Glance definitions<cr>")
vim.keymap.set("n", "<space>gr", "<cmd>Glance references<cr>")
vim.keymap.set("n", "<space>gi", "<cmd>Glance implementations<cr>")

View File

@ -47,7 +47,13 @@ local plugin_specs = {
require("config.lsp")
end,
},
{
"dnlhc/glance.nvim",
config = function()
require("config.glance")
end,
envnt = "VeryLazy",
},
{
"nvim-treesitter/nvim-treesitter",
event = "VeryLazy",