change-dir have an error when open a new terminal
BYT0723 opened this issue · comments
Description
neovim report an error when open a terminal.
Message means "Command execution failed"
Neovim version
NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
Operating system and version
Linux 6.1.19-1-lts
nvim-tree version
Minimal config
require("nvim-tree").setup({ -- BEGIN_DEFAULT_OPTS
auto_reload_on_write = true,
disable_netrw = false,
hijack_cursor = false,
hijack_netrw = true,
hijack_unnamed_buffer_when_opening = false,
ignore_buffer_on_setup = false,
open_on_setup = false,
open_on_setup_file = false,
open_on_tab = false,
sort_by = "name",
respect_buf_cwd = false,
view = {
width = 40,
hide_root_folder = false,
side = "left",
preserve_window_proportions = false,
number = false,
relativenumber = false,
signcolumn = "yes",
mappings = {
custom_only = false,
list = require("keybindings").nvim_tree(),
},
},
renderer = {
indent_markers = {
enable = false,
icons = {
corner = "└ ",
edge = "│ ",
none = " ",
},
},
icons = theme.nvim_tree,
},
hijack_directories = {
enable = true,
auto_open = true,
},
update_focused_file = {
enable = true,
update_root = true,
ignore_list = {},
},
ignore_ft_on_setup = {},
system_open = {
cmd = "xdg-open",
args = {},
},
diagnostics = {
enable = true,
show_on_dirs = true,
icons = {
error = theme.diagnostic.error,
warning = theme.diagnostic.warn,
hint = theme.diagnostic.hint,
info = theme.diagnostic.info,
},
},
filters = {
dotfiles = false,
custom = {},
exclude = {},
},
git = {
enable = true,
ignore = false,
timeout = 400,
},
actions = {
use_system_clipboard = true,
change_dir = {
enable = true,
global = false,
restrict_above_cwd = false,
},
open_file = {
quit_on_open = true,
resize_window = true,
window_picker = {
enable = true,
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
exclude = {
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
buftype = { "nofile", "terminal", "help" },
},
},
},
},
trash = {
cmd = "gio trash",
require_confirm = true,
},
log = {
enable = false,
truncate = false,
types = {
all = false,
config = false,
copy_paste = false,
diagnostics = false,
git = false,
profile = false,
},
},
})
Steps to reproduce
- open neovim
- NvimTreeOpen then open a terminal
Expected behavior
Errors will not affect the work of nvim-tree. when buftype is terminal, don't change-dir
Actual behavior
No response
The same
same here, when open terminal for the first time
same here
update_focused_file = {
enable = true,
update_root = true,
ignore_list = { "toggleterm" },
},
just ignore termnial filetype
update_focused_file = { enable = true, update_root = true, ignore_list = { "toggleterm", "term" }, },just ignore termnial filetype
when you use default terminal instead using toggleterm, please using above config. Thank @BYT0723
I get this error also, when using Hoffs/omnisharp-extended-lsp.nvim (using the feat/sourcegen-support
branch) and opening metadata and source-generated C# buffers.
$metadata$
buffers were easy enough to add to the ignore_list
... But for generated source files, I don't see a reliable convention to base an ignore_list
item on; they just look like regular C# files, except that they don't exist.
Minimum to replicate:
update_focused_file = {
enable = true,
update_root = true,
},