Closed jrichardsz closed 5 months ago
I use neo tree for that.
-- :Neotree to open it
-- docs for additional config:
-- https://github.com/nvim-neo-tree/neo-tree.nvim?tab=readme-ov-file#quickstart
return {
'nvim-neo-tree/neo-tree.nvim',
version = '*',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim',
},
config = function()
require('neo-tree').setup {
filesystem = {
filtered_items = {
visible = true,
hide_dotfiles = false,
hide_gitignored = true,
},
}
}
end,
}
And press <leader>ft
to toggle it
vim.keymap.set('n', '<leader>ft', function()
vim.cmd 'Neotree toggle'
end, { desc = '[F]ile [T]tree' })
If you just type in nvim
it opens the current folder by default. You can then press space+s+f (<leader>sf
) to search for a file.
@jrichardsz The neo-tree plugin is already included in the kickstart repo but is commented out by default.
All you need to do is uncomment the require 'kickstart.plugins.neo-tree'
on line 880 in init.lua, here is a diff:
diff --git a/init.lua b/init.lua
index 036eefb..784f748 100644
--- a/init.lua
+++ b/init.lua
@@ -877,7 +877,7 @@ require('lazy').setup({
-- require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
- -- require 'kickstart.plugins.neo-tree',
+ require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
Then restart nvim and press the key \
which is the default keymap for neo-tree
, or type :Neotree
. You can of course customize the keymaps to your liking.
Use neotree as described. Thanks for the issue!
@jrichardsz The neo-tree plugin is already included in the kickstart repo but is commented out by default. All you need to do is uncomment the
require 'kickstart.plugins.neo-tree'
on line 880 in init.lua, here is a diff:diff --git a/init.lua b/init.lua index 036eefb..784f748 100644 --- a/init.lua +++ b/init.lua @@ -877,7 +877,7 @@ require('lazy').setup({ -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.neo-tree', -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
Then restart nvim and press the key
\
which is the default keymap forneo-tree
, or type:Neotree
. You can of course customize the keymaps to your liking.
Thanks it worked.
file browser plugin example
I use neo tree for that.
-- :Neotree to open it -- docs for additional config: -- https://github.com/nvim-neo-tree/neo-tree.nvim?tab=readme-ov-file#quickstart return { 'nvim-neo-tree/neo-tree.nvim', version = '*', dependencies = { 'nvim-lua/plenary.nvim', 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended 'MunifTanjim/nui.nvim', }, config = function() require('neo-tree').setup { filesystem = { filtered_items = { visible = true, hide_dotfiles = false, hide_gitignored = true, }, } } end, }
And press
<leader>ft
to toggle itvim.keymap.set('n', '<leader>ft', function() vim.cmd 'Neotree toggle' end, { desc = '[F]ile [T]tree' })
plain kickstarter workflow
If you just type in
nvim
it opens the current folder by default. You can then press space+s+f (<leader>sf
) to search for a file.
Neo Tree works very well. Thank you!
I know this is not a issue of your starter.
But please help me to start a simple left tree editor.
I followed your readme.md and
:Lazy
worksBut whats next?
I only need to have a simple left side tree browser and right side with editor like this
I researched but this is so simple that no one wrote a post