diff options
Diffstat (limited to 'configs/nvim/lua/open_project.lua')
-rw-r--r-- | configs/nvim/lua/open_project.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/configs/nvim/lua/open_project.lua b/configs/nvim/lua/open_project.lua new file mode 100644 index 0000000..5228143 --- /dev/null +++ b/configs/nvim/lua/open_project.lua @@ -0,0 +1,17 @@ +local a = require'plenary.async' +:with +local context_manager = require "plenary.context_manager" +local with = context_manager.with +local open = context_manager.open + +local err, stat = a.fs_stat("./.project"); +assert(not error, ".project file does not exist, you should run this script at project root.") + +-- open nvim tree +local nvim_tree_api = require("nvim-tree.api") +nvim_tree_api.open() + +-- open terminal +vim.cmd("split") +vim.cmd + |