-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a22ad33
commit 3e79347
Showing
7 changed files
with
232 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,140 @@ | ||
---@type LazySpec[] | ||
return { | ||
---@type LazySpec | ||
|
||
{ | ||
"mikavilpas/yazi.nvim", | ||
event = "VeryLazy", | ||
"neo-tree.nvim", | ||
branch = "v3.x", | ||
dependencies = { | ||
"nvim-lua/plenary.nvim", | ||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended | ||
"MunifTanjim/nui.nvim", | ||
}, | ||
keys = { | ||
{ | ||
"<leader>-", | ||
"<leader>fe", | ||
function() | ||
require("yazi").yazi() | ||
require("neo-tree.command").execute({ reveal = true, dir = require("atro.utils.init").GetGitRoot() }) | ||
end, | ||
desc = "Open the file manager", | ||
desc = "Reveal in Explorer", | ||
}, | ||
{ | ||
-- Open in the current working directory | ||
"<leader>cw", | ||
"<leader>fE", | ||
function() | ||
require("yazi").yazi(nil, vim.fn.getcwd()) | ||
require("neo-tree.command").execute({ reveal = true, dir = vim.uv.cwd() }) | ||
end, | ||
desc = "Open the file manager in nvim's working directory", | ||
desc = "Reveal in Explorer (cwd)", | ||
}, | ||
}, | ||
---@type YaziConfig | ||
-- See: https://github.com/nvim-neo-tree/neo-tree.nvim | ||
opts = { | ||
enable_git_status = true, | ||
close_if_last_window = true, | ||
popup_border_style = "rounded", | ||
sort_case_insensitive = true, | ||
|
||
source_selector = { | ||
winbar = false, | ||
show_scrolled_off_parent_node = true, | ||
padding = { left = 1, right = 0 }, | ||
sources = { | ||
{ source = "filesystem", display_name = " Files" }, -- | ||
{ source = "buffers", display_name = " Buffers" }, -- | ||
{ source = "git_status", display_name = " Git" }, -- | ||
}, | ||
}, | ||
|
||
default_component_configs = { | ||
indent = { | ||
with_expanders = false, | ||
}, | ||
icon = { | ||
folder_empty = "", | ||
folder_empty_open = "", | ||
default = "", | ||
}, | ||
modified = { | ||
symbol = "•", | ||
}, | ||
name = { | ||
trailing_slash = true, | ||
highlight_opened_files = true, | ||
use_git_status_colors = true, | ||
}, | ||
git_status = { | ||
symbols = { | ||
-- Change type | ||
added = "A", | ||
deleted = "D", | ||
modified = "M", | ||
renamed = "R", | ||
-- Status type | ||
untracked = "U", | ||
ignored = "I", | ||
unstaged = "", | ||
staged = "S", | ||
conflict = "C", | ||
}, | ||
}, | ||
}, | ||
|
||
-- if you want to open yazi instead of netrw, see below for more info | ||
open_for_directories = false, | ||
filesystem = { | ||
bind_to_cwd = false, | ||
follow_current_file = { enabled = false }, | ||
find_by_full_path_words = true, | ||
group_empty_dirs = true, | ||
use_libuv_file_watcher = true, | ||
|
||
filtered_items = { | ||
hide_dotfiles = false, | ||
hide_gitignored = false, | ||
hide_by_name = { | ||
".git", | ||
".hg", | ||
".svc", | ||
".DS_Store", | ||
"thumbs.db", | ||
".sass-cache", | ||
"node_modules", | ||
".pytest_cache", | ||
".mypy_cache", | ||
"__pycache__", | ||
".stfolder", | ||
".stversions", | ||
}, | ||
never_show_by_pattern = { | ||
"vite.config.js.timestamp-*", | ||
}, | ||
}, | ||
}, | ||
buffers = {}, | ||
git_status = {}, | ||
document_symbols = { | ||
follow_cursor = true, | ||
}, | ||
}, | ||
}, | ||
{ | ||
"antosha417/nvim-lsp-file-operations", | ||
dependencies = { | ||
"nvim-lua/plenary.nvim", | ||
"nvim-neo-tree/neo-tree.nvim", | ||
}, | ||
config = function() | ||
require("lsp-file-operations").setup({ | ||
-- used to see debug logs in file `vim.fn.stdpath("cache") .. lsp-file-operations.log` | ||
debug = false, | ||
-- select which file operations to enable | ||
operations = { | ||
willRenameFiles = true, | ||
didRenameFiles = true, | ||
willCreateFiles = true, | ||
didCreateFiles = true, | ||
willDeleteFiles = true, | ||
didDeleteFiles = true, | ||
}, | ||
-- how long to wait (in milliseconds) for file rename information before cancelling | ||
timeout_ms = 10000, | ||
}) | ||
end, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters