Add descriptions to telescope keymaps and removed viml, change style of colorscheme selection
This commit is contained in:
parent
8b714fabfa
commit
e3762ced4e
@ -4,15 +4,18 @@ return {
|
|||||||
version = '0.1.*',
|
version = '0.1.*',
|
||||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
config = function()
|
config = function()
|
||||||
local opts = { noremap = true, silent = true }
|
local telescope = require("telescope.builtin")
|
||||||
vim.keymap.set("n", "<leader>gh", require("telescope.builtin").git_bcommits, opts)
|
local wk = require("which-key")
|
||||||
vim.keymap.set("n", "<leader>gb", require("telescope.builtin").git_branches, opts)
|
wk.add({
|
||||||
vim.keymap.set("n", "<leader>gs", require("telescope.builtin").git_status, opts)
|
{ "<leader>gh", telescope.git_bcommits, { noremap = true, silent = true, group = "git", desc = "View commits of current buffer" } },
|
||||||
vim.keymap.set('n', '<Leader>ff', '<cmd>lua require(\'telescope.builtin\').git_files()<CR>', opts)
|
{ "<leader>gb", telescope.git_branches, { noremap = true, silent = true, group = "git", desc = "View git branches" } },
|
||||||
vim.keymap.set('n', '<Leader>fg', '<cmd>lua require(\'telescope.builtin\').live_grep()<CR>', opts)
|
{ "<leader>gs", telescope.git_status, { noremap = true, silent = true, group = "git", desc = "View git status" } },
|
||||||
vim.keymap.set('n', '<Leader>fb', '<cmd>lua require(\'telescope.builtin\').buffers()<CR>', opts)
|
{ '<Leader>ff', telescope.git_files, { noremap = true, silent = true, desc = "Search files" } },
|
||||||
vim.keymap.set('n', '<Leader>fh', '<cmd>lua require(\'telescope.builtin\').help_tags()<CR>', opts)
|
{ '<Leader>fg', telescope.live_grep, { noremap = true, silent = true, desc = "Search in files" } },
|
||||||
vim.keymap.set('n', '<leader>cc', '<cmd>Telescope colorscheme<CR>')
|
{ '<Leader>fb', telescope.buffers, { noremap = true, silent = true, desc = "Search in buffers" } },
|
||||||
|
{ '<Leader>fh', telescope.help_tags, { noremap = true, silent = true, desc = "Search in help" } },
|
||||||
|
{ '<leader>cc', telescope.colorscheme, { desc = "Select colorscheme" } },
|
||||||
|
})
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -20,9 +23,21 @@ return {
|
|||||||
dependencies = { 'nvim-telescope/telescope.nvim' },
|
dependencies = { 'nvim-telescope/telescope.nvim' },
|
||||||
config = function()
|
config = function()
|
||||||
require("telescope").setup {
|
require("telescope").setup {
|
||||||
|
defaults = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<C-h>"] = "which_key"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pickers = {
|
||||||
|
colorscheme = {
|
||||||
|
theme = "dropdown"
|
||||||
|
}
|
||||||
|
},
|
||||||
extensions = {
|
extensions = {
|
||||||
["ui-select"] = {
|
["ui-select"] = {
|
||||||
require("telescope.themes").get_dropdown()
|
require("telescope.themes").get_cursor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user