From 5da4bdff0449e58729c7229fe2276db4b8a433f2 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 5 Mar 2022 12:45:50 +1100 Subject: [PATCH 1/7] #1033 add bug report template based on telescope --- .github/ISSUE_TEMPLATE/bug_report.md | 26 ---- .github/ISSUE_TEMPLATE/bug_report.yml | 171 ++++++++++++++++++++++++++ 2 files changed, 171 insertions(+), 26 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 6d4a2daafc5..00000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: Bug report -about: Bug report issue template -title: '' -labels: '' -assignees: '' - ---- - -**OS** -Operation system's name and version - -**Neovim version** -output of `nvim --version` - -**Nvim-tree version** -nvim-tree branch, commit or tag number - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior - -**Expected behavior** -A clear and concise description of what you expected to happen. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000000..45f73cdf45c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,171 @@ +name: Bug report +description: Report a problem with nvim-tree +labels: [bug] +body: + - type: markdown + attributes: + value: | + Before reporting: search [existing issues](https://github.com/kyazdani42/nvim-tree.lua/issues) and make sure that nvim-tree is updated to the latest version. + - type: textarea + attributes: + label: "Description" + description: "A short description of the problem you are reporting." + validations: + required: true + - type: textarea + attributes: + label: "Neovim version" + description: "Output of `nvim --version`" + render: markdown + placeholder: | + NVIM v0.6.1 + Build type: Release + LuaJIT 2.1.0-beta3 + validations: + required: true + - type: input + attributes: + label: "Operating system and version" + placeholder: "Linux 5.16.11-arch1-1, macOS 11.5, Windows 10" + validations: + required: true + - type: input + attributes: + label: "nvim-tree version" + placeholder: | + nvim-tree branch, commit or tag number + cd /nvim-tree.lua ; git log --format="%h" -n 1 + validations: + required: true + - type: textarea + attributes: + label: "Steps to reproduce" + description: "Steps to reproduce using the minimal config provided below." + placeholder: | + 1. `nvim -nu /tmp/nvt-min.lua` + 2. `:NvimTreeOpen` + 3. ... + validations: + required: true + - type: textarea + attributes: + label: "Expected behavior" + description: "A description of the behavior you expected:" + - type: textarea + attributes: + label: "Actual behavior" + description: "Observed behavior (may optionally include images, videos or a screencast)." + - type: textarea + attributes: + label: "Minimal config" + description: "Minimal(!) configuration necessary to reproduce the issue, using the latest version. Save this as `/tmp/nvt-min.lua`. If _absolutely_ necessary, add plugins and modify the nvim-tree setup at the indicated lines." + render: Lua + value: | + vim.cmd [[set runtimepath=$VIMRUNTIME]] + vim.cmd [[set packpath=/tmp/nvt-min/site]] + local package_root = '/tmp/nvt-min/site/pack' + local install_path = package_root .. '/packer/start/packer.nvim' + local function load_plugins() + require('packer').startup { + { + 'wbthomason/packer.nvim', + 'kyazdani42/nvim-tree.lua', + 'kyazdani42/nvim-web-devicons', + -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE + }, + config = { + package_root = package_root, + compile_path = install_path .. '/plugin/packer_compiled.lua', + display = { non_interactive = true }, + }, + } + end + if vim.fn.isdirectory(install_path) == 0 then + print("Installing nvim-tree and dependencies.") + vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path } + end + load_plugins() + require('packer').sync() + vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua setup()]] + vim.opt.termguicolors = true + vim.opt.cursorline = true + + -- MODIFY NVIM-TREE SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE + _G.setup = function() + vim.g.nvim_tree_indent_markers = 0 + vim.g.nvim_tree_git_hl = 0 + vim.g.nvim_tree_highlight_opened_files = 0 + vim.g.nvim_tree_root_folder_modifier = ':~' + vim.g.nvim_tree_add_trailing = 0 + vim.g.nvim_tree_group_empty = 0 + vim.g.nvim_tree_icon_padding = ' ' + vim.g.nvim_tree_symlink_arrow = ' ➛ ' + vim.g.nvim_tree_respect_buf_cwd = 0 + vim.g.nvim_tree_create_in_closed_folder = 0 + vim.g.nvim_tree_special_files = { ["Cargo.toml"] = true, Makefile = true, ["README.md"] = true, ["readme.md"] = true, } + vim.g.nvim_tree_show_icons = { git = 1, folders = 1, files = 1, folder_arrows = 1 } + require'nvim-tree'.setup { + auto_close = false, + auto_reload_on_write = true, + disable_netrw = false, + hide_root_folder = false, + hijack_cursor = false, + hijack_netrw = true, + hijack_unnamed_buffer_when_opening = false, + ignore_buffer_on_setup = false, + open_on_setup = false, + open_on_tab = false, + sort_by = "name", + update_cwd = false, + hijack_directories = { + enable = true, + auto_open = true, + }, + update_focused_file = { + enable = false, + update_cwd = false, + ignore_list = {} + }, + ignore_ft_on_setup = {}, + system_open = { + cmd = nil, + args = {} + }, + diagnostics = { + enable = false, + show_on_dirs = false, + icons = { + hint = "", + info = "", + warning = "", + error = "", + } + }, + filters = { + dotfiles = false, + custom = {}, + exclude = {} + }, + git = { + enable = true, + ignore = true, + timeout = 400, + }, + actions = { + change_dir = { + enable = true, + global = false, + }, + open_file = { + quit_on_open = false, + resize_window = false, + window_picker = { + enable = true, + } + } + }, + } + end + validations: + required: true + From 5b56a998ad7db7386c5b4b44dbd3630fba41934e Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 5 Mar 2022 12:56:12 +1100 Subject: [PATCH 2/7] #1033 add bug report template based on telescope --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 45f73cdf45c..b8ef452ca28 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -32,9 +32,9 @@ body: - type: input attributes: label: "nvim-tree version" + description: "cd /nvim-tree.lua ; git log --format='%h' -n 1" placeholder: | nvim-tree branch, commit or tag number - cd /nvim-tree.lua ; git log --format="%h" -n 1 validations: required: true - type: textarea From 1202aeb602e0768f8a533e1563165b285e2eb355 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 5 Mar 2022 13:02:46 +1100 Subject: [PATCH 3/7] #1033 add bug report template based on telescope --- .github/ISSUE_TEMPLATE/bug_report.yml | 30 ++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index b8ef452ca28..c70913f6451 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -19,7 +19,7 @@ body: render: markdown placeholder: | NVIM v0.6.1 - Build type: Release + Build type: Release LuaJIT 2.1.0-beta3 validations: required: true @@ -55,6 +55,34 @@ body: attributes: label: "Actual behavior" description: "Observed behavior (may optionally include images, videos or a screencast)." + - type: textarea + attributes: + label: "Lua Render Test 1" + render: Lua + value: | +local function cd_dot_cb(node) + tree.change_dir(vim.fn.getcwd(-1)) + if node.name ~= ".." then + lib.set_index_and_redraw(node.absolute_path) + end +end +require'nvim-tree'.setup { + update_cwd = true, +} + - type: textarea + attributes: + label: "Lua Render Test 2" + render: Lua + value: | + local function cd_dot_cb(node) + tree.change_dir(vim.fn.getcwd(-1)) + if node.name ~= ".." then + lib.set_index_and_redraw(node.absolute_path) + end + end + require'nvim-tree'.setup { + update_cwd = true, + } - type: textarea attributes: label: "Minimal config" From 4cba8dabc72fd4ca5e6023736294db1459bcdc76 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 5 Mar 2022 13:03:31 +1100 Subject: [PATCH 4/7] #1033 add bug report template based on telescope --- .github/ISSUE_TEMPLATE/bug_report.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index c70913f6451..0dd1b531cbd 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -55,20 +55,6 @@ body: attributes: label: "Actual behavior" description: "Observed behavior (may optionally include images, videos or a screencast)." - - type: textarea - attributes: - label: "Lua Render Test 1" - render: Lua - value: | -local function cd_dot_cb(node) - tree.change_dir(vim.fn.getcwd(-1)) - if node.name ~= ".." then - lib.set_index_and_redraw(node.absolute_path) - end -end -require'nvim-tree'.setup { - update_cwd = true, -} - type: textarea attributes: label: "Lua Render Test 2" From 4fe127af65155af284c7f5ce6be5802dd4c87ae6 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 5 Mar 2022 13:07:09 +1100 Subject: [PATCH 5/7] #1033 add bug report template based on telescope --- .github/ISSUE_TEMPLATE/bug_report.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 0dd1b531cbd..b7704b0229e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -56,9 +56,29 @@ body: label: "Actual behavior" description: "Observed behavior (may optionally include images, videos or a screencast)." - type: textarea + id: logs attributes: - label: "Lua Render Test 2" - render: Lua + label: "shell Render Test 1" + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell + - type: textarea + id: logs2 + attributes: + label: "shell Render Test 2" + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell + value: | + lcd () { + local PID=$(coredumpctl -1 | grep present | awk '{ print $5 }') + if [ -n "${PID}" ] + then + coredumpctl gdb "${PID}" + fi + } + - type: textarea + attributes: + label: "Lua Render Test 3" + render: lua value: | local function cd_dot_cb(node) tree.change_dir(vim.fn.getcwd(-1)) From b52cf5aaaa0e2606569eaaf29c451901619add0a Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 5 Mar 2022 13:12:28 +1100 Subject: [PATCH 6/7] #1033 add bug report template based on telescope --- .github/ISSUE_TEMPLATE/bug_report.yml | 36 +-------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index b7704b0229e..d42b7ff3582 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -32,7 +32,7 @@ body: - type: input attributes: label: "nvim-tree version" - description: "cd /nvim-tree.lua ; git log --format='%h' -n 1" + description: "`cd /nvim-tree.lua ; git log --format='%h' -n 1`" placeholder: | nvim-tree branch, commit or tag number validations: @@ -55,40 +55,6 @@ body: attributes: label: "Actual behavior" description: "Observed behavior (may optionally include images, videos or a screencast)." - - type: textarea - id: logs - attributes: - label: "shell Render Test 1" - description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - render: shell - - type: textarea - id: logs2 - attributes: - label: "shell Render Test 2" - description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - render: shell - value: | - lcd () { - local PID=$(coredumpctl -1 | grep present | awk '{ print $5 }') - if [ -n "${PID}" ] - then - coredumpctl gdb "${PID}" - fi - } - - type: textarea - attributes: - label: "Lua Render Test 3" - render: lua - value: | - local function cd_dot_cb(node) - tree.change_dir(vim.fn.getcwd(-1)) - if node.name ~= ".." then - lib.set_index_and_redraw(node.absolute_path) - end - end - require'nvim-tree'.setup { - update_cwd = true, - } - type: textarea attributes: label: "Minimal config" From 3c1d231dc56562e25f3e0764b51f775562d7e51e Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 5 Mar 2022 15:31:04 +1100 Subject: [PATCH 7/7] #1033 add bug report template based on telescope --- .github/ISSUE_TEMPLATE/bug_report.yml | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d42b7ff3582..86d1ed2bfe1 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -58,7 +58,7 @@ body: - type: textarea attributes: label: "Minimal config" - description: "Minimal(!) configuration necessary to reproduce the issue, using the latest version. Save this as `/tmp/nvt-min.lua`. If _absolutely_ necessary, add plugins and modify the nvim-tree setup at the indicated lines." + description: "Minimal(!) configuration necessary to reproduce the issue, using the latest version. Save this as `/tmp/nvt-min.lua` and run using `nvim -nu /tmp/nvt-min.lua`. If _absolutely_ necessary, add plugins and modify the nvim-tree setup at the indicated lines." render: Lua value: | vim.cmd [[set runtimepath=$VIMRUNTIME]] @@ -66,23 +66,23 @@ body: local package_root = '/tmp/nvt-min/site/pack' local install_path = package_root .. '/packer/start/packer.nvim' local function load_plugins() - require('packer').startup { - { - 'wbthomason/packer.nvim', - 'kyazdani42/nvim-tree.lua', - 'kyazdani42/nvim-web-devicons', - -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE - }, - config = { - package_root = package_root, - compile_path = install_path .. '/plugin/packer_compiled.lua', - display = { non_interactive = true }, - }, - } + require('packer').startup { + { + 'wbthomason/packer.nvim', + 'kyazdani42/nvim-tree.lua', + 'kyazdani42/nvim-web-devicons', + -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE + }, + config = { + package_root = package_root, + compile_path = install_path .. '/plugin/packer_compiled.lua', + display = { non_interactive = true }, + }, + } end if vim.fn.isdirectory(install_path) == 0 then - print("Installing nvim-tree and dependencies.") - vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path } + print("Installing nvim-tree and dependencies.") + vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path } end load_plugins() require('packer').sync()