From e45e3089d344cb5bae9b838c4322288021aea31c Mon Sep 17 00:00:00 2001 From: Aaditay <58261116+Aaditay@users.noreply.github.com> Date: Wed, 14 Apr 2021 13:23:10 +0530 Subject: [PATCH] aliases on the top Why not make an alias of cmd first and then use cmd instead of vim.cmd --- lua/nvimTree/lua.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/nvimTree/lua.lua b/lua/nvimTree/lua.lua index 30f2a39..851c8fa 100644 --- a/lua/nvimTree/lua.lua +++ b/lua/nvimTree/lua.lua @@ -1,8 +1,11 @@ -vim.cmd [[packadd nvim-tree.lua]] +local cmd = vim.cmd +local g = vim.g + +cmd [[packadd nvim-tree.lua]] vim.o.termguicolors = true -local g = vim.g + g.nvim_tree_side = "left" g.nvim_tree_width = 25 @@ -85,7 +88,7 @@ g.nvim_tree_bindings = { ["q"] = get_lua_cb("close") } -local cmd = vim.cmd + cmd "hi NvimTreeFolderIcon guifg = #61afef" cmd "hi NvimTreeFolderName guifg = #61afef"