39 lines
1.1 KiB
Lua
39 lines
1.1 KiB
Lua
-- lua/telescope.lua
|
|
local telescope = require("telescope")
|
|
|
|
telescope.setup({
|
|
defaults = {
|
|
prompt_prefix = "> ",
|
|
selection_caret = "> ",
|
|
},
|
|
-- pickers = {
|
|
-- find_files = {
|
|
-- theme = "dropdown",
|
|
-- },
|
|
-- live_grep = {
|
|
-- theme = "dropdown",
|
|
-- },
|
|
-- },
|
|
})
|
|
|
|
local builtin = require('telescope.builtin')
|
|
-- Функция для поиска файлов, исключая скрытые
|
|
local function custom_file_search()
|
|
builtin.find_files({
|
|
prompt_title = "< Search without hidden files >",
|
|
find_command = {
|
|
"find", ".", "-type", "f",
|
|
"-not", "-path", "*/.*",
|
|
"-not", "-path", "./env/*",
|
|
"-not", "-path", "./fonts/*",
|
|
"-not", "-path", "*.pyc",
|
|
"-not", "-path", "./pg_data/*"
|
|
},
|
|
})
|
|
end
|
|
|
|
vim.keymap.set('n', '<Space><Space>', custom_file_search, {})
|
|
vim.keymap.set('n', '<Space>pg', builtin.live_grep, {})
|
|
vim.keymap.set('n', '<Space>bb', builtin.buffers, {})
|
|
vim.keymap.set('n', '<Space>ml', builtin.marks, {})
|