Telescope config improvements
This commit is contained in:
parent
7061be7dcd
commit
bc8e3b019c
|
@ -44,7 +44,7 @@ local theme = lush(function()
|
|||
WinSeparator { VertSplit }, -- WinSeparator xxx links to VertSplit
|
||||
Title { fg="#f0c674", }, -- Title xxx ctermfg=221 guifg=#f0c674
|
||||
TSTitle { Title }, -- TSTitle xxx links to Title
|
||||
Visual { bg="#455a64", }, -- Visual xxx ctermbg=237 guibg=#455A64
|
||||
Visual { bg=hsl(210, 80, 40), fg=hsl(0, 0, 80)}, -- Visual xxx ctermbg=237 guibg=#455A64
|
||||
TelescopeSelection { Visual }, -- TelescopeSelection xxx links to Visual
|
||||
TelescopePreviewLine { Visual }, -- TelescopePreviewLine xxx links to Visual
|
||||
WarningMsg { fg="#cc6666", }, -- WarningMsg xxx ctermfg=167 guifg=#cc6666
|
||||
|
@ -150,8 +150,8 @@ local theme = lush(function()
|
|||
TSProperty { Identifier }, -- TSProperty xxx links to Identifier
|
||||
TSSymbol { Identifier }, -- TSSymbol xxx links to Identifier
|
||||
TelescopeMultiIcon { Identifier }, -- TelescopeMultiIcon xxx links to Identifier
|
||||
TelescopeResultsIdentifier { Identifier }, -- TelescopeResultsIdentifier xxx links to Identifier
|
||||
TelescopePromptPrefix { Identifier }, -- TelescopePromptPrefix xxx links to Identifier
|
||||
TelescopeResultsIdentifier { Identifier }, -- TelescopeResultsIdentifier xxx links to Identifier
|
||||
Statement { fg=hsl(211, 100, 63), }, -- Statement xxx ctermfg=110 guifg=#81a2be
|
||||
Conditional { Statement }, -- Conditional xxx links to Statement
|
||||
Repeat { Statement }, -- Repeat xxx links to Statement
|
||||
|
@ -200,7 +200,7 @@ local theme = lush(function()
|
|||
TSConstructor { Special }, -- TSConstructor xxx links to Special
|
||||
TSVariableBuiltin { Special }, -- TSVariableBuiltin xxx links to Special
|
||||
TSMath { Special }, -- TSMath xxx links to Special
|
||||
TelescopeMatching { Special }, -- TelescopeMatching xxx links to Special
|
||||
TelescopeMatching { Statement }, -- TelescopeMatching xxx links to Special
|
||||
TelescopePreviewLink { Special }, -- TelescopePreviewLink xxx links to Special
|
||||
pythonEscape { Special }, -- pythonEscape xxx links to Special
|
||||
pythonDoctest { Special }, -- pythonDoctest xxx links to Special
|
||||
|
@ -312,7 +312,7 @@ local theme = lush(function()
|
|||
CmpItemAbbrMatch { CmpItemAbbrMatchDefault }, -- CmpItemAbbrMatch xxx links to CmpItemAbbrMatchDefault
|
||||
CmpItemAbbrMatchFuzzyDefault { fg="#c5c8c6", }, -- CmpItemAbbrMatchFuzzyDefault xxx cterm= gui= guifg=#c5c8c6
|
||||
CmpItemAbbrMatchFuzzy { CmpItemAbbrMatchFuzzyDefault }, -- CmpItemAbbrMatchFuzzy xxx links to CmpItemAbbrMatchFuzzyDefault
|
||||
CmpItemKindDefault { fg="#cc6666", }, -- CmpItemKindDefault xxx cterm= gui= guifg=#cc6666
|
||||
CmpItemKindDefault { Statement }, -- CmpItemKindDefault xxx cterm= gui= guifg=#cc6666
|
||||
CmpItemKind { CmpItemKindDefault }, -- CmpItemKind xxx links to CmpItemKindDefault
|
||||
CmpItemMenuDefault { fg="#c5c8c6", }, -- CmpItemMenuDefault xxx cterm= gui= guifg=#c5c8c6
|
||||
CmpItemMenu { CmpItemMenuDefault }, -- CmpItemMenu xxx links to CmpItemMenuDefault
|
||||
|
|
|
@ -10,12 +10,28 @@ M.project_files = function()
|
|||
if not ok then require"telescope.builtin".find_files(opts) end
|
||||
end
|
||||
|
||||
M.buffers = function()
|
||||
local opts = require('telescope.themes').get_ivy({}) -- define here if you want to define something
|
||||
opts["layout_config"] = {height=0.2}
|
||||
require"telescope.builtin".buffers(opts)
|
||||
end
|
||||
|
||||
local actions = require("telescope.actions")
|
||||
require("telescope").setup{
|
||||
defaults = {
|
||||
file_ignore_patterns = {
|
||||
"node_modules/.*",
|
||||
".git/.*",
|
||||
"Venv/.*",
|
||||
"venv/.*",
|
||||
"wandb/.*",
|
||||
"Resources/.*"
|
||||
},
|
||||
mappings = {
|
||||
i = {
|
||||
["jj"] = actions.close
|
||||
["jj"] = actions.close,
|
||||
["<C-j>"] = actions.move_selection_next,
|
||||
["<C-k>"] = actions.move_selection_previous,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -24,7 +40,7 @@ require("telescope").setup{
|
|||
telescope.load_extension('fzf')
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<C-p>", "<CMD>lua require'telescope_config'.project_files()<CR>", {noremap = true, silent = true})
|
||||
vim.api.nvim_set_keymap("n", "<C-O>", "<cmd>Telescope buffers theme=ivy<cr>", { silent = true, noremap = true })
|
||||
vim.api.nvim_set_keymap("n", "<C-O>", "<cmd>lua require('telescope_config').buffers()<cr>", { silent = true, noremap = true })
|
||||
vim.api.nvim_set_keymap("n", "<C-f>", "<cmd>lua require('telescope.builtin').live_grep{ cwd = vim.fn.systemlist(\"git rev-parse --show-toplevel 2> /dev/null || pwd\")[1] }<cr>", { silent = true, noremap = true })
|
||||
|
||||
return M
|
||||
|
|
Loading…
Reference in New Issue