feat: add new Telescope extensions including frecency, undo tree, and recent files
This commit is contained in:
+2
-2
@@ -32,7 +32,7 @@ M.alpha = {
|
||||
-- stylua: ignore start
|
||||
dashboard.section.buttons.val = {
|
||||
---@diagnostic disable: param-type-mismatch
|
||||
dashboard.button("f", " " .. " Find file", [[<cmd>lua require("data.func").frecency_picker() <cr>]]),
|
||||
dashboard.button("f", " " .. " Find file", LazyVim.pick("find_files")),
|
||||
dashboard.button("n", " " .. " New file", [[<cmd> ene <BAR> startinsert <cr>]]),
|
||||
dashboard.button("r", " " .. " Recent files", LazyVim.pick("oldfiles")),
|
||||
dashboard.button("g", " " .. " Grep text", LazyVim.pick("live_grep")),
|
||||
@@ -64,7 +64,7 @@ M.alpha = {
|
||||
M.dashboard_nvim = {
|
||||
choices = {
|
||||
{ -- Find File
|
||||
action = 'lua require("data.func".frecency_picker()()',
|
||||
action = 'lua LazyVim.pick("find_files")()',
|
||||
desc = " Find File",
|
||||
icon = " ",
|
||||
key = "f",
|
||||
|
||||
@@ -515,19 +515,6 @@ function M.dump_buffer_to_table(register)
|
||||
vim.fn.setreg(register, output)
|
||||
end
|
||||
|
||||
---@function Function to open the frecency picker
|
||||
---@return nil
|
||||
function M.frecency_picker()
|
||||
-- Trigger the picker
|
||||
require("telescope").extensions.frecency.frecency({ workspace = "CWD" })
|
||||
-- Remove `A` character that is added by the picker
|
||||
vim.api.nvim_feedkeys(
|
||||
vim.api.nvim_replace_termcodes("<BS>", true, true, true),
|
||||
"n",
|
||||
false
|
||||
)
|
||||
end
|
||||
|
||||
---@function Function to reload the user's Neovim configuration
|
||||
---@return nil
|
||||
function M.reload_config()
|
||||
|
||||
+56
-27
@@ -258,11 +258,6 @@ M.gist = {
|
||||
}
|
||||
|
||||
M.groups = {
|
||||
{ -- Icon picker menu
|
||||
lhs = "<leader>I",
|
||||
group = "IconPicker",
|
||||
icon = { icon = "", color = "orange" },
|
||||
},
|
||||
{ -- Gists menu
|
||||
lhs = "<leader>gn",
|
||||
group = "Gists",
|
||||
@@ -299,25 +294,6 @@ M.gx = {
|
||||
},
|
||||
}
|
||||
|
||||
M.iconpicker = {
|
||||
{ -- Pick Icon
|
||||
"<leader>Ii",
|
||||
"<cmd>IconPickerNormal<cr>",
|
||||
desc = "Pick Icon",
|
||||
},
|
||||
{ -- Yank Icon
|
||||
"<leader>Iy",
|
||||
"<cmd>IconPickerYank<cr>",
|
||||
desc = "Yank Icon",
|
||||
},
|
||||
{ -- Insert Icon in insert mode
|
||||
"<C-.>",
|
||||
"<cmd>IconPickerInsert<cr>",
|
||||
desc = "Insert Icon",
|
||||
mode = "i",
|
||||
},
|
||||
}
|
||||
|
||||
M.indentor = {
|
||||
{ -- Indentor
|
||||
"<C-i>",
|
||||
@@ -413,12 +389,12 @@ M.misc = {
|
||||
rhs = "<cmd>Neotree reveal toggle<cr>",
|
||||
desc = "Neotree toggle",
|
||||
},
|
||||
{ -- Telescope Frecency
|
||||
{ -- Telescope Find Files
|
||||
lhs = "<leader><leader>",
|
||||
rhs = function()
|
||||
require("data.func").frecency_picker()
|
||||
LazyVim.pick("find_files")()
|
||||
end,
|
||||
desc = "Telescope frecency",
|
||||
desc = "Find Files",
|
||||
},
|
||||
{ -- Exit Neovim
|
||||
lhs = "<leader>Q",
|
||||
@@ -713,6 +689,59 @@ M.overrides = {
|
||||
},
|
||||
}
|
||||
|
||||
M.telescope = {
|
||||
cmdline = {
|
||||
{
|
||||
":",
|
||||
function()
|
||||
require("telescope").extensions.cmdline.cmdline()
|
||||
end,
|
||||
desc = "Cmdline",
|
||||
},
|
||||
},
|
||||
lazy = {
|
||||
{
|
||||
"<leader>fz",
|
||||
function()
|
||||
require("telescope").extensions.lazy.lazy()
|
||||
end,
|
||||
desc = "Lazy Picker",
|
||||
},
|
||||
},
|
||||
symbols = {
|
||||
{ -- Telescope Symbols
|
||||
"<leader>f.",
|
||||
function()
|
||||
require("telescope.builtin").symbols({
|
||||
sources = { "emoji", "kaomoji", "gitmoji", "nerd", "math" },
|
||||
})
|
||||
end,
|
||||
desc = "Pick Icons",
|
||||
},
|
||||
{ -- Pick Icon in insert mode
|
||||
"<C-.>",
|
||||
function()
|
||||
require("telescope.builtin").symbols({
|
||||
sources = { "emoji", "kaomoji", "gitmoji", "nerd", "math" },
|
||||
})
|
||||
end,
|
||||
"i",
|
||||
|
||||
desc = "Pick Icon",
|
||||
},
|
||||
},
|
||||
toggleterm = {
|
||||
{ -- Pick ToggleTerms
|
||||
"<leader>ft",
|
||||
function()
|
||||
require("toggleterm-manager").open({})
|
||||
end,
|
||||
desc = "Pick Terminals",
|
||||
mode = "n",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
M.toggleterm = {
|
||||
{ -- Toggle Terminal
|
||||
"<c-/>",
|
||||
|
||||
@@ -455,6 +455,40 @@ M.gitblame = {
|
||||
},
|
||||
}
|
||||
|
||||
--- Telescope configuration options
|
||||
M.telescope = {
|
||||
cmdline = {
|
||||
extensions = {
|
||||
cmdline = {
|
||||
icons = {
|
||||
history = " ",
|
||||
command = " ",
|
||||
number = " ",
|
||||
system = "",
|
||||
unknown = "",
|
||||
},
|
||||
picker = {
|
||||
layout_config = {
|
||||
width = vim.fn.floor(vim.o.columns * 0.25),
|
||||
height = vim.fn.floor(vim.o.lines * 0.25),
|
||||
},
|
||||
},
|
||||
completions = {
|
||||
"command",
|
||||
},
|
||||
mappings = {
|
||||
complete = "<Tab>",
|
||||
run_selection = "<C-CR>",
|
||||
run_input = "<CR>",
|
||||
},
|
||||
overseer = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
--- Neocodeium configuration options
|
||||
M.neocodeium = {
|
||||
opts = {
|
||||
|
||||
Reference in New Issue
Block a user