mirror of
https://github.com/duma799/hyprduma-config.git
synced 2026-05-13 22:21:00 +00:00
Reorganize repo into config/, scripts/, and docs/ directories
This commit is contained in:
Executable
+86
@@ -0,0 +1,86 @@
|
||||
return {
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.8",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({}),
|
||||
},
|
||||
},
|
||||
defaults = {
|
||||
file_ignore_patterns = {
|
||||
"node_modules", "build", "dist", "yarn.lock"
|
||||
},
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"--follow",
|
||||
"--hidden",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
"--smart-case",
|
||||
"--glob=!**/.git/*",
|
||||
"--glob=!**/.idea/*",
|
||||
"--glob=!**/.vscode/*",
|
||||
"--glob=!**/build/*",
|
||||
"--glob=!**/dist/*",
|
||||
"--glob=!**/yarn.lock",
|
||||
"--glob=!**/package-lock.json",
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
hidden = true,
|
||||
find_command = {
|
||||
"rg",
|
||||
"--files",
|
||||
"--hidden",
|
||||
"--glob=!**/.git/*",
|
||||
"--glob=!**/.idea/*",
|
||||
"--glob=!**/.vscode/*",
|
||||
"--glob=!**/build/*",
|
||||
"--glob=!**/dist/*",
|
||||
"--glob=!**/yarn.lock",
|
||||
"--glob=!**/package-lock.json",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
|
||||
vim.keymap.set("n", "<A-f>", builtin.live_grep, {})
|
||||
|
||||
local function search_and_scope_into_directory()
|
||||
builtin.find_files({
|
||||
prompt_title = "Search Directories",
|
||||
find_command = {"fd", "--type", "d", "--hidden", "--follow"},
|
||||
attach_mappings = function(prompt_bufnr, map)
|
||||
local actions = require("telescope.actions")
|
||||
actions.select_default:replace(function()
|
||||
local selection = require("telescope.actions.state").get_selected_entry()
|
||||
local selected_dir = selection.path
|
||||
vim.cmd("cd " .. selected_dir)
|
||||
actions.close(prompt_bufnr)
|
||||
end)
|
||||
return true
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- Expose globally for alpha.lua dashboard button
|
||||
_G.search_and_scope_into_directory = search_and_scope_into_directory
|
||||
vim.keymap.set("n", "<A-d>", search_and_scope_into_directory)
|
||||
end
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
config = function()
|
||||
require("telescope").load_extension("ui-select")
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user