summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--after/plugin/lsp.lua10
-rw-r--r--lua/core/binds.lua10
-rw-r--r--lua/core/plugins.lua1
3 files changed, 14 insertions, 7 deletions
diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua
index 8ec7f13..4e5d3fa 100644
--- a/after/plugin/lsp.lua
+++ b/after/plugin/lsp.lua
@@ -11,11 +11,11 @@ local function lsp_keymaps(bufnr)
-- LSP actions
map('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>')
- map('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>')
- map('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>')
- map('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>')
- map('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>')
- map('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>')
+ map('n', 'gD', '<cmd>lua vim.lsp.buf.definition()<cr>')
+ -- map('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>')
+ map('n', 'gI', '<cmd>lua vim.lsp.buf.implementation()<cr>')
+ map('n', 'gY', '<cmd>lua vim.lsp.buf.type_definition()<cr>')
+ map('n', 'gR', '<cmd>lua vim.lsp.buf.references()<cr>')
map('n', '<S-Tab>', '<cmd>lua vim.lsp.buf.signature_help()<cr>')
map('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>')
map('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>')
diff --git a/lua/core/binds.lua b/lua/core/binds.lua
index 7a7fce0..66a2af5 100644
--- a/lua/core/binds.lua
+++ b/lua/core/binds.lua
@@ -59,8 +59,14 @@ a.nvim_create_autocmd('FileType', {
})
-- plugin binds ---------------------------------------------------------------
--- treesj
-local treesj = require('treesj')
+
+-- pretty lsp view
+map('n', 'gd', '<CMD>Glance definitions<CR>')
+map('n', 'gr', '<CMD>Glance references<CR>')
+map('n', 'gy', '<CMD>Glance type_definitions<CR>')
+map('n', 'gi', '<CMD>Glance implementations<CR>')
+
+local treesj = require('treesj') -- treesj
map('n', '<leader>j', treesj.toggle)
-- telescope
diff --git a/lua/core/plugins.lua b/lua/core/plugins.lua
index 40ca880..5ad5474 100644
--- a/lua/core/plugins.lua
+++ b/lua/core/plugins.lua
@@ -90,6 +90,7 @@ require 'dep' {
-- lsp ----------------------------------------------------------------------
{ 'neovim/nvim-lspconfig' },
{ 'j-hui/fidget.nvim' }, -- shows lsp progress
+ { 'dnlhc/glance.nvim' }, -- diagnostic info at a glance
{ 'folke/trouble.nvim' },
-- optional language specific lsp's