Skip to content

Commit

Permalink
update lsp keymap
Browse files Browse the repository at this point in the history
  • Loading branch information
ShortArrow committed Apr 12, 2024
1 parent e5aea7b commit 0f7df04
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions nvim/lua/my/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ M.maps = {
desc = "Rust Code Action Group"
},
},
telescope = {
{ "<Leader>ff", require("telescope.builtin").find_files(), desc = "Telescope find_files" },
{ "<Leader>fg", require("telescope.builtin").live_grep(), desc = "Telescope live_grep" },
{ "<Leader>fb", require("telescope.builtin").buffers(), desc = "Telescope buffers" },
{ "<Leader>fh", require("telescope.builtin").help_tags(), desc = "Telescope help_tags" },
{ "<Leader>cb", require("telescope.builtin").current_buffer_fuzzy_find(), desc = "Telescope current_buffer_fuzzy_find" },
{ "<Leader>fm", require('telescope').extensions.media_files.media_files(), desc = "Telescope media_files" },
},
neotest = {
{ "ntr", function() require("neotest").run.run() end, desc = "Neo Test Run (nearest run)" },
{ "ntt", function() require("neotest").summary.toggle() end, desc = "Neo Test Summary Open (NeoTest Open)" },
Expand Down Expand Up @@ -113,7 +105,7 @@ M.maps = {
{ "<Leader>dvo", ":DiffviewOpen<CR>" },
},
whichkey = {
{ "<Leader>k", ":WhichKey<CR>" },
{ "<Leader>km", ":WhichKey<CR>" },
},
flutter = {
{ mode = "n", "<Leader>fr", ":FlutterRun -d web-server<CR>", desc = "Flutter Run" },
Expand All @@ -131,11 +123,6 @@ M.maps = {
vfiler = {
{ "<Leader>vf", ":VFiler<CR>" },
},
floaterm = {
{ "<Leader>fn", ":FloatermNew<CR>", desc = "Floaterm normal" },
{ "<Leader>flg", ":FloatermNew lg<CR>", desc = "Floaterm lazygit" },
{ "<Leader>flzd", ":FloatermNew lzd<CR>", desc = "Floaterm lazydocker" },
},
toggleterm = {
{
"<Leader>tt",
Expand All @@ -152,6 +139,26 @@ M.maps = {
-- { mode = 'i', '', '<Esc><C-o>/', },
-- { mode = 't', '', '<C-Bslash><C-n>/', },
},
floaterm = {
{ "<Leader>fn", ":FloatermNew<CR>", desc = "Floaterm normal" },
{ "<Leader>flg", ":FloatermNew lg<CR>", desc = "Floaterm lazygit" },
{ "<Leader>flzd", ":FloatermNew lzd<CR>", desc = "Floaterm lazydocker" },
},
telescope = {
{ "<Leader>ff", function() require("telescope.builtin").find_files() end, desc = "Telescope find_files" },
{ "<Leader>fg", function() require("telescope.builtin").live_grep() end, desc = "Telescope live_grep" },
{ "<Leader>fb", function() require("telescope.builtin").buffers() end, desc = "Telescope buffers" },
{ "<Leader>fh", function() require("telescope.builtin").help_tags() end, desc = "Telescope help_tags" },
{ "<Leader>cb", function() require("telescope.builtin").current_buffer_fuzzy_find() end, desc = "Telescope current_buffer_fuzzy_find" },
{ "<Leader>fm", function() require('telescope').extensions.media_files.media_files() end, desc = "Telescope media_files" },
{ "<Leader>cs", function() require("telescope.builtin").commands() end, desc = "Telescope commands" },
{ "<Leader>li", function() require("telescope.builtin").lsp_implementations() end, desc = "Telescope implementations" },
{ "<F12>", function() require("telescope.builtin").lsp_definitions() end, desc = "Telescope difinitions" },
{ "gd", function() require("telescope.builtin").lsp_definitions() end, desc = "Telescope difinitions" },
-- back is <C-o>
{ "<Leader>lt", function() require("telescope.builtin").lsp_type_definitions() end, desc = "Telescope type_definitions" },
{ "<S-F12>", function() require("telescope.builtin").lsp_references() end, desc = "Telescope references" },
},
lspsaga = {
{ mode = "n", "<Leader>ln", ":Lspsaga rename<CR>", desc = "rename (lspsaga)" },
{ mode = "n", "<Leader>la", ":Lspsaga code_action<CR>", desc = "Code Action (lspsaga)" },
Expand Down

0 comments on commit 0f7df04

Please sign in to comment.