Skip to content

Commit

Permalink
update telescope keybindings
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesChung committed Jul 7, 2024
1 parent 0b9cab9 commit 50f3f60
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 13 deletions.
7 changes: 0 additions & 7 deletions lua/config/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,3 @@ vim.api.nvim_set_keymap("v", "˚", ":m '<-2<CR>gv=gv", { noremap = true })

-- Remap space to be leader rather than the default backslash key
vim.api.nvim_set_keymap("n", "<Space>", "<Leader>", { noremap = true })

-- Set nvim-telescope/telescope.nvim keybindings
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>tf', builtin.find_files, {})
vim.keymap.set('n', '<leader>tg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>tb', builtin.buffers, {})
vim.keymap.set('n', '<leader>th', builtin.help_tags, {})
28 changes: 28 additions & 0 deletions lua/plugins/telescope.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
return {
{
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
keys = {
{
"<leader>tf",
"<Cmd>Telescope find_files<CR>",
desc = "Find Files (Telescope)",
},
{
"<leader>tg",
"<Cmd>Telescope live_grep<CR>",
desc = "Live Grep (Telescope)",
},
{
"<leader>tb",
"<Cmd>Telescope buffers<CR>",
desc = "Show Buffers (Telescope)",
},
{
"<leader>th",
"<Cmd>Telescope help_tags<CR>",
desc = "Show help tags (Telescope)",
},
},
},
}
6 changes: 3 additions & 3 deletions lua/plugins/todo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ return {
"<leader>td",
"<Cmd>TodoTelescope<CR>",
desc = "Toggle todo list (todo-comments)",
}
}
}
},
},
},
}
6 changes: 3 additions & 3 deletions lua/plugins/trouble.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ return {
"<leader>tt",
"<cmd>Trouble diagnostics toggle<cr>",
desc = "Diagnostics (Trouble)",
}
}
}
},
},
},
}

0 comments on commit 50f3f60

Please sign in to comment.