Move files out of their respective fs structure into program dirs in root and symlink dotfils using HM.

This commit is contained in:
Martin Larsson 2025-01-16 23:49:38 +00:00
parent 10bab010b7
commit fb2adb4547
72 changed files with 9 additions and 0 deletions

71
nvim/lua/plugs/fzf.lua Normal file
View file

@ -0,0 +1,71 @@
return {
"ibhagwan/fzf-lua",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
"telescope",
winopts = {
preview = {
default = "bat"
}
},
lsp = {
workspace_symbols = {
symbol_kinds = { "Variable", "Function", "Method", "Class", "Struct", "Interface" },
},
},
previewers = {
builtin = {
-- turn off syntax highlighting for files with more than 100KB
-- this avoid hanging when previewing large files (due to treesitter parsing on minified files)
syntax_limit_b = 1024 * 100, -- 100KB
}
}
},
config = function()
local fzf = require("fzf-lua")
local pickers = {
{
mapping = "o",
action = function()
fzf.files({
git_icons = false,
})
end
},
{
mapping = "a",
action = function()
fzf.live_grep_native({
git_icons = false,
rg_opts = "--hidden --column --line-number --no-heading --color=always --smart-case",
fzf_opts = {
['--exact'] = false, -- Disable exact matching
},
})
end
},
{
mapping = "g",
action = function()
fzf.git_bcommits({})
end
},
{
mapping = "s",
action = function()
fzf.lsp_live_workspace_symbols({})
end
}
}
local keymaps = {}
keymaps.n = {}
for _, picker in ipairs(pickers) do
keymaps.n["<leader>t" .. picker.mapping] = {
cmd = picker.action
}
end
require("utils").add_keymaps(keymaps)
end
}