mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
chore: switch Telescope to primary search
This commit is contained in:
@@ -14,31 +14,31 @@ fzf_lua.setup({
|
||||
})
|
||||
|
||||
-- Keymaps
|
||||
keymap("n", "<C-p>", [[<Cmd>:FzfLua files<CR>]], opts)
|
||||
keymap("n", "<leader>b", [[<Cmd>:FzfLua buffers<CR>]], opts)
|
||||
keymap("n", "<leader>zbl", [[<Cmd>:FzfLua blines<CR>]], opts)
|
||||
keymap("n", "<leader>zf", [[<Cmd>:FzfLua files<CR>]], opts)
|
||||
keymap("n", "<leader>zg", [[<Cmd>:FzfLua grep<CR>]], opts)
|
||||
keymap("n", "<leader>zgb", [[<Cmd>:FzfLua git_branches<CR>]], opts)
|
||||
keymap("n", "<leader>zgc", [[<Cmd>:FzfLua git_commits<CR>]], opts)
|
||||
keymap("n", "<leader>zgl", [[<Cmd>:FzfLua grep_last<CR>]], opts)
|
||||
keymap("n", "<leader>zgp", [[<Cmd>:FzfLua grep_project<CR>]], opts)
|
||||
keymap("n", "<leader>zgs", [[<Cmd>:FzfLua git_status<CR>]], opts)
|
||||
keymap("n", "<leader>zgst", [[<Cmd>:FzfLua git_stash<CR>]], opts)
|
||||
keymap("n", "<leader>zgv", [[<Cmd>:FzfLua grep_visual<CR>]], opts)
|
||||
keymap("n", "<leader>zgw", [[<Cmd>:FzfLua grep_cword<CR>]], opts)
|
||||
keymap("n", "<leader>zh", [[<Cmd>:FzfLua oldfiles<CR>]], opts)
|
||||
keymap("n", "<leader>zl", [[<Cmd>:FzfLua lines<CR>]], opts)
|
||||
keymap("n", "<leader>zlca", [[<Cmd>:FzfLua code_actions<CR>]], opts)
|
||||
keymap("n", "<leader>zld", [[<Cmd>:FzfLua lsp_definitions<CR>]], opts)
|
||||
keymap("n", "<leader>zlds", [[<Cmd>:FzfLua lsp_document_symbols<CR>]], opts)
|
||||
keymap("n", "<leader>zlg", [[<Cmd>:FzfLua live_grep<CR>]], opts)
|
||||
keymap("n", "<leader>zlgr", [[<Cmd>:FzfLua live_grep_resume<CR>]], opts)
|
||||
keymap("n", "<leader>zlr", [[<Cmd>:FzfLua lsp_references<CR>]], opts)
|
||||
keymap("n", "<leader>zltd", [[<Cmd>:FzfLua lsp_typedef<CR>]], opts)
|
||||
keymap("n", "<leader>zlws", [[<Cmd>:FzfLua lsp_live_workspace_symbols<CR>]], opts)
|
||||
keymap("n", "<leader>zm", [[<Cmd>:FzfLua marks<CR>]], opts)
|
||||
keymap("n", "<leader>zqfq", [[<Cmd>:FzfLua quickfix<CR>]], opts)
|
||||
keymap("n", "<leader>zr", [[<Cmd>:FzfLua resume<CR>]], opts)
|
||||
keymap("n", "<leader>zss", [[<Cmd>:FzfLua spell_suggest<CR>]], opts)
|
||||
keymap("n", "<leader>ztg", [[<Cmd>:FzfLua tabs<CR>]], opts)
|
||||
-- keymap("n", "<C-p>", [[<Cmd>:FzfLua files<CR>]], opts)
|
||||
-- keymap("n", "<leader>b", [[<Cmd>:FzfLua buffers<CR>]], opts)
|
||||
keymap("n", "<leader>zbl", [[<Cmd>FzfLua blines<CR>]], opts)
|
||||
keymap("n", "<leader>zf", [[<Cmd>FzfLua files<CR>]], opts)
|
||||
keymap("n", "<leader>zg", [[<Cmd>FzfLua grep<CR>]], opts)
|
||||
keymap("n", "<leader>zgb", [[<Cmd>FzfLua git_branches<CR>]], opts)
|
||||
keymap("n", "<leader>zgc", [[<Cmd>FzfLua git_commits<CR>]], opts)
|
||||
keymap("n", "<leader>zgl", [[<Cmd>FzfLua grep_last<CR>]], opts)
|
||||
keymap("n", "<leader>zgp", [[<Cmd>FzfLua grep_project<CR>]], opts)
|
||||
keymap("n", "<leader>zgs", [[<Cmd>FzfLua git_status<CR>]], opts)
|
||||
keymap("n", "<leader>zgst", [[<Cmd>FzfLua git_stash<CR>]], opts)
|
||||
keymap("n", "<leader>zgv", [[<Cmd>FzfLua grep_visual<CR>]], opts)
|
||||
keymap("n", "<leader>zgw", [[<Cmd>FzfLua grep_cword<CR>]], opts)
|
||||
keymap("n", "<leader>zh", [[<Cmd>FzfLua oldfiles<CR>]], opts)
|
||||
keymap("n", "<leader>zl", [[<Cmd>FzfLua lines<CR>]], opts)
|
||||
keymap("n", "<leader>zlca", [[<Cmd>FzfLua code_actions<CR>]], opts)
|
||||
keymap("n", "<leader>zld", [[<Cmd>FzfLua lsp_definitions<CR>]], opts)
|
||||
keymap("n", "<leader>zlds", [[<Cmd>FzfLua lsp_document_symbols<CR>]], opts)
|
||||
keymap("n", "<leader>zlg", [[<Cmd>FzfLua live_grep<CR>]], opts)
|
||||
keymap("n", "<leader>zlgr", [[<Cmd>FzfLua live_grep_resume<CR>]], opts)
|
||||
keymap("n", "<leader>zlr", [[<Cmd>FzfLua lsp_references<CR>]], opts)
|
||||
keymap("n", "<leader>zltd", [[<Cmd>FzfLua lsp_typedef<CR>]], opts)
|
||||
keymap("n", "<leader>zlws", [[<Cmd>FzfLua lsp_live_workspace_symbols<CR>]], opts)
|
||||
keymap("n", "<leader>zm", [[<Cmd>FzfLua marks<CR>]], opts)
|
||||
keymap("n", "<leader>zqfq", [[<Cmd>FzfLua quickfix<CR>]], opts)
|
||||
keymap("n", "<leader>zr", [[<Cmd>FzfLua resume<CR>]], opts)
|
||||
keymap("n", "<leader>zss", [[<Cmd>FzfLua spell_suggest<CR>]], opts)
|
||||
keymap("n", "<leader>ztg", [[<Cmd>FzfLua tabs<CR>]], opts)
|
||||
|
||||
@@ -21,7 +21,16 @@ telescope.load_extension("projects")
|
||||
telescope.load_extension("heading")
|
||||
|
||||
-- Keymaps
|
||||
keymap("n", "<C-p>", [[<Cmd>Telescope find_files<CR>]], opts)
|
||||
keymap("n", "<leader>C", [[<Cmd>Cheatsheet<CR>]], opts)
|
||||
keymap("n", "<leader>F", [[<Cmd>Telescope live_grep<CR>]], opts)
|
||||
keymap("n", "<leader>H", [[<Cmd>Telescope headings<CR>]], opts)
|
||||
keymap("n", "<leader>S", [[<Cmd>Telescope spell_suggest<CR>]], opts)
|
||||
keymap("n", "<leader>b", [[<Cmd>Telescope buffers<CR>]], opts)
|
||||
keymap("n", "<leader>bm", [[<Cmd>Telescope bookmarks<CR>]], opts)
|
||||
keymap("n", "<leader>f", [[<Cmd>Telescope current_buffer_fuzzy_find<CR>]], opts)
|
||||
keymap("n", "<leader>fa", [[<Cmd>Telescope find_files hidden=true<CR>]], opts)
|
||||
keymap("n", "<leader>fb", [[<Cmd>Telescope file_browser<CR>]], opts)
|
||||
keymap("n", "<leader>gb", [[<Cmd>Telescope git_branches<CR>]], opts)
|
||||
keymap("n", "<leader>gs", [[<Cmd>Telescope git_status<CR>]], opts)
|
||||
keymap("n", "<leader>ht", [[<Cmd>Telescope help_tags<CR>]], opts)
|
||||
@@ -29,14 +38,8 @@ keymap("n", "<leader>km", [[<Cmd>Telescope keymaps<CR>]], opts)
|
||||
keymap("n", "<leader>m", [[<Cmd>Telescope marks<CR>]], opts)
|
||||
keymap("n", "<leader>mru", [[<Cmd>Telescope frecency<CR>]], opts)
|
||||
keymap("n", "<leader>nm", [[<Cmd>Telescope node_modules list<CR>]], opts)
|
||||
keymap("n", "<leader>tb", [[<Cmd>Telescope buffers<CR>]], opts)
|
||||
keymap("n", "<leader>C", [[<Cmd>:Cheatsheet<CR>]], opts)
|
||||
keymap("n", "<leader>tf", [[<Cmd>Telescope find_files<CR>]], opts)
|
||||
keymap("n", "<leader>tfa", [[<Cmd>Telescope find_files hidden=true<CR>]], opts)
|
||||
keymap("n", "<leader>tfb", [[<Cmd>Telescope file_browser<CR>]], opts)
|
||||
keymap("n", "<leader>r", [[<Cmd>Telescope resume<CR>]], opts)
|
||||
keymap("n", "<leader>tg", [[<Cmd>Telescope tags<CR>]], opts)
|
||||
keymap("n", "<leader>tlg", [[<Cmd>Telescope live_grep<CR>]], opts)
|
||||
keymap("n", "<leader>tr", [[<Cmd>Telescope resume<CR>]], opts)
|
||||
|
||||
-- Setup
|
||||
telescope.setup({
|
||||
|
||||
@@ -4,54 +4,51 @@ if not status_ok then
|
||||
end
|
||||
|
||||
local mappings = {
|
||||
b = {
|
||||
"<CMD>lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{previewer = false})<CR>",
|
||||
"Buffers",
|
||||
},
|
||||
c = { "<CMD>lua require('Comment.api').toggle_current_linewise()<CR>", "Comment" },
|
||||
b = { "<CMD>Telescope buffers<CR>", "Buffers" },
|
||||
c = { "<Cmd>lua vim.lsp.buf.code_action()<CR>", "Code Action" },
|
||||
d = { "<CMD>TroubleToggle<CR>", "Diagnostics" },
|
||||
e = { "<CMD>NvimTreeToggle<CR>", "Explorer" },
|
||||
f = { "<CMD>FzfLua files<CR>", "Find Files" },
|
||||
f = { "<CMD>Telescope current_buffer_fuzzy_find<CR>", "Find Files" },
|
||||
h = { "<CMD>nohlsearch<CR>", "No Highlight" },
|
||||
i = { "<CMD>silent !open -a iA\\ Writer.app '%:p'<CR>", "Open in iA Writer" },
|
||||
j = { "<CMD>b#<CR>", "Toggle Buffers" },
|
||||
p = { "<CMD>Telescope projects<CR>", "Projects" },
|
||||
q = { "<CMD>Bdelete!<CR>", "Close Buffer" },
|
||||
s = {
|
||||
a = { "<Cmd>:FzfLua lsp_code_actions<CR>", "LSP Code Actions" },
|
||||
d = { "<Cmd>:FzfLua lsp_definitions<CR>", "LSP Definitions" },
|
||||
s = { "<Cmd>:FzfLua lsp_document_symbols<CR>", "LSP Document Symbols" },
|
||||
w = { "<Cmd>:FzfLua lsp_live_workspace_symbols<CR>", "LSP Live Workspace Symbols" },
|
||||
r = { "<Cmd>:FzfLua lsp_references<CR>", "LSP References" },
|
||||
t = { "<Cmd>:FzfLua lsp_typedef<CR>", "LSP Type Definition" },
|
||||
a = { "<Cmd>lua vim.lsp.buf.code_action()<CR>", "LSP Code Actions" },
|
||||
d = { "<Cmd>Telescope lsp_definitions<CR>", "LSP Definitions" },
|
||||
s = { "<Cmd>Telescope lsp_document_symbols<CR>", "LSP Document Symbols" },
|
||||
w = { "<Cmd>Telescope lsp_workspace_symbols<CR>", "LSP Live Workspace Symbols" },
|
||||
r = { "<Cmd>Telescope lsp_references<CR>", "LSP References" },
|
||||
t = { "<Cmd>Telescope lsp_type_definitions<CR>", "LSP Type Definition" },
|
||||
name = "Search",
|
||||
F = {
|
||||
name = "FZF",
|
||||
b = { "<Cmd>:FzfLua blines<CR>", "Bufferlines" },
|
||||
f = { "<Cmd>:FzfLua files<CR>", "Files" },
|
||||
h = { "<Cmd>:FzfLua oldfiles<CR>", "Open Files History" },
|
||||
i = { "<Cmd>:FzfLua spell_suggest<CR>", "Spelling Suggestions" },
|
||||
m = { "<Cmd>:FzfLua marks<CR>", "Marks" },
|
||||
o = { "<Cmd>:FzfLua lines<CR>", "Open Buffer Lines" },
|
||||
q = { "<Cmd>:FzfLua quickfix<CR>", "Quickfix" },
|
||||
r = { "<Cmd>:FzfLua resume<CR>", "Resume last command" },
|
||||
t = { "<Cmd>:FzfLua tabs<CR>", "Tabs" },
|
||||
b = { "<Cmd>FzfLua blines<CR>", "Bufferlines" },
|
||||
f = { "<Cmd>FzfLua files<CR>", "Files" },
|
||||
h = { "<Cmd>FzfLua oldfiles<CR>", "Open Files History" },
|
||||
i = { "<Cmd>FzfLua spell_suggest<CR>", "Spelling Suggestions" },
|
||||
m = { "<Cmd>FzfLua marks<CR>", "Marks" },
|
||||
o = { "<Cmd>FzfLua lines<CR>", "Open Buffer Lines" },
|
||||
q = { "<Cmd>FzfLua quickfix<CR>", "Quickfix" },
|
||||
r = { "<Cmd>FzfLua resume<CR>", "Resume last command" },
|
||||
t = { "<Cmd>FzfLua tabs<CR>", "Tabs" },
|
||||
g = {
|
||||
name = "Git",
|
||||
b = { "<Cmd>:FzfLua git_branches<CR>", "Git Branches" },
|
||||
c = { "<Cmd>:FzfLua git_commits<CR>", "Git Commits" },
|
||||
s = { "<Cmd>:FzfLua git_stash<CR>", "Git Stashes" },
|
||||
t = { "<Cmd>:FzfLua git_status<CR>", "Git Status" },
|
||||
b = { "<Cmd>FzfLua git_branches<CR>", "Git Branches" },
|
||||
c = { "<Cmd>FzfLua git_commits<CR>", "Git Commits" },
|
||||
s = { "<Cmd>FzfLua git_stash<CR>", "Git Stashes" },
|
||||
t = { "<Cmd>FzfLua git_status<CR>", "Git Status" },
|
||||
},
|
||||
s = {
|
||||
name = "Search",
|
||||
s = { "<Cmd>:FzfLua grep<CR>", "Grep Search" },
|
||||
i = { "<Cmd>:FzfLua live_grep<CR>", "Live Grep" },
|
||||
l = { "<Cmd>:FzfLua grep_last<CR>", "Last Grep Search" },
|
||||
r = { "<Cmd>:FzfLua live_grep_resume<CR>", "Resume Last Search" },
|
||||
c = { "<Cmd>:FzfLua grep_cword<CR>", "Search Word Under Cursor" },
|
||||
v = { "<Cmd>:FzfLua grep_visual<CR>", "Search Visual Selection" },
|
||||
p = { "<Cmd>:FzfLua grep_project<CR>", "Grep Search in Project" },
|
||||
s = { "<Cmd>FzfLua grep<CR>", "Grep Search" },
|
||||
i = { "<Cmd>FzfLua live_grep<CR>", "Live Grep" },
|
||||
l = { "<Cmd>FzfLua grep_last<CR>", "Last Grep Search" },
|
||||
r = { "<Cmd>FzfLua live_grep_resume<CR>", "Resume Last Search" },
|
||||
c = { "<Cmd>FzfLua grep_cword<CR>", "Search Word Under Cursor" },
|
||||
v = { "<Cmd>FzfLua grep_visual<CR>", "Search Visual Selection" },
|
||||
p = { "<Cmd>FzfLua grep_project<CR>", "Grep Search in Project" },
|
||||
},
|
||||
},
|
||||
T = {
|
||||
@@ -88,9 +85,9 @@ local mappings = {
|
||||
c = { "<CMD>call ToggleColorColumn()<CR>", "Show/Hide Colorcolumn" },
|
||||
d = { "<CMD>call SpellEn()<CR>", "Set Spelling Language to English" },
|
||||
e = { "<CMD>call SpellDe()<CR>", "Set Spelling Languate to German" },
|
||||
l = { "<CMD>:set list!<CR>", "List" },
|
||||
l = { "<CMD>set list!<CR>", "List" },
|
||||
m = { "<CMD>MarkdownPreviewToggle<CR>", "Markdown Preview" },
|
||||
s = { "<CMD>:set spell!<CR>", "Spell Checking" },
|
||||
s = { "<CMD>set spell!<CR>", "Spell Checking" },
|
||||
w = { "<CMD>call ToggleWrap()<CR>", "Soft wrap/No wrap" },
|
||||
},
|
||||
v = { "<CMD>lua require('export-to-vscode').launch()<CR>", "Export to Visual Studio Code" },
|
||||
@@ -114,7 +111,7 @@ local mappings = {
|
||||
f = { "<CMD>NvimTreeFindFile<CR>", "Find File" },
|
||||
r = { "<CMD>NvimTreeRefresh<CR>", "Refresh" },
|
||||
},
|
||||
F = { "<CMD>FzfLua live_grep<CR>", "Find Text" },
|
||||
F = { "<CMD>Telescope live_grep<CR>", "Find Text" },
|
||||
G = {
|
||||
name = "Git & GitHub",
|
||||
b = { "<CMD>BlamerToggle<CR>", "Blame Line" },
|
||||
@@ -124,7 +121,6 @@ local mappings = {
|
||||
L = {
|
||||
name = "LSP",
|
||||
c = { "<CMD>vim.lsp.buf.code_action()<CR>", "Code Action" },
|
||||
b = { "<CMD>FzfLua blines<CR>", "Buffer Lines" },
|
||||
f = { "<CMD>vim.lsp.buf.formatting()<CR>", "Formatting" },
|
||||
l = { "<CMD>vim.diagnostic.setloclist<CR>", "Set Loclist" },
|
||||
r = { "<CMD>vim.lsp.buf.rename()<CR>", "Rename" },
|
||||
@@ -143,6 +139,7 @@ local mappings = {
|
||||
},
|
||||
Q = { "<CMD>q!<CR>", "Quit" },
|
||||
R = { "<CMD>luafile %<CR>", "Reload File" },
|
||||
S = { "<CMD>Telescope spell_suggest<CR>", "Spell Suggest" },
|
||||
T = {
|
||||
name = "Terminal",
|
||||
f = { "<CMD>ToggleTerm direction=float<CR>", "Float" },
|
||||
|
||||
Reference in New Issue
Block a user