local K = require('core.keymap') return { 'nvim-neo-tree/neo-tree.nvim', branch = 'v3.x', dependencies = { 'nvim-lua/plenary.nvim', 'nvim-tree/nvim-web-devicons', 'MunifTanjim/nui.nvim', }, config = function() -- Setup -- require('neo-tree').setup({ close_if_last_window = false, enable_git_status = true, enable_diagnostics = true, name = { trailing_slash = false, use_git_status_colors = true, highlight = 'NeoTreeFileName', }, git_status = { symbols = { -- Git Change type Icon -- added = '✚', modified = '', deleted = '✖', renamed = '󰁕', -- Git Status type Icon -- untracked = '', ignored = '', unstaged = '󰄱', staged = '', conflict = '', }, }, symlink_target = { enabled = false, }, filesystem = { hijack_netrw_behavior = 'open_default', }, -- Keybinding -- window = { mappings = { [''] = 'open', }, }, }) -- Dignostic Icons -- vim.fn.sign_define('DiagnosticSignError', { text = ' ', texthl = 'DiagnosticSignError', }) vim.fn.sign_define('DiagnosticSignWarn', { text = ' ', texthl = 'DiagnosticSignWarn', }) vim.fn.sign_define('DiagnosticSignInfo', { text = ' ', texthl = 'DiagnosticSignInfo', }) vim.fn.sign_define('DiagnosticSignHint', { text = '󰌵', texthl = 'DiagnosticSignHint', }) -- Keybinding -- vim.keymap.set( K.FILE_TREE.TOGGLE.mode, K.FILE_TREE.TOGGLE.shortcut, ':Neotree toggle reveal left', { desc = K.FILE_TREE.TOGGLE.description } ) vim.keymap.set( K.FILE_TREE.SHOW_OPEN.mode, K.FILE_TREE.SHOW_OPEN.shortcut, ':Neotree buffers reveal float', { desc = K.FILE_TREE.SHOW_OPEN.description } ) end, }