nvim: tree -> oil - dotfiles - š personal arsenal of "rice"
HTML git clone https://git.drkhsh.at/dotfiles.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit a499a609e2f43f52fe944304495ea2a5472035dd
DIR parent b2ec799d04a18a490f0f8e15f1a89d9041d7285e
HTML Author: drkhsh <me@drkhsh.at>
Date: Sun, 9 Feb 2025 02:08:45 +0100
nvim: tree -> oil
Diffstat:
A vim/.config/nvim/lua/plugins/oil.l⦠| 13 +++++++++++++
D vim/.config/nvim/lua/plugins/tree.⦠| 32 -------------------------------
2 files changed, 13 insertions(+), 32 deletions(-)
---
DIR diff --git a/vim/.config/nvim/lua/plugins/oil.lua b/vim/.config/nvim/lua/plugins/oil.lua
@@ -0,0 +1,13 @@
+return {
+ "stevearc/oil.nvim",
+ opts = {
+ view_options = {
+ show_hidden = true,
+ },
+ },
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ config = function(opts)
+ require("oil").setup(opts.opts)
+ vim.keymap.set("n", "-", ":Oil<CR>", { desc = "[Oil] Back to parent dir", silent = true })
+ end,
+}
DIR diff --git a/vim/.config/nvim/lua/plugins/tree.lua b/vim/.config/nvim/lua/plugins/tree.lua
@@ -1,32 +0,0 @@
-return {
- "nvim-tree/nvim-tree.lua",
- version = "*",
- lazy = false,
- dependencies = {
- "nvim-tree/nvim-web-devicons",
- },
- config = function()
- local function my_on_attach(bufnr)
- local api = require "nvim-tree.api"
-
- local function opts(desc)
- return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
- end
-
- -- default mappings
- api.config.mappings.default_on_attach(bufnr)
-
- -- custom mappings
- vim.keymap.set('n', '<C-t>', api.tree.change_root_to_parent, opts('Up'))
- vim.keymap.set('n', '?', api.tree.toggle_help, opts('Help'))
- end
- require("nvim-tree").setup {
- filters = {
- dotfiles = true,
- },
- on_attach = my_on_attach,
- }
- local api = require "nvim-tree.api"
- vim.keymap.set("n", "<leader>tt", api.tree.toggle)
- end,
-}