more like neotree yay
This commit is contained in:
parent
9e25ee3a6e
commit
4d07e39eee
1 changed files with 53 additions and 12 deletions
|
|
@ -5,32 +5,73 @@ return {
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
},
|
},
|
||||||
opts = function()
|
opts = function()
|
||||||
local getWidth = function()
|
-- Not needed for our float config, if we remove the float mode then this works nicely for sidebar
|
||||||
local w = vim.api.nvim_get_option("columns")
|
-- local getWidth = function()
|
||||||
return math.ceil(w * 0.2)
|
-- local w = vim.api.nvim_get_option("columns")
|
||||||
end
|
-- return math.ceil(w * 0.2)
|
||||||
|
-- end
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("VimResized", {
|
-- vim.api.nvim_create_autocmd("VimResized", {
|
||||||
pattern = "*",
|
-- pattern = "*",
|
||||||
callback = function()
|
-- callback = function()
|
||||||
vim.cmd("NvimTreeResize " .. tostring(getWidth()))
|
-- vim.cmd("NvimTreeResize " .. tostring(getWidth()))
|
||||||
end,
|
-- end,
|
||||||
})
|
-- })
|
||||||
|
|
||||||
return {
|
return {
|
||||||
sort = {
|
sort = {
|
||||||
sorter = "case_sensitive",
|
sorter = "case_sensitive",
|
||||||
},
|
},
|
||||||
view = {
|
view = {
|
||||||
width = getWidth(),
|
-- width = getWidth(),
|
||||||
|
float = {
|
||||||
|
enable = true,
|
||||||
|
open_win_config = function()
|
||||||
|
local cols = vim.api.nvim_get_option("columns")
|
||||||
|
local rows = vim.api.nvim_get_option("lines")
|
||||||
|
local width = math.floor(cols / 2)
|
||||||
|
local height = math.floor(rows / 1.2)
|
||||||
|
return {
|
||||||
|
relative = "editor",
|
||||||
|
row = math.floor(rows / 10),
|
||||||
|
col = math.floor(cols / 4),
|
||||||
|
width = width,
|
||||||
|
height = height,
|
||||||
|
border = "rounded",
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
renderer = {
|
renderer = {
|
||||||
group_empty = true,
|
group_empty = true,
|
||||||
indent_width = 1,
|
indent_width = 1,
|
||||||
|
icons = {
|
||||||
|
glyphs = {
|
||||||
|
git = {
|
||||||
|
unstaged = "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
enable = true,
|
||||||
|
severity = {
|
||||||
|
min = vim.diagnostic.severity.ERROR,
|
||||||
|
max = vim.diagnostic.severity.ERROR,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
filters = {
|
filters = {
|
||||||
dotfiles = false,
|
dotfiles = false,
|
||||||
git_ignored = false,
|
git_ignored = false,
|
||||||
|
exclude = { ".DS_Store" },
|
||||||
|
},
|
||||||
|
actions = {
|
||||||
|
open_file = {
|
||||||
|
quit_on_open = true,
|
||||||
|
window_picker = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue