mirror of
https://github.com/Ascyii/nvim.git
synced 2026-01-01 04:04:24 -05:00
auto up 11:52:14 up 0:59, 2 users, load average: 0.27, 0.30, 0.33
This commit is contained in:
@@ -34,13 +34,7 @@ return {
|
||||
{
|
||||
"<leader>g",
|
||||
function()
|
||||
require('telescope.builtin').live_grep({
|
||||
disable_devicons = true,
|
||||
cwd = vim.fn.getcwd(),
|
||||
additional_args = function()
|
||||
return { '--hidden', '--glob', '!.git/*' }
|
||||
end,
|
||||
})
|
||||
require('utils.functions').fzf_wrapped("grep")
|
||||
end
|
||||
},
|
||||
{
|
||||
@@ -52,19 +46,7 @@ return {
|
||||
{
|
||||
"<leader><leader>",
|
||||
function()
|
||||
require('telescope.builtin').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}"
|
||||
}
|
||||
})
|
||||
require('utils.functions').fzf_wrapped("find")
|
||||
end
|
||||
}
|
||||
},
|
||||
|
||||
@@ -17,6 +17,35 @@ function M.get_cwd()
|
||||
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 {}
|
||||
function M.get_lsp_servers()
|
||||
local servers = { "lua_ls" }
|
||||
@@ -100,7 +129,6 @@ function M.get_lsp_servers()
|
||||
if vim.fn.executable("zls") == 1 then
|
||||
table.insert(servers, "zls")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
populate_servers()
|
||||
|
||||
Reference in New Issue
Block a user