Compare commits
4 Commits
nvim-tree-
...
nvim-tree-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
707b24af91 | ||
|
|
76b98109f6 | ||
|
|
cfea5bd080 | ||
|
|
1fd9c98960 |
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
".": "1.1.0"
|
".": "1.1.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.1.1](https://github.com/nvim-tree/nvim-tree.lua/compare/nvim-tree-v1.1.0...nvim-tree-v1.1.1) (2024-03-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **#2395:** marks.bulk.move defaults to directory at cursor ([#2688](https://github.com/nvim-tree/nvim-tree.lua/issues/2688)) ([cfea5bd](https://github.com/nvim-tree/nvim-tree.lua/commit/cfea5bd0806aab41bef6014c6cf5a510910ddbdb))
|
||||||
|
* **#2705:** change NvimTreeWindowPicker cterm background from Cyan to more visible DarkBlue ([#2708](https://github.com/nvim-tree/nvim-tree.lua/issues/2708)) ([1fd9c98](https://github.com/nvim-tree/nvim-tree.lua/commit/1fd9c98960463d2d5d400916c0633b2df016941d))
|
||||||
|
* bookmark filter should include parent directory ([#2704](https://github.com/nvim-tree/nvim-tree.lua/issues/2704)) ([76b9810](https://github.com/nvim-tree/nvim-tree.lua/commit/76b98109f62caa12b2f1dff472060b2233ea2e90))
|
||||||
|
|
||||||
## [1.1.0](https://github.com/nvim-tree/nvim-tree.lua/compare/nvim-tree-v1.0.0...nvim-tree-v1.1.0) (2024-03-14)
|
## [1.1.0](https://github.com/nvim-tree/nvim-tree.lua/compare/nvim-tree-v1.0.0...nvim-tree-v1.1.0) (2024-03-14)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ M.HIGHLIGHT_GROUPS = {
|
|||||||
{ group = "NvimTreeIndentMarker", link = "NvimTreeFolderIcon" },
|
{ group = "NvimTreeIndentMarker", link = "NvimTreeFolderIcon" },
|
||||||
|
|
||||||
-- Picker
|
-- Picker
|
||||||
{ group = "NvimTreeWindowPicker", def = "guifg=#ededed guibg=#4493c8 gui=bold ctermfg=White ctermbg=Cyan" },
|
{ group = "NvimTreeWindowPicker", def = "guifg=#ededed guibg=#4493c8 gui=bold ctermfg=White ctermbg=DarkBlue" },
|
||||||
|
|
||||||
-- LiveFilter
|
-- LiveFilter
|
||||||
{ group = "NvimTreeLiveFilterPrefix", link = "PreProc" },
|
{ group = "NvimTreeLiveFilterPrefix", link = "PreProc" },
|
||||||
|
|||||||
@@ -73,7 +73,20 @@ end
|
|||||||
---@param path string
|
---@param path string
|
||||||
---@param bookmarks table<string, boolean> absolute paths bookmarked
|
---@param bookmarks table<string, boolean> absolute paths bookmarked
|
||||||
local function bookmark(path, bookmarks)
|
local function bookmark(path, bookmarks)
|
||||||
return M.config.filter_no_bookmark and not bookmarks[path]
|
if not M.config.filter_no_bookmark then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- add trailing slash to make it match only mark's parent directory
|
||||||
|
-- not it's siblings
|
||||||
|
local parent = utils.path_add_trailing(path)
|
||||||
|
for mark, _ in pairs(bookmarks) do
|
||||||
|
if path == mark or vim.fn.stridx(mark, parent) == 0 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param path string
|
---@param path string
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ local core = require "nvim-tree.core"
|
|||||||
local utils = require "nvim-tree.utils"
|
local utils = require "nvim-tree.utils"
|
||||||
local rename_file = require "nvim-tree.actions.fs.rename-file"
|
local rename_file = require "nvim-tree.actions.fs.rename-file"
|
||||||
local notify = require "nvim-tree.notify"
|
local notify = require "nvim-tree.notify"
|
||||||
|
local lib = require "nvim-tree.lib"
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
config = {},
|
config = {},
|
||||||
@@ -14,9 +15,18 @@ function M.bulk_move()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local node_at_cursor = lib.get_node_at_cursor()
|
||||||
|
local default_path = core.get_cwd()
|
||||||
|
|
||||||
|
if node_at_cursor and node_at_cursor.type == "directory" then
|
||||||
|
default_path = node_at_cursor.absolute_path
|
||||||
|
elseif node_at_cursor and node_at_cursor.parent then
|
||||||
|
default_path = node_at_cursor.parent.absolute_path
|
||||||
|
end
|
||||||
|
|
||||||
local input_opts = {
|
local input_opts = {
|
||||||
prompt = "Move to: ",
|
prompt = "Move to: ",
|
||||||
default = core.get_cwd(),
|
default = default_path,
|
||||||
completion = "dir",
|
completion = "dir",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user