updated oil config

This commit is contained in:
2025-01-23 12:37:36 +11:00
parent 381a4f5c2d
commit 5fea981e2e
2 changed files with 11 additions and 2 deletions

View File

@@ -118,7 +118,7 @@ Live preview of markdown files in browser, with synced scrolling
Provides Nerd font icons for other plugins to use Provides Nerd font icons for other plugins to use
--- ---
#### [Oil](https://github.com/nvim-tree/nvim-web-devicons) #### [Oil](https://github.com/stevearc/oil.nvim)
Edit/view your filesystem like a normal NeoVim buffer Edit/view your filesystem like a normal NeoVim buffer
--- ---

View File

@@ -6,7 +6,16 @@ return {
-- Optional dependencies -- Optional dependencies
dependencies = { "nvim-tree/nvim-web-devicons" }, dependencies = { "nvim-tree/nvim-web-devicons" },
config = function() config = function()
require("oil").setup() require("oil").setup({
watch_for_changes = true,
view_options = {
show_hidden = true,
is_always_hidden = function(name, bufnr)
local m = name:match("^%.%.")
return m ~= nil
end,
},
})
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" }) vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
end, end,
} }