54 lines
2.0 KiB
Lua
54 lines
2.0 KiB
Lua
-- If you want icons for diagnostic errors, you'll need to define them somewhere:
|
|
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' })
|
|
|
|
local utils = require('utils')
|
|
|
|
require('neo-tree').setup({
|
|
window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for
|
|
-- possible options. These can also be functions that return these options.
|
|
position = 'float', -- left, right, float, current
|
|
width = 40, -- applies to left and right positions
|
|
popup = { -- settings that apply to float position only
|
|
size = {
|
|
height = '80%',
|
|
width = '50%',
|
|
},
|
|
position = '50%', -- 50% means center it
|
|
-- you can also specify border here, if you want a different setting from
|
|
-- the global popup_border_style.
|
|
},
|
|
-- Mappings for tree window. See `:h nep-tree-mappings` for a list of built-in commands.
|
|
-- You can also create your own commands by providing a function instead of a string.
|
|
mappings = {
|
|
['<space>'] = 'toggle_node',
|
|
['<2-LeftMouse>'] = 'open',
|
|
['<cr>'] = 'open',
|
|
['s'] = 'open_split',
|
|
['v'] = 'open_vsplit',
|
|
['C'] = 'close_node',
|
|
['z'] = 'close_all_nodes',
|
|
['R'] = 'refresh',
|
|
['a'] = 'add',
|
|
['A'] = 'add_directory',
|
|
['d'] = 'delete',
|
|
['r'] = 'rename',
|
|
['y'] = 'copy_to_clipboard',
|
|
['x'] = 'cut_to_clipboard',
|
|
['p'] = 'paste_from_clipboard',
|
|
['c'] = 'copy', -- takes text input for destination
|
|
['m'] = 'move', -- takes text input for destination
|
|
['q'] = 'close_window',
|
|
},
|
|
},
|
|
filesystem = {
|
|
filtered_items = {
|
|
hide_dotfiles = false,
|
|
hide_gitignored = false,
|
|
},
|
|
}
|
|
})
|
|
utils.map('n', '\\', '<cmd>Neotree reveal<cr>')
|