update astronvim config
This commit is contained in:
parent
5fce150f44
commit
c23e87f56c
3 changed files with 25 additions and 20 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit f10b4730176b567e15911b3c1a7c5a31c82c8b8e
|
||||
Subproject commit dad0bec1fef2833561d04ea446a544fbfde92539
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
-- enabled = false,
|
||||
enabled = true,
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
|
|
@ -8,7 +8,7 @@ return {
|
|||
lazy = false,
|
||||
config = function()
|
||||
local tree = require("nvim-tree")
|
||||
local tree_cb = require("nvim-tree.config").nvim_tree_callback
|
||||
local api = require("nvim-tree.api")
|
||||
|
||||
tree.setup({
|
||||
hijack_unnamed_buffer_when_opening = true,
|
||||
|
|
@ -31,23 +31,28 @@ return {
|
|||
},
|
||||
view = {
|
||||
centralize_selection = true, -- center current file on enter
|
||||
width = 30, -- N° of columns or %
|
||||
mappings = {
|
||||
custom_only = false,
|
||||
-- list of mappings to set on the tree manually
|
||||
list = {
|
||||
{ key = { "l", "<CR>", "o", "<2-LeftMouse>" }, action = "edit" },
|
||||
-- {key = {"L", "<2-RightMouse>", "<C-]>"}, action = "cd"},
|
||||
{ key = "s", action = "vsplit" },
|
||||
{ key = "v", action = "split" },
|
||||
{ key = "t", action = "tabnew" },
|
||||
{ key = { "h", "<BS>" }, action = "close_node" },
|
||||
{ key = "i", action = "toggle_dotfiles" },
|
||||
{ key = "I", action = "toggle_ignored" },
|
||||
{ key = { "<C-l>", "<C-CR>" }, cb = tree_cb("system_open") },
|
||||
},
|
||||
},
|
||||
width = 30, -- N° of columns or %
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
local function opts(desc)
|
||||
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||
end
|
||||
|
||||
-- Check defaults here: https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach
|
||||
api.config.mappings.default_on_attach(bufnr)
|
||||
|
||||
vim.keymap.set("n", "l", api.node.open.edit, opts("Open"))
|
||||
vim.keymap.set("n", "o", api.node.open.edit, opts("Open"))
|
||||
vim.keymap.set("n", "<CR>", api.node.open.edit, opts("Open"))
|
||||
vim.keymap.set("n", "<2-LeftMouse>", api.node.open.edit, opts("Open"))
|
||||
vim.keymap.set("n", "s", api.node.open.vertical, opts("Open in vsplit"))
|
||||
vim.keymap.set("n", "v", api.node.open.horizontal, opts("Open in hsplit"))
|
||||
vim.keymap.set("n", "t", api.node.open.tab, opts("Open in tab"))
|
||||
vim.keymap.set("n", "h", api.node.navigate.parent_close, opts("Close dir"))
|
||||
vim.keymap.set("n", "<BS>", api.node.navigate.parent_close, opts("Close dir"))
|
||||
vim.keymap.set("n", "i", api.tree.toggle_hidden_filter, opts("Toggle Dotfiles"))
|
||||
vim.keymap.set("n", "I", api.tree.toggle_gitignore_filter, opts("Toggle Git Ignore"))
|
||||
end,
|
||||
})
|
||||
|
||||
-- Auto open when a dir is opened
|
||||
|
|
|
|||
|
|
@ -110,5 +110,5 @@ if [[ "$ZPROF" = true ]]; then
|
|||
fi
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
# eval "$(rtx activate zsh)"
|
||||
eval "$(rtx activate zsh)"
|
||||
# eval "$(zellij setup --generate-auto-start zsh)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue