diff --git a/lazy-lock.json b/lazy-lock.json index ed95225..c98dc39 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -13,19 +13,17 @@ "lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" }, "lspsaga.nvim": { "branch": "main", "commit": "5faeec9f2508d2d49a66c0ac0d191096b4e3fa81" }, "lualine.nvim": { "branch": "master", "commit": "af4c3cf17206810880d2a93562e0a4c0d901c684" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "742db4e60c74e5fbcc596aaf9e7575e1342dfd09" }, - "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, "nvim-autopairs": { "branch": "master", "commit": "797260ff31e8bdd9db0f0c352659a35aba335b0b" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, "nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" }, "nvim-lint": { "branch": "master", "commit": "03b1fc593638098a35de26d768d5f43b0fe57041" }, "nvim-lspconfig": { "branch": "master", "commit": "eb012f03bb3b4aca9e875d146008b923d0e07e65" }, + "nvim-tree.lua": { "branch": "master", "commit": "f7c09bd72e50e1795bd3afb9e2a2b157b4bfb3c3" }, "nvim-treesitter": { "branch": "master", "commit": "03f650705c0c10f97b214ca4ecca3c25ff9bee7d" }, "nvim-treesitter-context": { "branch": "master", "commit": "2484f58384be24da375558c88402f2998193eff6" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" }, "nvim-web-devicons": { "branch": "master", "commit": "cb0c967c9723a76ccb1be0cc3a9a10e577d2f6ec" }, - "plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" }, "telescope.nvim": { "branch": "master", "commit": "3b8399c27380d09c44f55c8fbeff0bd7a4ed3f8d" }, "vim-bbye": { "branch": "master", "commit": "25ef93ac5a87526111f43e5110675032dbcacf56" }, "vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" }, diff --git a/lua/configs/neotree.lua b/lua/configs/neotree.lua index f7dc534..947baa1 100644 --- a/lua/configs/neotree.lua +++ b/lua/configs/neotree.lua @@ -7,6 +7,7 @@ local function config() hide_gitignored = false, always_show = { '.github', + '.gitignore', }, never_show = { -- hide_by_name '__pycache__', diff --git a/lua/configs/nvim-tree.lua b/lua/configs/nvim-tree.lua new file mode 100644 index 0000000..be4cc93 --- /dev/null +++ b/lua/configs/nvim-tree.lua @@ -0,0 +1,76 @@ +local function config() + local status_ok, nvimtree = pcall(require, 'nvim-tree') + if not status_ok then + return + end + + nvimtree.setup({ + filters = { + dotfiles = false, + custom = { + '^\\.git$', + '^\\.mypy_cache$', + '^\\.test_cache$', + '^\\.coverage$', + '^node_modules$', + }, + }, + view = { + width = 40, + side = 'left', + number = false, + relativenumber = false, + signcolumn = 'yes', + }, + renderer = { + root_folder_label = false, + indent_markers = { + enable = false, + icons = { + corner = '└ ', + edge = '│ ', + none = ' ', + }, + }, + icons = { + webdev_colors = true, + glyphs = { + folder = { + symlink_open = '', + }, + }, + }, + }, + disable_netrw = true, + hijack_netrw = true, + open_on_tab = false, + actions = { + open_file = { + quit_on_open = false, + window_picker = { + enable = false, + }, + }, + }, + hijack_cursor = true, + update_focused_file = { + enable = true, + }, + diagnostics = { + enable = false, + icons = { + hint = '', + info = '', + warning = '', + error = '', + }, + }, + git = { + enable = true, + ignore = false, + timeout = 500, + }, + }) +end + +return config diff --git a/lua/keybinds.lua b/lua/keybinds.lua index 817e88a..e2aa7a3 100644 --- a/lua/keybinds.lua +++ b/lua/keybinds.lua @@ -46,8 +46,8 @@ map('n', 'dd', 'lua vim.diagnostic.disable()', opts) -- Toggle Context map('n', 'c', 'TSContextToggle', opts) --- neotree -map('n', 'e', 'Neotree toggle', opts) +-- nvim-tree +map('n', 'e', 'NvimTreeToggle', opts) -- Telescope (See also configs/telescope.lua) map('n', 'ff', 'Telescope find_files', opts) diff --git a/lua/plugins.lua b/lua/plugins.lua index 867014d..5b4047e 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -27,16 +27,7 @@ require('lazy').setup({ { 'nvim-lualine/lualine.nvim', config = require('configs.lualine') }, -- tree - { - 'nvim-neo-tree/neo-tree.nvim', - branch = 'v3.x', - dependencies = { - 'nvim-lua/plenary.nvim', - 'nvim-tree/nvim-web-devicons', - 'MunifTanjim/nui.nvim', - }, - config = require('configs.neotree'), - }, + { 'nvim-tree/nvim-tree.lua', dependencies = { 'nvim-tree/nvim-web-devicons', 'nvim-lua/plenary.nvim' }, config = require('configs.nvim-tree') }, -- show indentation { 'lukas-reineke/indent-blankline.nvim', config = require('configs.indent-blankline') },