Netrw is disabled, as nvim-tree needs to own directory buffers so `nvim .` opens the tree rather than the two fighting over it. That removes :Ex, so the Obsidian guide has been updated to point at <leader>e instead. No auto-open autocmd: `nvim <path>` opens just the file, and the tree is there on <leader>e when it is wanted. Placing it on the right also flips the split direction, so opening a file from the tree puts it to the left rather than displacing the tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
12 lines
417 B
Lua
12 lines
417 B
Lua
-- Must be set before netrw loads, which happens after init.lua is sourced.
|
|
-- nvim-tree takes over directory buffers, so `nvim .` opens the tree.
|
|
vim.g.loaded_netrw = 1
|
|
vim.g.loaded_netrwPlugin = 1
|
|
|
|
vim.pack.add({ 'https://github.com/nvim-tree/nvim-tree.lua' })
|
|
|
|
require('nvim-tree').setup({
|
|
view = { side = 'right' },
|
|
})
|
|
|
|
vim.keymap.set('n', '<leader>e', '<Cmd>NvimTreeToggle<CR>', { desc = 'Toggle file tree' })
|