mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 16:39:04 +02:00
add: config nvim tree float
This commit is contained in:
parent
990f8606e0
commit
1f5323945b
5 changed files with 547 additions and 474 deletions
|
@ -37,7 +37,7 @@
|
||||||
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
||||||
"nvim-scrollview": { "branch": "main", "commit": "c29c5f69d37040a1fac88cbea7f5e6f06f0aff4d" },
|
"nvim-scrollview": { "branch": "main", "commit": "c29c5f69d37040a1fac88cbea7f5e6f06f0aff4d" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" },
|
"nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "f770df9c8cd56c05b878cdf35115ad872c822bc0" },
|
"nvim-treesitter": { "branch": "master", "commit": "b7d50e59b1b2990b3ce8761d4cf595f4b71c87e2" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3557e41418b4a6c5b85d5d64abe94c9c50fa9b14" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3557e41418b4a6c5b85d5d64abe94c9c50fa9b14" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "bcf3146864262ef2d3c877beba3e222b5c73780d" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "bcf3146864262ef2d3c877beba3e222b5c73780d" },
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
|
||||||
|
|
|
@ -108,3 +108,7 @@ vim.g.pcode_coderunner = {
|
||||||
vim.g.pcode_cmprg = false --https://github.com/lukas-reineke/cmp-rg
|
vim.g.pcode_cmprg = false --https://github.com/lukas-reineke/cmp-rg
|
||||||
vim.g.pcode_cmpcalc = false --https://github.com/hrsh7th/cmp-calc
|
vim.g.pcode_cmpcalc = false --https://github.com/hrsh7th/cmp-calc
|
||||||
vim.g.pcode_cmptag = false --https://github.com/quangnguyen30192/cmp-nvim-tags
|
vim.g.pcode_cmptag = false --https://github.com/quangnguyen30192/cmp-nvim-tags
|
||||||
|
|
||||||
|
-- 0 = normal
|
||||||
|
-- 1 = float
|
||||||
|
vim.g.pcode_nvimtree_isfloat = 0
|
||||||
|
|
|
@ -1,255 +1,255 @@
|
||||||
local icons = vim.g.pcode_icons
|
-- local icons = vim.g.pcode_icons
|
||||||
local HEIGHT_RATIO = 0.9 -- You can change this
|
-- local HEIGHT_RATIO = 0.9 -- You can change this
|
||||||
local WIDTH_RATIO = 0.5 -- You can change this too
|
-- local WIDTH_RATIO = 0.5 -- You can change this too
|
||||||
return {
|
return {
|
||||||
-- "kyazdani42/nvim-tree.lua",
|
-- "kyazdani42/nvim-tree.lua",
|
||||||
-- lazy = true,
|
-- lazy = true,
|
||||||
-- cmd = { "NvimTreeFindFileToggle","NvimTree", "NvimTreeOpen", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" },
|
-- cmd = { "NvimTreeFindFileToggle", "NvimTree", "NvimTreeOpen", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" },
|
||||||
-- opts = {
|
-- opts = {
|
||||||
-- auto_reload_on_write = false,
|
-- auto_reload_on_write = false,
|
||||||
-- disable_netrw = false,
|
-- disable_netrw = false,
|
||||||
-- hijack_cursor = false,
|
-- hijack_cursor = false,
|
||||||
-- hijack_netrw = true,
|
-- hijack_netrw = true,
|
||||||
-- hijack_unnamed_buffer_when_opening = false,
|
-- hijack_unnamed_buffer_when_opening = false,
|
||||||
-- sort_by = "name",
|
-- sort_by = "name",
|
||||||
-- root_dirs = {},
|
-- root_dirs = {},
|
||||||
-- prefer_startup_root = false,
|
-- prefer_startup_root = false,
|
||||||
-- sync_root_with_cwd = true,
|
-- sync_root_with_cwd = true,
|
||||||
-- reload_on_bufenter = false,
|
-- reload_on_bufenter = false,
|
||||||
-- respect_buf_cwd = false,
|
-- respect_buf_cwd = false,
|
||||||
-- on_attach = "default",
|
-- on_attach = "default",
|
||||||
-- select_prompts = false,
|
-- select_prompts = false,
|
||||||
-- view = {
|
-- view = {
|
||||||
-- adaptive_size = false,
|
-- adaptive_size = false,
|
||||||
-- centralize_selection = true,
|
-- centralize_selection = true,
|
||||||
-- -- width = 30,
|
-- -- width = 30,
|
||||||
-- side = "left",
|
-- side = "left",
|
||||||
-- preserve_window_proportions = false,
|
-- preserve_window_proportions = false,
|
||||||
-- number = false,
|
-- number = false,
|
||||||
-- relativenumber = false,
|
-- relativenumber = false,
|
||||||
-- signcolumn = "yes",
|
-- signcolumn = "yes",
|
||||||
-- -- float = {
|
-- -- float = {
|
||||||
-- -- enable = false,
|
-- -- enable = false,
|
||||||
-- -- quit_on_focus_loss = true,
|
-- -- quit_on_focus_loss = true,
|
||||||
-- -- open_win_config = {
|
-- -- open_win_config = {
|
||||||
-- -- relative = "editor",
|
-- -- relative = "editor",
|
||||||
-- -- border = "rounded",
|
-- -- border = "rounded",
|
||||||
-- -- width = 30,
|
-- -- width = 30,
|
||||||
-- -- height = 30,
|
-- -- height = 30,
|
||||||
-- -- row = 1,
|
-- -- row = 1,
|
||||||
-- -- col = 1,
|
-- -- col = 1,
|
||||||
-- -- },
|
-- -- },
|
||||||
-- -- },
|
-- -- },
|
||||||
-- float = {
|
-- float = {
|
||||||
-- enable = true,
|
-- enable = true,
|
||||||
-- open_win_config = function()
|
-- open_win_config = function()
|
||||||
-- local screen_w = vim.opt.columns:get()
|
-- local screen_w = vim.opt.columns:get()
|
||||||
-- local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get()
|
-- local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get()
|
||||||
-- local window_w = screen_w * WIDTH_RATIO
|
-- local window_w = screen_w * WIDTH_RATIO
|
||||||
-- local window_h = screen_h * HEIGHT_RATIO
|
-- local window_h = screen_h * HEIGHT_RATIO
|
||||||
-- local window_w_int = math.floor(window_w)
|
-- local window_w_int = math.floor(window_w)
|
||||||
-- local window_h_int = math.floor(window_h)
|
-- local window_h_int = math.floor(window_h)
|
||||||
-- local center_x = (screen_w - window_w) / 2
|
-- local center_x = (screen_w - window_w) / 2
|
||||||
-- local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get()
|
-- local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get()
|
||||||
-- return {
|
-- return {
|
||||||
-- border = "rounded",
|
-- border = "rounded",
|
||||||
-- relative = "editor",
|
-- relative = "editor",
|
||||||
-- row = center_y,
|
-- row = center_y,
|
||||||
-- col = center_x,
|
-- col = center_x,
|
||||||
-- width = window_w_int,
|
-- width = window_w_int,
|
||||||
-- height = window_h_int,
|
-- height = window_h_int,
|
||||||
-- }
|
-- }
|
||||||
-- end,
|
-- end,
|
||||||
-- },
|
-- },
|
||||||
-- width = function()
|
-- width = function()
|
||||||
-- return math.floor(vim.opt.columns:get() * WIDTH_RATIO)
|
-- return math.floor(vim.opt.columns:get() * WIDTH_RATIO)
|
||||||
-- end,
|
-- end,
|
||||||
-- },
|
-- },
|
||||||
-- renderer = {
|
-- renderer = {
|
||||||
-- add_trailing = false,
|
-- add_trailing = false,
|
||||||
-- group_empty = false,
|
-- group_empty = false,
|
||||||
-- highlight_git = true,
|
-- highlight_git = true,
|
||||||
-- full_name = false,
|
-- full_name = false,
|
||||||
-- highlight_opened_files = "none",
|
-- highlight_opened_files = "none",
|
||||||
-- -- root_folder_label = ":t",
|
-- -- root_folder_label = ":t",
|
||||||
-- root_folder_label = false,
|
-- root_folder_label = false,
|
||||||
-- indent_width = 2,
|
-- indent_width = 2,
|
||||||
-- indent_markers = {
|
-- indent_markers = {
|
||||||
-- enable = true,
|
-- enable = true,
|
||||||
-- inline_arrows = true,
|
-- inline_arrows = true,
|
||||||
-- icons = {
|
-- icons = {
|
||||||
-- corner = "└",
|
-- corner = "└",
|
||||||
-- edge = "│",
|
-- edge = "│",
|
||||||
-- item = "│",
|
-- item = "│",
|
||||||
-- none = " ",
|
-- none = " ",
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- icons = {
|
-- icons = {
|
||||||
-- webdev_colors = true,
|
-- webdev_colors = true,
|
||||||
-- git_placement = "before",
|
-- git_placement = "before",
|
||||||
-- padding = " ",
|
-- padding = " ",
|
||||||
-- symlink_arrow = " ➛ ",
|
-- symlink_arrow = " ➛ ",
|
||||||
-- show = {
|
-- show = {
|
||||||
-- file = true,
|
-- file = true,
|
||||||
-- folder = true,
|
-- folder = true,
|
||||||
-- folder_arrow = true,
|
-- folder_arrow = true,
|
||||||
-- git = true,
|
-- git = true,
|
||||||
-- },
|
-- },
|
||||||
-- glyphs = {
|
-- glyphs = {
|
||||||
-- default = icons.ui.Text,
|
-- default = icons.ui.Text,
|
||||||
-- symlink = icons.ui.FileSymlink,
|
-- symlink = icons.ui.FileSymlink,
|
||||||
-- bookmark = icons.ui.BookMark,
|
-- bookmark = icons.ui.BookMark,
|
||||||
-- folder = {
|
-- folder = {
|
||||||
-- -- arrow_closed = icons.ui.TriangleShortArrowRight,
|
-- -- arrow_closed = icons.ui.TriangleShortArrowRight,
|
||||||
-- arrow_closed = icons.ui.ChevronShortRight,
|
-- arrow_closed = icons.ui.ChevronShortRight,
|
||||||
-- -- arrow_open = icons.ui.TriangleShortArrowDown,
|
-- -- arrow_open = icons.ui.TriangleShortArrowDown,
|
||||||
-- arrow_open = icons.ui.ChevronShortDown,
|
-- arrow_open = icons.ui.ChevronShortDown,
|
||||||
-- default = icons.ui.Folder,
|
-- default = icons.ui.Folder,
|
||||||
-- open = icons.ui.FolderOpen,
|
-- open = icons.ui.FolderOpen,
|
||||||
-- empty = icons.ui.EmptyFolder,
|
-- empty = icons.ui.EmptyFolder,
|
||||||
-- empty_open = icons.ui.EmptyFolderOpen,
|
-- empty_open = icons.ui.EmptyFolderOpen,
|
||||||
-- symlink = icons.ui.FolderSymlink,
|
-- symlink = icons.ui.FolderSymlink,
|
||||||
-- symlink_open = icons.ui.FolderOpen,
|
-- symlink_open = icons.ui.FolderOpen,
|
||||||
-- },
|
-- },
|
||||||
-- git = {
|
-- git = {
|
||||||
-- unstaged = icons.git.FileUnstaged,
|
-- unstaged = icons.git.FileUnstaged,
|
||||||
-- staged = icons.git.FileStaged,
|
-- staged = icons.git.FileStaged,
|
||||||
-- unmerged = icons.git.FileUnmerged,
|
-- unmerged = icons.git.FileUnmerged,
|
||||||
-- renamed = icons.git.FileRenamed,
|
-- renamed = icons.git.FileRenamed,
|
||||||
-- untracked = icons.git.FileUntracked,
|
-- untracked = icons.git.FileUntracked,
|
||||||
-- deleted = icons.git.FileDeleted,
|
-- deleted = icons.git.FileDeleted,
|
||||||
-- ignored = icons.git.FileIgnored,
|
-- ignored = icons.git.FileIgnored,
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" },
|
-- special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" },
|
||||||
-- symlink_destination = true,
|
-- symlink_destination = true,
|
||||||
-- },
|
-- },
|
||||||
-- hijack_directories = {
|
-- hijack_directories = {
|
||||||
-- enable = false,
|
-- enable = false,
|
||||||
-- auto_open = true,
|
-- auto_open = true,
|
||||||
-- },
|
-- },
|
||||||
-- update_focused_file = {
|
-- update_focused_file = {
|
||||||
-- enable = true,
|
-- enable = true,
|
||||||
-- debounce_delay = 15,
|
-- debounce_delay = 15,
|
||||||
-- update_root = true,
|
-- update_root = true,
|
||||||
-- ignore_list = {},
|
-- ignore_list = {},
|
||||||
-- },
|
-- },
|
||||||
-- diagnostics = {
|
-- diagnostics = {
|
||||||
-- enable = true,
|
-- enable = true,
|
||||||
-- show_on_dirs = false,
|
-- show_on_dirs = false,
|
||||||
-- show_on_open_dirs = true,
|
-- show_on_open_dirs = true,
|
||||||
-- debounce_delay = 50,
|
-- debounce_delay = 50,
|
||||||
-- severity = {
|
-- severity = {
|
||||||
-- min = vim.diagnostic.severity.HINT,
|
-- min = vim.diagnostic.severity.HINT,
|
||||||
-- max = vim.diagnostic.severity.ERROR,
|
-- max = vim.diagnostic.severity.ERROR,
|
||||||
-- },
|
-- },
|
||||||
-- icons = {
|
-- icons = {
|
||||||
-- hint = icons.diagnostics.BoldHint,
|
-- hint = icons.diagnostics.BoldHint,
|
||||||
-- info = icons.diagnostics.BoldInformation,
|
-- info = icons.diagnostics.BoldInformation,
|
||||||
-- warning = icons.diagnostics.BoldWarning,
|
-- warning = icons.diagnostics.BoldWarning,
|
||||||
-- error = icons.diagnostics.BoldError,
|
-- error = icons.diagnostics.BoldError,
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- filters = {
|
-- filters = {
|
||||||
-- dotfiles = false,
|
-- dotfiles = false,
|
||||||
-- git_clean = false,
|
-- git_clean = false,
|
||||||
-- no_buffer = false,
|
-- no_buffer = false,
|
||||||
-- custom = { "node_modules", "\\.cache", "\\.git" },
|
-- custom = { "node_modules", "\\.cache", "\\.git" },
|
||||||
-- exclude = {
|
-- exclude = {
|
||||||
-- ".gitignore",
|
-- ".gitignore",
|
||||||
-- ".prettierignore",
|
-- ".prettierignore",
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- filesystem_watchers = {
|
-- filesystem_watchers = {
|
||||||
-- enable = true,
|
-- enable = true,
|
||||||
-- debounce_delay = 50,
|
-- debounce_delay = 50,
|
||||||
-- ignore_dirs = {},
|
-- ignore_dirs = {},
|
||||||
-- },
|
-- },
|
||||||
-- git = {
|
-- git = {
|
||||||
-- enable = true,
|
-- enable = true,
|
||||||
-- ignore = false,
|
-- ignore = false,
|
||||||
-- show_on_dirs = true,
|
-- show_on_dirs = true,
|
||||||
-- show_on_open_dirs = true,
|
-- show_on_open_dirs = true,
|
||||||
-- disable_for_dirs = {},
|
-- disable_for_dirs = {},
|
||||||
-- timeout = 400,
|
-- timeout = 400,
|
||||||
-- },
|
-- },
|
||||||
-- actions = {
|
-- actions = {
|
||||||
-- use_system_clipboard = true,
|
-- use_system_clipboard = true,
|
||||||
-- change_dir = {
|
-- change_dir = {
|
||||||
-- enable = true,
|
-- enable = true,
|
||||||
-- global = false,
|
-- global = false,
|
||||||
-- restrict_above_cwd = false,
|
-- restrict_above_cwd = false,
|
||||||
-- },
|
-- },
|
||||||
-- expand_all = {
|
-- expand_all = {
|
||||||
-- max_folder_discovery = 300,
|
-- max_folder_discovery = 300,
|
||||||
-- exclude = {},
|
-- exclude = {},
|
||||||
-- },
|
-- },
|
||||||
-- file_popup = {
|
-- file_popup = {
|
||||||
-- open_win_config = {
|
-- open_win_config = {
|
||||||
-- col = 1,
|
-- col = 1,
|
||||||
-- row = 1,
|
-- row = 1,
|
||||||
-- relative = "cursor",
|
-- relative = "cursor",
|
||||||
-- border = "shadow",
|
-- border = "shadow",
|
||||||
-- style = "minimal",
|
-- style = "minimal",
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- open_file = {
|
-- open_file = {
|
||||||
-- quit_on_open = false,
|
-- quit_on_open = false,
|
||||||
-- resize_window = false,
|
-- resize_window = false,
|
||||||
-- window_picker = {
|
-- window_picker = {
|
||||||
-- enable = true,
|
-- enable = true,
|
||||||
-- picker = "default",
|
-- picker = "default",
|
||||||
-- chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
|
-- chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
|
||||||
-- exclude = {
|
-- exclude = {
|
||||||
-- filetype = { "notify", "lazy", "qf", "diff", "fugitive", "fugitiveblame" },
|
-- filetype = { "notify", "lazy", "qf", "diff", "fugitive", "fugitiveblame" },
|
||||||
-- buftype = { "nofile", "terminal", "help" },
|
-- buftype = { "nofile", "terminal", "help" },
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- remove_file = {
|
-- remove_file = {
|
||||||
-- close_window = true,
|
-- close_window = true,
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- trash = {
|
-- trash = {
|
||||||
-- cmd = "trash",
|
-- cmd = "trash",
|
||||||
-- require_confirm = true,
|
-- require_confirm = true,
|
||||||
-- },
|
-- },
|
||||||
-- live_filter = {
|
-- live_filter = {
|
||||||
-- prefix = "[FILTER]: ",
|
-- prefix = "[FILTER]: ",
|
||||||
-- always_show_folders = true,
|
-- always_show_folders = true,
|
||||||
-- },
|
-- },
|
||||||
-- tab = {
|
-- tab = {
|
||||||
-- sync = {
|
-- sync = {
|
||||||
-- open = false,
|
-- open = false,
|
||||||
-- close = false,
|
-- close = false,
|
||||||
-- ignore = {},
|
-- ignore = {},
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- notify = {
|
-- notify = {
|
||||||
-- threshold = vim.log.levels.INFO,
|
-- threshold = vim.log.levels.INFO,
|
||||||
-- -- threshold = vim.log.levels.ERROR,
|
-- -- threshold = vim.log.levels.ERROR,
|
||||||
-- },
|
-- },
|
||||||
-- log = {
|
-- log = {
|
||||||
-- enable = false,
|
-- enable = false,
|
||||||
-- truncate = false,
|
-- truncate = false,
|
||||||
-- types = {
|
-- types = {
|
||||||
-- all = false,
|
-- all = false,
|
||||||
-- config = false,
|
-- config = false,
|
||||||
-- copy_paste = false,
|
-- copy_paste = false,
|
||||||
-- dev = false,
|
-- dev = false,
|
||||||
-- diagnostics = false,
|
-- diagnostics = false,
|
||||||
-- git = false,
|
-- git = false,
|
||||||
-- profile = false,
|
-- profile = false,
|
||||||
-- watcher = false,
|
-- watcher = false,
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- system_open = {
|
-- system_open = {
|
||||||
-- cmd = nil,
|
-- cmd = nil,
|
||||||
-- args = {},
|
-- args = {},
|
||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- config = function(_, opts)
|
-- config = function(_, opts)
|
||||||
-- require("nvim-tree").setup(opts)
|
-- require("nvim-tree").setup(opts)
|
||||||
-- end,
|
-- end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,229 +1,236 @@
|
||||||
local icons = vim.g.pcode_icons
|
local icons = vim.g.pcode_icons
|
||||||
|
local set_view = {}
|
||||||
|
if vim.g.pcode_nvimtree_isfloat == 1 then
|
||||||
|
set_view = require("user.utils.nvimtree").float
|
||||||
|
else
|
||||||
|
set_view = require("user.utils.nvimtree").normal
|
||||||
|
end
|
||||||
return {
|
return {
|
||||||
"kyazdani42/nvim-tree.lua",
|
"kyazdani42/nvim-tree.lua",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
cmd = { "NvimTree", "NvimTreeOpen", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" },
|
cmd = { "NvimTreeFindFileToggle", "NvimTree", "NvimTreeOpen", "NvimTreeToggle", "NvimTreeFocus", "NvimTreeClose" },
|
||||||
opts = {
|
opts = {
|
||||||
auto_reload_on_write = false,
|
auto_reload_on_write = false,
|
||||||
disable_netrw = false,
|
disable_netrw = false,
|
||||||
hijack_cursor = false,
|
hijack_cursor = false,
|
||||||
hijack_netrw = true,
|
hijack_netrw = true,
|
||||||
hijack_unnamed_buffer_when_opening = false,
|
hijack_unnamed_buffer_when_opening = false,
|
||||||
sort_by = "name",
|
sort_by = "name",
|
||||||
root_dirs = {},
|
root_dirs = {},
|
||||||
prefer_startup_root = false,
|
prefer_startup_root = false,
|
||||||
sync_root_with_cwd = true,
|
sync_root_with_cwd = true,
|
||||||
reload_on_bufenter = false,
|
reload_on_bufenter = false,
|
||||||
respect_buf_cwd = false,
|
respect_buf_cwd = false,
|
||||||
on_attach = "default",
|
on_attach = "default",
|
||||||
select_prompts = false,
|
select_prompts = false,
|
||||||
view = {
|
-- view = {
|
||||||
adaptive_size = false,
|
-- adaptive_size = false,
|
||||||
centralize_selection = true,
|
-- centralize_selection = true,
|
||||||
width = 30,
|
-- width = 30,
|
||||||
side = "left",
|
-- side = "left",
|
||||||
preserve_window_proportions = false,
|
-- preserve_window_proportions = false,
|
||||||
number = false,
|
-- number = false,
|
||||||
relativenumber = false,
|
-- relativenumber = false,
|
||||||
signcolumn = "yes",
|
-- signcolumn = "yes",
|
||||||
float = {
|
-- float = {
|
||||||
enable = false,
|
-- enable = false,
|
||||||
quit_on_focus_loss = true,
|
-- quit_on_focus_loss = true,
|
||||||
open_win_config = {
|
-- open_win_config = {
|
||||||
relative = "editor",
|
-- relative = "editor",
|
||||||
border = "rounded",
|
-- border = "rounded",
|
||||||
width = 30,
|
-- width = 30,
|
||||||
height = 30,
|
-- height = 30,
|
||||||
row = 1,
|
-- row = 1,
|
||||||
col = 1,
|
-- col = 1,
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
renderer = {
|
view = set_view,
|
||||||
add_trailing = false,
|
renderer = {
|
||||||
group_empty = false,
|
add_trailing = false,
|
||||||
highlight_git = true,
|
group_empty = false,
|
||||||
full_name = false,
|
highlight_git = true,
|
||||||
highlight_opened_files = "none",
|
full_name = false,
|
||||||
-- root_folder_label = ":t",
|
highlight_opened_files = "none",
|
||||||
root_folder_label = false,
|
-- root_folder_label = ":t",
|
||||||
indent_width = 2,
|
root_folder_label = false,
|
||||||
indent_markers = {
|
indent_width = 2,
|
||||||
enable = true,
|
indent_markers = {
|
||||||
inline_arrows = true,
|
enable = true,
|
||||||
icons = {
|
inline_arrows = true,
|
||||||
corner = "└",
|
icons = {
|
||||||
edge = "│",
|
corner = "└",
|
||||||
item = "│",
|
edge = "│",
|
||||||
none = " ",
|
item = "│",
|
||||||
},
|
none = " ",
|
||||||
},
|
},
|
||||||
icons = {
|
},
|
||||||
webdev_colors = true,
|
icons = {
|
||||||
git_placement = "before",
|
webdev_colors = true,
|
||||||
padding = " ",
|
git_placement = "before",
|
||||||
symlink_arrow = " ➛ ",
|
padding = " ",
|
||||||
show = {
|
symlink_arrow = " ➛ ",
|
||||||
file = true,
|
show = {
|
||||||
folder = true,
|
file = true,
|
||||||
folder_arrow = true,
|
folder = true,
|
||||||
git = true,
|
folder_arrow = true,
|
||||||
},
|
git = true,
|
||||||
glyphs = {
|
},
|
||||||
default = icons.ui.Text,
|
glyphs = {
|
||||||
symlink = icons.ui.FileSymlink,
|
default = icons.ui.Text,
|
||||||
bookmark = icons.ui.BookMark,
|
symlink = icons.ui.FileSymlink,
|
||||||
folder = {
|
bookmark = icons.ui.BookMark,
|
||||||
-- arrow_closed = icons.ui.TriangleShortArrowRight,
|
folder = {
|
||||||
arrow_closed = icons.ui.ChevronShortRight,
|
-- arrow_closed = icons.ui.TriangleShortArrowRight,
|
||||||
-- arrow_open = icons.ui.TriangleShortArrowDown,
|
arrow_closed = icons.ui.ChevronShortRight,
|
||||||
arrow_open = icons.ui.ChevronShortDown,
|
-- arrow_open = icons.ui.TriangleShortArrowDown,
|
||||||
default = icons.ui.Folder,
|
arrow_open = icons.ui.ChevronShortDown,
|
||||||
open = icons.ui.FolderOpen,
|
default = icons.ui.Folder,
|
||||||
empty = icons.ui.EmptyFolder,
|
open = icons.ui.FolderOpen,
|
||||||
empty_open = icons.ui.EmptyFolderOpen,
|
empty = icons.ui.EmptyFolder,
|
||||||
symlink = icons.ui.FolderSymlink,
|
empty_open = icons.ui.EmptyFolderOpen,
|
||||||
symlink_open = icons.ui.FolderOpen,
|
symlink = icons.ui.FolderSymlink,
|
||||||
},
|
symlink_open = icons.ui.FolderOpen,
|
||||||
git = {
|
},
|
||||||
unstaged = icons.git.FileUnstaged,
|
git = {
|
||||||
staged = icons.git.FileStaged,
|
unstaged = icons.git.FileUnstaged,
|
||||||
unmerged = icons.git.FileUnmerged,
|
staged = icons.git.FileStaged,
|
||||||
renamed = icons.git.FileRenamed,
|
unmerged = icons.git.FileUnmerged,
|
||||||
untracked = icons.git.FileUntracked,
|
renamed = icons.git.FileRenamed,
|
||||||
deleted = icons.git.FileDeleted,
|
untracked = icons.git.FileUntracked,
|
||||||
ignored = icons.git.FileIgnored,
|
deleted = icons.git.FileDeleted,
|
||||||
},
|
ignored = icons.git.FileIgnored,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" },
|
},
|
||||||
symlink_destination = true,
|
special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" },
|
||||||
},
|
symlink_destination = true,
|
||||||
hijack_directories = {
|
},
|
||||||
enable = false,
|
hijack_directories = {
|
||||||
auto_open = true,
|
enable = false,
|
||||||
},
|
auto_open = true,
|
||||||
update_focused_file = {
|
},
|
||||||
enable = true,
|
update_focused_file = {
|
||||||
debounce_delay = 15,
|
enable = true,
|
||||||
update_root = true,
|
debounce_delay = 15,
|
||||||
ignore_list = {},
|
update_root = true,
|
||||||
},
|
ignore_list = {},
|
||||||
diagnostics = {
|
},
|
||||||
enable = true,
|
diagnostics = {
|
||||||
show_on_dirs = false,
|
enable = true,
|
||||||
show_on_open_dirs = true,
|
show_on_dirs = false,
|
||||||
debounce_delay = 50,
|
show_on_open_dirs = true,
|
||||||
severity = {
|
debounce_delay = 50,
|
||||||
min = vim.diagnostic.severity.HINT,
|
severity = {
|
||||||
max = vim.diagnostic.severity.ERROR,
|
min = vim.diagnostic.severity.HINT,
|
||||||
},
|
max = vim.diagnostic.severity.ERROR,
|
||||||
icons = {
|
},
|
||||||
hint = icons.diagnostics.BoldHint,
|
icons = {
|
||||||
info = icons.diagnostics.BoldInformation,
|
hint = icons.diagnostics.BoldHint,
|
||||||
warning = icons.diagnostics.BoldWarning,
|
info = icons.diagnostics.BoldInformation,
|
||||||
error = icons.diagnostics.BoldError,
|
warning = icons.diagnostics.BoldWarning,
|
||||||
},
|
error = icons.diagnostics.BoldError,
|
||||||
},
|
},
|
||||||
filters = {
|
},
|
||||||
dotfiles = false,
|
filters = {
|
||||||
git_clean = false,
|
dotfiles = false,
|
||||||
no_buffer = false,
|
git_clean = false,
|
||||||
custom = { "node_modules", "\\.cache", "\\.git" },
|
no_buffer = false,
|
||||||
exclude = {
|
custom = { "node_modules", "\\.cache", "\\.git" },
|
||||||
".gitignore",
|
exclude = {
|
||||||
".prettierignore",
|
".gitignore",
|
||||||
},
|
".prettierignore",
|
||||||
},
|
},
|
||||||
filesystem_watchers = {
|
},
|
||||||
enable = true,
|
filesystem_watchers = {
|
||||||
debounce_delay = 50,
|
enable = true,
|
||||||
ignore_dirs = {},
|
debounce_delay = 50,
|
||||||
},
|
ignore_dirs = {},
|
||||||
git = {
|
},
|
||||||
enable = true,
|
git = {
|
||||||
ignore = false,
|
enable = true,
|
||||||
show_on_dirs = true,
|
ignore = false,
|
||||||
show_on_open_dirs = true,
|
show_on_dirs = true,
|
||||||
disable_for_dirs = {},
|
show_on_open_dirs = true,
|
||||||
timeout = 400,
|
disable_for_dirs = {},
|
||||||
},
|
timeout = 400,
|
||||||
actions = {
|
},
|
||||||
use_system_clipboard = true,
|
actions = {
|
||||||
change_dir = {
|
use_system_clipboard = true,
|
||||||
enable = true,
|
change_dir = {
|
||||||
global = false,
|
enable = true,
|
||||||
restrict_above_cwd = false,
|
global = false,
|
||||||
},
|
restrict_above_cwd = false,
|
||||||
expand_all = {
|
},
|
||||||
max_folder_discovery = 300,
|
expand_all = {
|
||||||
exclude = {},
|
max_folder_discovery = 300,
|
||||||
},
|
exclude = {},
|
||||||
file_popup = {
|
},
|
||||||
open_win_config = {
|
file_popup = {
|
||||||
col = 1,
|
open_win_config = {
|
||||||
row = 1,
|
col = 1,
|
||||||
relative = "cursor",
|
row = 1,
|
||||||
border = "shadow",
|
relative = "cursor",
|
||||||
style = "minimal",
|
border = "shadow",
|
||||||
},
|
style = "minimal",
|
||||||
},
|
},
|
||||||
open_file = {
|
},
|
||||||
quit_on_open = false,
|
open_file = {
|
||||||
resize_window = false,
|
quit_on_open = false,
|
||||||
window_picker = {
|
resize_window = false,
|
||||||
enable = true,
|
window_picker = {
|
||||||
picker = "default",
|
enable = true,
|
||||||
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
|
picker = "default",
|
||||||
exclude = {
|
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
|
||||||
filetype = { "notify", "lazy", "qf", "diff", "fugitive", "fugitiveblame" },
|
exclude = {
|
||||||
buftype = { "nofile", "terminal", "help" },
|
filetype = { "notify", "lazy", "qf", "diff", "fugitive", "fugitiveblame" },
|
||||||
},
|
buftype = { "nofile", "terminal", "help" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
remove_file = {
|
},
|
||||||
close_window = true,
|
remove_file = {
|
||||||
},
|
close_window = true,
|
||||||
},
|
},
|
||||||
trash = {
|
},
|
||||||
cmd = "trash",
|
trash = {
|
||||||
require_confirm = true,
|
cmd = "trash",
|
||||||
},
|
require_confirm = true,
|
||||||
live_filter = {
|
},
|
||||||
prefix = "[FILTER]: ",
|
live_filter = {
|
||||||
always_show_folders = true,
|
prefix = "[FILTER]: ",
|
||||||
},
|
always_show_folders = true,
|
||||||
tab = {
|
},
|
||||||
sync = {
|
tab = {
|
||||||
open = false,
|
sync = {
|
||||||
close = false,
|
open = false,
|
||||||
ignore = {},
|
close = false,
|
||||||
},
|
ignore = {},
|
||||||
},
|
},
|
||||||
notify = {
|
},
|
||||||
threshold = vim.log.levels.INFO,
|
notify = {
|
||||||
-- threshold = vim.log.levels.ERROR,
|
threshold = vim.log.levels.INFO,
|
||||||
},
|
-- threshold = vim.log.levels.ERROR,
|
||||||
log = {
|
},
|
||||||
enable = false,
|
log = {
|
||||||
truncate = false,
|
enable = false,
|
||||||
types = {
|
truncate = false,
|
||||||
all = false,
|
types = {
|
||||||
config = false,
|
all = false,
|
||||||
copy_paste = false,
|
config = false,
|
||||||
dev = false,
|
copy_paste = false,
|
||||||
diagnostics = false,
|
dev = false,
|
||||||
git = false,
|
diagnostics = false,
|
||||||
profile = false,
|
git = false,
|
||||||
watcher = false,
|
profile = false,
|
||||||
},
|
watcher = false,
|
||||||
},
|
},
|
||||||
system_open = {
|
},
|
||||||
cmd = nil,
|
system_open = {
|
||||||
args = {},
|
cmd = nil,
|
||||||
},
|
args = {},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
},
|
||||||
require("nvim-tree").setup(opts)
|
config = function(_, opts)
|
||||||
end,
|
require("nvim-tree").setup(opts)
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|
62
lua/user/utils/nvimtree.lua
Normal file
62
lua/user/utils/nvimtree.lua
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
local M = {}
|
||||||
|
local HEIGHT_RATIO = 0.9 -- You can change this
|
||||||
|
local WIDTH_RATIO = 0.5 -- You can change this too
|
||||||
|
|
||||||
|
M.float = {
|
||||||
|
adaptive_size = false,
|
||||||
|
centralize_selection = true,
|
||||||
|
-- width = 30,
|
||||||
|
side = "left",
|
||||||
|
preserve_window_proportions = false,
|
||||||
|
number = false,
|
||||||
|
relativenumber = false,
|
||||||
|
signcolumn = "yes",
|
||||||
|
float = {
|
||||||
|
enable = true,
|
||||||
|
open_win_config = function()
|
||||||
|
local screen_w = vim.opt.columns:get()
|
||||||
|
local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get()
|
||||||
|
local window_w = screen_w * WIDTH_RATIO
|
||||||
|
local window_h = screen_h * HEIGHT_RATIO
|
||||||
|
local window_w_int = math.floor(window_w)
|
||||||
|
local window_h_int = math.floor(window_h)
|
||||||
|
local center_x = (screen_w - window_w) / 2
|
||||||
|
local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get()
|
||||||
|
return {
|
||||||
|
border = "rounded",
|
||||||
|
relative = "editor",
|
||||||
|
row = center_y,
|
||||||
|
col = center_x,
|
||||||
|
width = window_w_int,
|
||||||
|
height = window_h_int,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
width = function()
|
||||||
|
return math.floor(vim.opt.columns:get() * WIDTH_RATIO)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
M.normal = {
|
||||||
|
adaptive_size = false,
|
||||||
|
centralize_selection = true,
|
||||||
|
width = 30,
|
||||||
|
side = "left",
|
||||||
|
preserve_window_proportions = false,
|
||||||
|
number = false,
|
||||||
|
relativenumber = false,
|
||||||
|
signcolumn = "yes",
|
||||||
|
float = {
|
||||||
|
enable = false,
|
||||||
|
quit_on_focus_loss = true,
|
||||||
|
open_win_config = {
|
||||||
|
relative = "editor",
|
||||||
|
border = "rounded",
|
||||||
|
width = 30,
|
||||||
|
height = 30,
|
||||||
|
row = 1,
|
||||||
|
col = 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return M
|
Loading…
Add table
Add a link
Reference in a new issue