from packer to lazy

This commit is contained in:
2025-12-17 21:32:34 +07:00
parent 40aee7d3ce
commit 3c21e12bf3
38 changed files with 743 additions and 672 deletions

View File

@@ -1,48 +1,27 @@
local highlights = require("neo-tree.ui.highlights")
require('neo-tree').setup({
filesystem = {
components = {
--[[
icon = function(config, node, state)
local icon = config.default or ' '
local padding = config.padding or ' '
local highlight = config.highlight or highlights.FILE_ICON
if node.type == 'directory' then
highlight = highlights.DIRECTORY_ICON
if node:is_expanded() then
icon = config.folder_open or '-'
else
icon = config.folder_closed or '+'
end
elseif node.type == 'file' then
local success, web_devicons = pcall(require, 'nvim-web-devicons')
if success then
local devicon, hl = web_devicons.get_icon(node.name, node.ext)
icon = devicon or icon
highlight = hl or highlight
end
end
return {
text = icon .. padding,
highlight = highlight
}
end
},
]]
window = {
mappings = {
['o'] = 'system_open'
},
},
commands = {
-- Открытие файла через программу по умолчанию в операционной системе
system_open = function(state)
vim.api.nvim_command(string.format('silent !xdg-open \'%s\'', state.tree:get_node():get_id()))
end,
}
}
}
})
-- Neovim plugin to manage the file system
-- and other tree like structures
return {
'nvim-neo-tree/neo-tree.nvim',
enabled = true,
lazy = false,
priority = 60,
branch = 'v3.x',
dependencies = {
-- Lua functions
{ 'nvim-lua/plenary.nvim' },
-- Provides Nerd Font icons (glyphs) for use by neovim plugins
{ 'nvim-tree/nvim-web-devicons' },
-- UI Component Library for Neovim
{ 'MunifTanjim/nui.nvim' },
},
opts = {
close_if_last_window = true,
clipboard = {
sync = "global"
},
enable_git_status = true,
enable_diagnostics = true
}
}