mirror of https://github.com/fredrikekre/.dotfiles
Browse Source
- Enable icons with nvim-web-devicons - Disable some conflicting keymappings - Toggle for detailed viewmaster
1 changed files with 24 additions and 4 deletions
@ -1,17 +1,37 @@
@@ -1,17 +1,37 @@
|
||||
-- https://github.com/stevearc/oil.nvim |
||||
|
||||
-- For toggling detailed view |
||||
local detail = false |
||||
|
||||
return { |
||||
"stevearc/oil.nvim", |
||||
dependencies = { |
||||
{"nvim-tree/nvim-web-devicons"}, |
||||
}, |
||||
opts = { |
||||
columns = { |
||||
-- "icon", |
||||
-- "permissions", |
||||
-- "size", |
||||
-- "mtime", |
||||
"icon", |
||||
}, |
||||
delete_to_trash = true, |
||||
skip_confirm_for_simple_edits = true, |
||||
view_options = { |
||||
show_hidden = true, |
||||
}, |
||||
keymaps = { |
||||
-- Disable these since they are used for navigation |
||||
["<C-h>"] = false, |
||||
["<C-l>"] = false, |
||||
-- Toggle detailed view with <leader>d |
||||
["<leader>d"] = { |
||||
callback = function() |
||||
detail = not detail |
||||
local cols = {"icon"} |
||||
if detail then |
||||
cols = {"icon", "permissions", "size", "mtime"} |
||||
end |
||||
require("oil").set_columns(cols) |
||||
end, |
||||
}, |
||||
}, |
||||
}, |
||||
} |
||||
|
||||
Loading…
Reference in new issue