Compare commits
1 Commits
release-pl
...
release-pl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ee57578da |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -40,5 +40,3 @@ jobs:
|
||||
version: "0.19"
|
||||
args: --check lua
|
||||
|
||||
- name: doc-comments
|
||||
run: ./scripts/doc-comments.sh
|
||||
|
||||
7
.github/workflows/release-please.yml
vendored
7
.github/workflows/release-please.yml
vendored
@@ -3,15 +3,16 @@ on:
|
||||
branches:
|
||||
- master
|
||||
name: release-please
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
jobs:
|
||||
release-please:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: google-github-actions/release-please-action@v4
|
||||
id: release
|
||||
with:
|
||||
release-type: simple
|
||||
package-name: nvim-tree
|
||||
command: github-release
|
||||
- uses: actions/checkout@v4
|
||||
- name: tag major and minor versions
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
".": "0.0.0"
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
:robot: I have created a release *beep* *boop*
|
||||
---
|
||||
# Changelog
|
||||
|
||||
|
||||
## 0.9.0 (2023-12-10)
|
||||
## 1.0.0 (2023-12-09)
|
||||
|
||||
|
||||
### Features
|
||||
@@ -38,10 +36,12 @@
|
||||
* add -bar option to command definitions ([#1422](https://github.com/nvim-tree/nvim-tree.lua/issues/1422)) ([c231933](https://github.com/nvim-tree/nvim-tree.lua/commit/c231933fcdc8855c813f368e48025a368864a636))
|
||||
* add actions.open_file.eject ([#2341](https://github.com/nvim-tree/nvim-tree.lua/issues/2341)) ([4bd30f0](https://github.com/nvim-tree/nvim-tree.lua/commit/4bd30f0137e44dcf3e74cc1164efb568f78f2b02))
|
||||
* add confirmation kind to select y/n ([ba5c18d](https://github.com/nvim-tree/nvim-tree.lua/commit/ba5c18dc2b43599067d999933469098073e1941c))
|
||||
* add cwd arg to open_replacing_current_buffer ([#1348](https://github.com/nvim-tree/nvim-tree.lua/issues/1348)) ([6b7b1b3](https://github.com/nvim-tree/nvim-tree.lua/commit/6b7b1b34fa6c4851a7b06a9ce4a1a703de7fd0ed))
|
||||
* add cwd arg to open_replacing_current_buffer: retain existing valid buffer check ([6548287](https://github.com/nvim-tree/nvim-tree.lua/commit/6548287e8b84552d40d28f9e122f7eedf1f331bd))
|
||||
* add diagnostics.show_on_open_dirs git.show_on_open_dirs ([#1778](https://github.com/nvim-tree/nvim-tree.lua/issues/1778)) ([829e9f6](https://github.com/nvim-tree/nvim-tree.lua/commit/829e9f68e10a998198e17bf5b348a6947f9d3c2e))
|
||||
* add filters.git_ignored (prev git.ignore), apply "Toggle Filter:" prefix to mapping descriptions ([#2325](https://github.com/nvim-tree/nvim-tree.lua/issues/2325)) ([697bfac](https://github.com/nvim-tree/nvim-tree.lua/commit/697bfaccac4a4843449ce7a7b14adb0e7989befe))
|
||||
* add NvimTreeCursorLineNr ([#1616](https://github.com/nvim-tree/nvim-tree.lua/issues/1616)) ([7282f7d](https://github.com/nvim-tree/nvim-tree.lua/commit/7282f7de8aedf861fe0162a559fc2b214383c51c))
|
||||
* add NvimTreeFindFile!, root_dirs and prefer_startup_root ([b08003f](https://github.com/nvim-tree/nvim-tree.lua/commit/b08003f54640f2015e54dfcd39685862908bfc6a))
|
||||
* add NvimTreeNormalFloat ([#2167](https://github.com/nvim-tree/nvim-tree.lua/issues/2167)) ([98b76ff](https://github.com/nvim-tree/nvim-tree.lua/commit/98b76ff0a2f2725b6c0d1b7491ec85ca760c9f3f))
|
||||
* add NvimTreeSymlinkIcon ([#2198](https://github.com/nvim-tree/nvim-tree.lua/issues/2198)) ([736c7ff](https://github.com/nvim-tree/nvim-tree.lua/commit/736c7ff59065275f0483af4b7f07a9bc41449ad0))
|
||||
* add on_tree_resize event ([c847354](https://github.com/nvim-tree/nvim-tree.lua/commit/c84735483f20b692ffaffb2b889a8956a9a425a4))
|
||||
@@ -137,6 +137,7 @@
|
||||
|
||||
* **#1270:** ensure explorer exists at startup before propagating FS changes ([55aa006](https://github.com/nvim-tree/nvim-tree.lua/commit/55aa0062b974e1fc29b4462c745271ae40009eda))
|
||||
* **#1270:** open_on_setup_file does not override open_on_setup, hijack_directories does not override startup behaviour ([#1618](https://github.com/nvim-tree/nvim-tree.lua/issues/1618)) ([c5536db](https://github.com/nvim-tree/nvim-tree.lua/commit/c5536db0b7a9e13709af16a0ffe1ab20137f8a48))
|
||||
* **#1354:** add missing :hi NvimTreeFileIgnored ([#1358](https://github.com/nvim-tree/nvim-tree.lua/issues/1358)) ([1fc0eee](https://github.com/nvim-tree/nvim-tree.lua/commit/1fc0eee9465f764bd3c8fab1900efe13318b28c9))
|
||||
* **#1356:** view.close switch_buf_if_last_buf prefers alt buf ([#1357](https://github.com/nvim-tree/nvim-tree.lua/issues/1357)) ([d9aaa2f](https://github.com/nvim-tree/nvim-tree.lua/commit/d9aaa2f985c69ae1452e067e33e8a11ec84196a1))
|
||||
* **#1366:** warn when trash cmd missing ([#1378](https://github.com/nvim-tree/nvim-tree.lua/issues/1378)) ([7285898](https://github.com/nvim-tree/nvim-tree.lua/commit/72858986f9de019dc0e151c76090de29954081f0))
|
||||
* **#1406:** allow nvim-tree.renderer.icons.show.folder_arrow ([fd562ed](https://github.com/nvim-tree/nvim-tree.lua/commit/fd562ede63c6dac8938276f901e1e6d46ac8b293))
|
||||
@@ -260,7 +261,6 @@
|
||||
* **#2512:** file creation in empty folder without root_folder_label ([#2514](https://github.com/nvim-tree/nvim-tree.lua/issues/2514)) ([4ee6366](https://github.com/nvim-tree/nvim-tree.lua/commit/4ee6366ff1fc5d66231516ed05beffb50004261b))
|
||||
* **#2516:** diagnostics icon highlight group matches the documentation: NvimTreeLspDiagnosticsInfo -> Information ([#2518](https://github.com/nvim-tree/nvim-tree.lua/issues/2518)) ([46e1f77](https://github.com/nvim-tree/nvim-tree.lua/commit/46e1f776f0a714099b9160604fbb62fba2540376))
|
||||
* **#2523:** live filter overlay width calculation ([#2524](https://github.com/nvim-tree/nvim-tree.lua/issues/2524)) ([80cfead](https://github.com/nvim-tree/nvim-tree.lua/commit/80cfeadf179d5cba76f0f502c71dbcff1b515cd8))
|
||||
* **#2568:** hijack_cursor positions at top grouped node ([#2569](https://github.com/nvim-tree/nvim-tree.lua/issues/2569)) ([0a7c24b](https://github.com/nvim-tree/nvim-tree.lua/commit/0a7c24b675ab75dab8c36f2a326d274ad66b7166))
|
||||
* **#549:** add more profiling ~tree init ([95ed588](https://github.com/nvim-tree/nvim-tree.lua/commit/95ed5882114ab481e93362aa74c0f3c65dc4aade))
|
||||
* `api.node.open.preview` should toggle directories ([#2099](https://github.com/nvim-tree/nvim-tree.lua/issues/2099)) ([7ad1c20](https://github.com/nvim-tree/nvim-tree.lua/commit/7ad1c204c4113b5ce4cc9244ff93a406db810a64))
|
||||
* **actions:** change_dir to wrong directory ([#1398](https://github.com/nvim-tree/nvim-tree.lua/issues/1398)) ([269820e](https://github.com/nvim-tree/nvim-tree.lua/commit/269820e800f6652fac3e0ff66a1463121f2f0ff4))
|
||||
@@ -341,18 +341,10 @@
|
||||
* use pcall to prevent live-filter regex errors ([#1689](https://github.com/nvim-tree/nvim-tree.lua/issues/1689)) ([3845039](https://github.com/nvim-tree/nvim-tree.lua/commit/3845039c1a47ad0759a1ec7deb6f2ffb4421d175))
|
||||
* **view:** do not close window when NvimTree buffer is replaced ([#1391](https://github.com/nvim-tree/nvim-tree.lua/issues/1391)) ([40e515d](https://github.com/nvim-tree/nvim-tree.lua/commit/40e515df87e164454b4df12b7c97a805dd8d2bb8))
|
||||
* **view:** file filter and info popup above floating view ([d753a1d](https://github.com/nvim-tree/nvim-tree.lua/commit/d753a1da9a58339f1751db96d37e9b318be91825))
|
||||
* **view:** prevent buffer override when actions.open_file.quit_on_open ([e82a921](https://github.com/nvim-tree/nvim-tree.lua/commit/e82a921baab36e9220b31c315b3dc816d6b892c9))
|
||||
* **view:** refresh opened files highlight on buffer read, unload ([#1827](https://github.com/nvim-tree/nvim-tree.lua/issues/1827)) ([18272f8](https://github.com/nvim-tree/nvim-tree.lua/commit/18272f8df3aac2f59dfa31b268c62e0611fbc6c3))
|
||||
* **watcher:** failure on watcher teardown message ([#1726](https://github.com/nvim-tree/nvim-tree.lua/issues/1726)) ([6d6a446](https://github.com/nvim-tree/nvim-tree.lua/commit/6d6a44626d4dec58bb61bd40d5bd63d69818c540))
|
||||
* **watcher:** only purge on subsequent setup calls, add git_purge log ([899ed45](https://github.com/nvim-tree/nvim-tree.lua/commit/899ed45602090ec9f61a2ed69d218d246e7e035a))
|
||||
* **watchers:** disable watchers on kernel filesystems ([ac90664](https://github.com/nvim-tree/nvim-tree.lua/commit/ac906640011df013ca3dd19b6dc71a4fec67cf85)), closes [#1465](https://github.com/nvim-tree/nvim-tree.lua/issues/1465)
|
||||
* window picker can't be correctly rendered when cmdheight = 0 ([#1349](https://github.com/nvim-tree/nvim-tree.lua/issues/1349)) ([79258f1](https://github.com/nvim-tree/nvim-tree.lua/commit/79258f1d670277016523e13c0a88daa25070879f))
|
||||
* **wipe:** wipe all nvim-tree rogue buffers ([ec530e7](https://github.com/nvim-tree/nvim-tree.lua/commit/ec530e73beec547e04efb11a4f17c912d750c626)), closes [#1438](https://github.com/nvim-tree/nvim-tree.lua/issues/1438)
|
||||
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
* configure release-please ([90cff8e](https://github.com/nvim-tree/nvim-tree.lua/commit/90cff8e4684c63db6af133f6629748f7af059bd5))
|
||||
* fix release-please manifest ([#2586](https://github.com/nvim-tree/nvim-tree.lua/issues/2586)) ([4891d6c](https://github.com/nvim-tree/nvim-tree.lua/commit/4891d6cec3d33d3711c795f88f8846ff4fa333a0))
|
||||
|
||||
---
|
||||
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
|
||||
@@ -77,6 +77,30 @@ function M.change_root(path, bufnr)
|
||||
change_dir.fn(vim.fn.fnamemodify(path, ":p:h"))
|
||||
end
|
||||
|
||||
---@param cwd string|nil
|
||||
function M.open_replacing_current_buffer(cwd)
|
||||
if view.is_visible() then
|
||||
return
|
||||
end
|
||||
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
local bufname = vim.api.nvim_buf_get_name(buf)
|
||||
if bufname == "" or vim.loop.fs_stat(bufname) == nil then
|
||||
return
|
||||
end
|
||||
|
||||
if cwd == "" or cwd == nil then
|
||||
cwd = vim.fn.fnamemodify(bufname, ":p:h")
|
||||
end
|
||||
|
||||
if not core.get_explorer() or cwd ~= core.get_cwd() then
|
||||
core.init(cwd)
|
||||
end
|
||||
view.open_in_win { hijack_current_buf = false, resize = false }
|
||||
require("nvim-tree.renderer").draw()
|
||||
require("nvim-tree.actions.finders.find-file").fn(bufname)
|
||||
end
|
||||
|
||||
function M.tab_enter()
|
||||
if view.is_visible { any_tabpage = true } then
|
||||
local bufname = vim.api.nvim_buf_get_name(0)
|
||||
@@ -124,7 +148,6 @@ function M.place_cursor_on_node()
|
||||
if not node or node.name == ".." then
|
||||
return
|
||||
end
|
||||
node = utils.get_parent_of_group(node)
|
||||
|
||||
local line = vim.api.nvim_get_current_line()
|
||||
local cursor = vim.api.nvim_win_get_cursor(0)
|
||||
|
||||
@@ -6,22 +6,19 @@ local explorer_node = require "nvim-tree.explorer.node"
|
||||
|
||||
local M = {}
|
||||
|
||||
---@class NavigationItemOpts
|
||||
---@field where string
|
||||
---@field what string
|
||||
|
||||
---@param opts NavigationItemOpts
|
||||
---@param where string
|
||||
---@param what string
|
||||
---@return fun()
|
||||
function M.fn(opts)
|
||||
function M.fn(where, what)
|
||||
return function()
|
||||
local node_cur = lib.get_node_at_cursor()
|
||||
local first_node_line = core.get_nodes_starting_line()
|
||||
local nodes_by_line = utils.get_nodes_by_line(core.get_explorer().nodes, first_node_line)
|
||||
local iter_start, iter_end, iter_step, cur, first, nex
|
||||
|
||||
if opts.where == "next" then
|
||||
if where == "next" then
|
||||
iter_start, iter_end, iter_step = first_node_line, #nodes_by_line, 1
|
||||
elseif opts.where == "prev" then
|
||||
elseif where == "prev" then
|
||||
iter_start, iter_end, iter_step = #nodes_by_line, first_node_line, -1
|
||||
end
|
||||
|
||||
@@ -29,11 +26,11 @@ function M.fn(opts)
|
||||
local node = nodes_by_line[line]
|
||||
local valid = false
|
||||
|
||||
if opts.what == "git" then
|
||||
if what == "git" then
|
||||
valid = explorer_node.get_git_status(node) ~= nil
|
||||
elseif opts.what == "diag" then
|
||||
elseif what == "diag" then
|
||||
valid = node.diag_status ~= nil
|
||||
elseif opts.what == "opened" then
|
||||
elseif what == "opened" then
|
||||
valid = vim.fn.bufloaded(node.absolute_path) ~= 0
|
||||
end
|
||||
|
||||
|
||||
@@ -212,12 +212,12 @@ Api.node.navigate.sibling.first = wrap_node(require("nvim-tree.actions.moves.sib
|
||||
Api.node.navigate.sibling.last = wrap_node(require("nvim-tree.actions.moves.sibling").fn "last")
|
||||
Api.node.navigate.parent = wrap_node(require("nvim-tree.actions.moves.parent").fn(false))
|
||||
Api.node.navigate.parent_close = wrap_node(require("nvim-tree.actions.moves.parent").fn(true))
|
||||
Api.node.navigate.git.next = wrap_node(require("nvim-tree.actions.moves.item").fn { where = "next", what = "git" })
|
||||
Api.node.navigate.git.prev = wrap_node(require("nvim-tree.actions.moves.item").fn { where = "prev", what = "git" })
|
||||
Api.node.navigate.diagnostics.next = wrap_node(require("nvim-tree.actions.moves.item").fn { where = "next", what = "diag" })
|
||||
Api.node.navigate.diagnostics.prev = wrap_node(require("nvim-tree.actions.moves.item").fn { where = "prev", what = "diag" })
|
||||
Api.node.navigate.opened.next = wrap_node(require("nvim-tree.actions.moves.item").fn { where = "next", what = "opened" })
|
||||
Api.node.navigate.opened.prev = wrap_node(require("nvim-tree.actions.moves.item").fn { where = "prev", what = "opened" })
|
||||
Api.node.navigate.git.next = wrap_node(require("nvim-tree.actions.moves.item").fn("next", "git"))
|
||||
Api.node.navigate.git.prev = wrap_node(require("nvim-tree.actions.moves.item").fn("prev", "git"))
|
||||
Api.node.navigate.diagnostics.next = wrap_node(require("nvim-tree.actions.moves.item").fn("next", "diag"))
|
||||
Api.node.navigate.diagnostics.prev = wrap_node(require("nvim-tree.actions.moves.item").fn("prev", "diag"))
|
||||
Api.node.navigate.opened.next = wrap_node(require("nvim-tree.actions.moves.item").fn("next", "opened"))
|
||||
Api.node.navigate.opened.prev = wrap_node(require("nvim-tree.actions.moves.item").fn("prev", "opened"))
|
||||
|
||||
Api.git.reload = wrap(require("nvim-tree.actions.reloaders.reloaders").reload_git)
|
||||
|
||||
|
||||
@@ -149,11 +149,12 @@ function M.get_node_from_path(path)
|
||||
:iterate()
|
||||
end
|
||||
|
||||
---Get the highest parent of grouped nodes
|
||||
---@param node Node
|
||||
---@return Node node or parent
|
||||
function M.get_parent_of_group(node)
|
||||
while node and node.parent and node.parent.group_next do
|
||||
--- Get the highest parent of grouped nodes
|
||||
---@param node_ Node
|
||||
---@return table
|
||||
function M.get_parent_of_group(node_)
|
||||
local node = node_
|
||||
while node.parent and node.parent.group_next do
|
||||
node = node.parent
|
||||
end
|
||||
return node
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
|
||||
"include-v-in-tag": true,
|
||||
"packages": {
|
||||
".": {
|
||||
"package-name": "nvim-tree",
|
||||
"release-type": "simple"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
out=$(grep -nr "^--- @" lua)
|
||||
|
||||
if [ "$out" ]; then
|
||||
last_file=""
|
||||
while read -r line; do
|
||||
file="$(echo "$line" | cut -d: -f1)"
|
||||
if [[ "$file" != "$last_file" ]]; then
|
||||
echo "$file:" >&2
|
||||
last_file="$file"
|
||||
fi
|
||||
echo "$line" | awk -F: '{ printf(" line %s: %s\n", $2, $3) }' >&2
|
||||
done <<< "$out"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user