auto up 11:52:14 up 0:59, 2 users, load average: 0.27, 0.30, 0.33

This commit is contained in:
2025-11-06 11:52:15 +01:00
parent 67ee375ba7
commit 98bcb5f285
2 changed files with 113 additions and 103 deletions

View File

@@ -34,13 +34,7 @@ return {
{ {
"<leader>g", "<leader>g",
function() function()
require('telescope.builtin').live_grep({ require('utils.functions').fzf_wrapped("grep")
disable_devicons = true,
cwd = vim.fn.getcwd(),
additional_args = function()
return { '--hidden', '--glob', '!.git/*' }
end,
})
end end
}, },
{ {
@@ -52,19 +46,7 @@ return {
{ {
"<leader><leader>", "<leader><leader>",
function() function()
require('telescope.builtin').find_files({ require('utils.functions').fzf_wrapped("find")
hidden = true,
no_ignore = true,
follow = true,
disable_devicons = false,
prompt_title = "Find Files",
find_command = {
"rg", "--files",
"--glob", "!**/.git/*",
"--glob", "!**/build/*",
"--glob", "!**/*.{jpg,png,gif,mp4,mkv,tar,zip,iso}"
}
})
end end
} }
}, },

View File

@@ -17,6 +17,35 @@ function M.get_cwd()
end end
end end
function M.fzf_wrapped(type)
local t = require("telescope.builtin")
if type == "grep" then
t.live_grep({
disable_devicons = true,
cwd = vim.fn.getcwd(),
additional_args = function()
return { '--hidden', '--glob', '!.git/*' }
end,
})
end
if type == "find" then
t.find_files({
hidden = true,
no_ignore = true,
follow = true,
disable_devicons = false,
prompt_title = "Find Files",
find_command = {
"rg", "--files",
"--glob", "!**/.git/*",
"--glob", "!**/build/*",
"--glob", "!**/*.{jpg,png,gif,mp4,mkv,tar,zip,iso}"
}
})
end
end
--- @return {} --- @return {}
function M.get_lsp_servers() function M.get_lsp_servers()
local servers = { "lua_ls" } local servers = { "lua_ls" }
@@ -100,7 +129,6 @@ function M.get_lsp_servers()
if vim.fn.executable("zls") == 1 then if vim.fn.executable("zls") == 1 then
table.insert(servers, "zls") table.insert(servers, "zls")
end end
end end
populate_servers() populate_servers()