mirror of
https://github.com/tradecatlabs/vibe-coding-cn.git
synced 2026-08-08 16:47:47 +00:00
chore: nvim - include hidden and ignored files
This commit is contained in:
+24
-1
@@ -6,6 +6,9 @@ return {
|
||||
filtered_items = {
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = false,
|
||||
-- 避免被默认规则额外隐藏(例如 .git 等)
|
||||
hide_by_name = {},
|
||||
hide_by_pattern = {},
|
||||
},
|
||||
},
|
||||
window = {
|
||||
@@ -22,6 +25,26 @@ return {
|
||||
-- Neotree 打开逻辑已移到 autocmds.lua,这里不再重复
|
||||
end,
|
||||
},
|
||||
-- Telescope 默认不展示 dotfiles(以及可能被 .gitignore 忽略的文件),这里统一打开
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.pickers = opts.pickers or {}
|
||||
opts.pickers.find_files = vim.tbl_deep_extend("force", opts.pickers.find_files or {}, {
|
||||
hidden = true,
|
||||
no_ignore = true,
|
||||
no_ignore_parent = true,
|
||||
})
|
||||
|
||||
-- live_grep / grep_string 默认也包含 dotfiles(但仍遵循 ignore 规则,避免把 node_modules 等全扫进来)
|
||||
opts.defaults = opts.defaults or {}
|
||||
local telescope_defaults = require("telescope.config").values
|
||||
opts.defaults.vimgrep_arguments = vim.deepcopy(opts.defaults.vimgrep_arguments or telescope_defaults.vimgrep_arguments)
|
||||
if not vim.tbl_contains(opts.defaults.vimgrep_arguments, "--hidden") then
|
||||
table.insert(opts.defaults.vimgrep_arguments, "--hidden")
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
event = "VeryLazy",
|
||||
@@ -67,4 +90,4 @@ return {
|
||||
require("bufferline").setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user