add oil
This commit is contained in:
parent
05fa6fe6f3
commit
77305f6043
3 changed files with 28 additions and 13 deletions
|
|
@ -32,6 +32,7 @@
|
|||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9e519b6146512c8e2e702faf8ac48420f4f5deec" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "e9062e2dfb9854e6a927370f2d720de354c88524" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" },
|
||||
"oil.nvim": { "branch": "master", "commit": "eaa20a6aee7c4df89d80ec8208de63ec2fa4d38a" },
|
||||
"playground": { "branch": "master", "commit": "2b81a018a49f8e476341dfcb228b7b808baba68b" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" },
|
||||
"readline.nvim": { "branch": "master", "commit": "cab666cbd026dea9c817182e22255ecb3b3419b1" },
|
||||
|
|
|
|||
|
|
@ -218,6 +218,16 @@ return {
|
|||
-- File Management
|
||||
------------------------------
|
||||
|
||||
{
|
||||
"stevearc/oil.nvim",
|
||||
opts = {
|
||||
default_file_explorer = true,
|
||||
restore_win_options = true,
|
||||
},
|
||||
-- Optional dependencies
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
},
|
||||
|
||||
-- file explorer
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
|
|
@ -266,12 +276,12 @@ return {
|
|||
vim.cmd([[Neotree close]])
|
||||
end,
|
||||
init = function()
|
||||
if vim.fn.argc() == 1 then
|
||||
local stat = vim.loop.fs_stat(vim.fn.argv(0))
|
||||
if stat and stat.type == "directory" then
|
||||
require("neo-tree")
|
||||
end
|
||||
end
|
||||
-- if vim.fn.argc() == 1 then
|
||||
-- local stat = vim.loop.fs_stat(vim.fn.argv(0))
|
||||
-- if stat and stat.type == "directory" then
|
||||
-- require("neo-tree")
|
||||
-- end
|
||||
-- end
|
||||
end,
|
||||
opts = {
|
||||
sources = { "filesystem", "buffers", "git_status", "document_symbols" },
|
||||
|
|
|
|||
|
|
@ -109,19 +109,20 @@ end, { desc = "Lazygit (cwd)" })
|
|||
local lazyterm = function()
|
||||
Util.float_term(nil, { cwd = Util.get_root() })
|
||||
end
|
||||
Util.map("n", "<leader>ft", lazyterm, { desc = "Terminal (root dir)" })
|
||||
Util.map("n", "<leader>fT", function()
|
||||
Util.map("n", "<leader>tt", lazyterm, { desc = "Terminal (root dir)" })
|
||||
Util.map("n", "<leader>tT", function()
|
||||
Util.float_term()
|
||||
end, { desc = "Terminal (cwd)" })
|
||||
Util.map("n", "<c-`>", lazyterm, { desc = "Terminal (root dir)" })
|
||||
Util.map("n", "`", lazyterm, { desc = "Terminal (root dir)" })
|
||||
-- Util.map("n", "<c-`>", lazyterm, { desc = "Terminal (root dir)" })
|
||||
Util.map("n", "<c-/>", lazyterm, { desc = "Terminal (root dir)" })
|
||||
Util.map("n", "<c-_>", lazyterm, { desc = "which_key_ignore" })
|
||||
|
||||
Util.map("t", "<esc><esc>", "<c-\\><c-n>", { desc = "Enter Normal Mode" })
|
||||
Util.map("t", "<C-h>", "<cmd>wincmd h<cr>", { desc = "Go to left window" })
|
||||
Util.map("t", "<C-j>", "<cmd>wincmd j<cr>", { desc = "Go to lower window" })
|
||||
Util.map("t", "<C-k>", "<cmd>wincmd k<cr>", { desc = "Go to upper window" })
|
||||
Util.map("t", "<C-l>", "<cmd>wincmd l<cr>", { desc = "Go to right window" })
|
||||
-- Util.map("t", "<C-h>", "<cmd>wincmd h<cr>", { desc = "Go to left window" })
|
||||
-- Util.map("t", "<C-j>", "<cmd>wincmd j<cr>", { desc = "Go to lower window" })
|
||||
-- Util.map("t", "<C-k>", "<cmd>wincmd k<cr>", { desc = "Go to upper window" })
|
||||
-- Util.map("t", "<C-l>", "<cmd>wincmd l<cr>", { desc = "Go to right window" })
|
||||
Util.map("t", "<C-/>", "<cmd>close<cr>", { desc = "Hide Terminal" })
|
||||
Util.map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
|
||||
|
||||
|
|
@ -131,3 +132,6 @@ Util.map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
|
|||
|
||||
-- lazy
|
||||
Util.map("n", "<leader>l", "<cmd>Lazy<cr>", { desc = "Lazy" })
|
||||
|
||||
-- oil
|
||||
vim.keymap.set("n", "-", require("oil").open, { desc = "Open parent directory" })
|
||||
|
|
|
|||
Loading…
Reference in a new issue