mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
feat(fzf): use vscode style path names formatter
This commit is contained in:
parent
52b572881b
commit
14d1ca93d0
1 changed files with 3 additions and 19 deletions
|
@ -45,7 +45,6 @@ return {
|
||||||
config.defaults.keymap.builtin["<c-f>"] = "preview-page-down"
|
config.defaults.keymap.builtin["<c-f>"] = "preview-page-down"
|
||||||
config.defaults.keymap.builtin["<c-b>"] = "preview-page-up"
|
config.defaults.keymap.builtin["<c-b>"] = "preview-page-up"
|
||||||
|
|
||||||
actions.open_with_trouble = require("trouble.sources.fzf").actions.open
|
|
||||||
-- Trouble
|
-- Trouble
|
||||||
config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open
|
config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open
|
||||||
|
|
||||||
|
@ -72,13 +71,14 @@ return {
|
||||||
end
|
end
|
||||||
fix(defaults)
|
fix(defaults)
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, "FzfLuaPath", { link = "Directory", default = true })
|
|
||||||
|
|
||||||
return vim.tbl_deep_extend("force", opts, defaults, {
|
return vim.tbl_deep_extend("force", opts, defaults, {
|
||||||
fzf_colors = true,
|
fzf_colors = true,
|
||||||
fzf_opts = {
|
fzf_opts = {
|
||||||
["--no-scrollbar"] = true,
|
["--no-scrollbar"] = true,
|
||||||
},
|
},
|
||||||
|
defaults = {
|
||||||
|
formatter = "path.filename_first",
|
||||||
|
},
|
||||||
winopts = {
|
winopts = {
|
||||||
width = 0.8,
|
width = 0.8,
|
||||||
height = 0.8,
|
height = 0.8,
|
||||||
|
@ -96,7 +96,6 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
grep = {
|
grep = {
|
||||||
formatter = "path.hl",
|
|
||||||
actions = {
|
actions = {
|
||||||
["alt-i"] = { actions.toggle_ignore },
|
["alt-i"] = { actions.toggle_ignore },
|
||||||
["alt-h"] = { actions.toggle_hidden },
|
["alt-h"] = { actions.toggle_hidden },
|
||||||
|
@ -116,21 +115,6 @@ return {
|
||||||
previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil,
|
previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
formatters = {
|
|
||||||
path = {
|
|
||||||
hl = {
|
|
||||||
_to = function()
|
|
||||||
local _, escseq = require("fzf-lua.utils").ansi_from_hl("FzfLuaPath", "foo")
|
|
||||||
return [[
|
|
||||||
return function(s, _, m)
|
|
||||||
return "]] .. (escseq or "") .. [["
|
|
||||||
.. s .. m.utils.ansi_escseq.clear
|
|
||||||
end
|
|
||||||
]]
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue