11local bind = require (" keymap.bind" )
22local map_cr = bind .map_cr
33local map_callback = bind .map_callback
4+ require (" keymap.helpers" )
45
56local mappings = {
67 fmt = {
@@ -26,14 +27,7 @@ function M.lsp(buf)
2627 :with_buffer (buf )
2728 :with_desc (" lsp: Toggle outline" ),
2829 [" n|gto" ] = map_callback (function ()
29- if require (" core.settings" ).search_backend == " fzf" then
30- local prompt_position = require (" telescope.config" ).values .layout_config .horizontal .prompt_position
31- require (" fzf-lua" ).lsp_document_symbols ({
32- fzf_opts = { [" --layout" ] = prompt_position == " top" and " reverse" or " default" },
33- })
34- else
35- require (" telescope.builtin" ).lsp_document_symbols ()
36- end
30+ _picker (" lsp_document_symbols" )
3731 end )
3832 :with_silent ()
3933 :with_buffer (buf )
@@ -67,13 +61,25 @@ function M.lsp(buf)
6761 :with_silent ()
6862 :with_buffer (buf )
6963 :with_desc (" lsp: Code action for cursor" ),
70- [" n|gd" ] = map_cr (" Glance definitions" ):with_silent ():with_buffer (buf ):with_desc (" lsp: Preview definition" ),
71- [" n|gD" ] = map_cr (" Lspsaga goto_definition" ):with_silent ():with_buffer (buf ):with_desc (" lsp: Goto definition" ),
72- [" n|gh" ] = map_cr (" Glance references" ):with_silent ():with_buffer (buf ):with_desc (" lsp: Show reference" ),
73- [" n|gm" ] = map_cr (" Glance implementations" )
64+ [" n|gd" ] = map_cr (" Lspsaga peek_definition" )
7465 :with_silent ()
7566 :with_buffer (buf )
76- :with_desc (" lsp: Show implementation" ),
67+ :with_desc (" lsp: Preview definition" ),
68+ [" n|gD" ] = map_cr (" Lspsaga goto_definition" ):with_silent ():with_buffer (buf ):with_desc (" lsp: Goto definition" ),
69+ [" n|gh" ] = map_callback (function ()
70+ _picker (" lsp_references" )
71+ end )
72+ :with_noremap ()
73+ :with_nowait ()
74+ :with_silent ()
75+ :with_desc (" lsp: show finder" ),
76+ [" n|gm" ] = map_callback (function ()
77+ _picker (" lsp_implementations" )
78+ end )
79+ :with_noremap ()
80+ :with_nowait ()
81+ :with_silent ()
82+ :with_desc (" lsp: show implementations" ),
7783 [" n|gci" ] = map_cr (" Lspsaga incoming_calls" )
7884 :with_silent ()
7985 :with_buffer (buf )
0 commit comments