diff --git a/nvim/dot-config/nvim/lazy-lock.json b/nvim/dot-config/nvim/lazy-lock.json index e2fffd7..c13e958 100644 --- a/nvim/dot-config/nvim/lazy-lock.json +++ b/nvim/dot-config/nvim/lazy-lock.json @@ -21,7 +21,7 @@ "mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "b129892f783740e6cf741f2ea09fa5dd512aa584" }, "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, - "neo-tree.nvim": { "branch": "main", "commit": "b529fb2ae9206ca1d84ee72b596deecbc088ac59" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, "nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" }, diff --git a/nvim/dot-config/nvim/lua/plugins/neotree.lua b/nvim/dot-config/nvim/lua/plugins/neotree.lua index e0dff87..98a7525 100644 --- a/nvim/dot-config/nvim/lua/plugins/neotree.lua +++ b/nvim/dot-config/nvim/lua/plugins/neotree.lua @@ -4,25 +4,33 @@ local file = require("symbols.file") return { "nvim-neo-tree/neo-tree.nvim", - version = "v2.x", + version = "v3.x", dependencies = { "nvim-lua/plenary.nvim", "MunifTanjim/nui.nvim", }, cmd = { "Neotree" }, keys = { - { "", "Neotree toggle reveal filesystem float", desc = "Open floating Neo-tree window" }, + { "", "Neotree toggle last", desc = "Open floating Neo-tree window" }, }, + -- netrw hijack does not work when lazy loading + lazy = false, config = function() - vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]]) - require("neo-tree").setup({ close_if_last_window = true, - enable_diagnostics = true, + popup_border_style = require("symbols.window").border, source_selector = { winbar = true, }, default_component_configs = { + diagnostics = { + highlights = { + hint = "DiagnosticHint", + info = "DiagnosticInfo", + warn = "DiagnosticWarn", + error = "DiagnosticError", + }, + }, icon = { folder_closed = fold.closed, folder_open = fold.open, @@ -38,30 +46,31 @@ return { git_status = { symbols = require("symbols.git"), }, + type = { + enabled = false, + }, + last_modified = { + enabled = false, + }, + symlink_target = { + enabled = true, + }, }, filesystem = { - filtered_items = { - hide_dotfiles = false, - hide_by_name = { - ".git", - }, + follow_current_file = { + enabled = true, }, + hijack_netrw_behavior = "open_current", use_libuv_file_watcher = true, + scan_mode = "deep", }, window = { + position = "float", mappings = { [""] = "close_window", [""] = "close_window", }, }, - buffers = { - window = { - mappings = { - ["bd"] = nil, - [""] = "buffer_delete", - }, - }, - }, }) end, } diff --git a/nvim/dot-config/nvim/lua/symbols/git.lua b/nvim/dot-config/nvim/lua/symbols/git.lua index 576bc66..af4b653 100644 --- a/nvim/dot-config/nvim/lua/symbols/git.lua +++ b/nvim/dot-config/nvim/lua/symbols/git.lua @@ -4,11 +4,11 @@ return { added = '✚', modified = '●', deleted = '✖', - renamed = '', + renamed = '󰁕', -- Status type untracked = '', - ignored = '', - unstaged = '', - staged = '', + ignored = '', + unstaged = '󰄱', + staged = '', conflict = '', } diff --git a/nvim/dot-config/nvim/lua/themes/gruvbox.lua b/nvim/dot-config/nvim/lua/themes/gruvbox.lua index dd25755..3b526aa 100644 --- a/nvim/dot-config/nvim/lua/themes/gruvbox.lua +++ b/nvim/dot-config/nvim/lua/themes/gruvbox.lua @@ -44,6 +44,14 @@ return { GitSignsAdd = { link = "GruvboxGreenSign" }, GitSignsChange = { link = "GruvboxAquaSign" }, GitSignsDelete = { link = "GruvboxRedSign" }, + NeoTreeGitAdded = { link = "GruboxGreen" }, + NeoTreeGitModified = { link = "GruvboxAqua" }, + NeoTreeGitDelete = { link = "GruboxRed" }, + NeoTreeFloatTitle = { link = "TelescopePromptTitle" }, + NeoTreeTabActive = { fg = palette.dark0, bg = palette.bright_blue }, + NeoTreeTabInactive = { fg = palette.light4, bg = palette.dark2 }, + NeoTreeTabSeparatorActive = { link = "NeoTreeTabActive" }, + NeoTreeTabSeparatorInactive = { link = "NeoTreeTabInactive" }, }, })