summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/core/nvimtree.lua
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-08-15 13:54:15 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-08-15 13:54:15 +0200
commit977990584331307dd5e71ebbbbd6b45b9c961996 (patch)
treea8b3d78e80f586da192a576dd678e2fbc8ac8e00 /.config/nvim/lua/core/nvimtree.lua
parent99d00f47fe780dbb021149db2f93d202a2b8b025 (diff)
Updates to nvim lsp
Diffstat (limited to '.config/nvim/lua/core/nvimtree.lua')
-rw-r--r--.config/nvim/lua/core/nvimtree.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/.config/nvim/lua/core/nvimtree.lua b/.config/nvim/lua/core/nvimtree.lua
index 698bd6e..376ae56 100644
--- a/.config/nvim/lua/core/nvimtree.lua
+++ b/.config/nvim/lua/core/nvimtree.lua
@@ -66,6 +66,8 @@ M.setup = function()
{ key = { "l", "<CR>", "o" }, cb = tree_cb "edit" },
{ key = "h", cb = tree_cb "close_node" },
{ key = "v", cb = tree_cb "vsplit" },
+
+ { key = "q", cb = ":lua require('core.nvimtree').toggle_tree()<cr>" },
}
end
end
@@ -93,7 +95,9 @@ M.focus_or_close = function()
end
else
view.open()
- if package.loaded["bufferline.state"] and options.builtin.nvimtree.side == "left" then
+ if
+ package.loaded["bufferline.state"] and options.builtin.nvimtree.side == "left"
+ then
require("bufferline.state").set_offset(options.builtin.nvimtree.width + 1, "")
end
end
@@ -110,7 +114,9 @@ M.toggle_tree = function()
require("bufferline.state").set_offset(0)
end
else
- if package.loaded["bufferline.state"] and options.builtin.nvimtree.side == "left" then
+ if
+ package.loaded["bufferline.state"] and options.builtin.nvimtree.side == "left"
+ then
require("bufferline.state").set_offset(options.builtin.nvimtree.width + 1, "")
end
require("nvim-tree").toggle()