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 @@ |
|||||||
-- https://github.com/stevearc/oil.nvim |
-- https://github.com/stevearc/oil.nvim |
||||||
|
|
||||||
|
-- For toggling detailed view |
||||||
|
local detail = false |
||||||
|
|
||||||
return { |
return { |
||||||
"stevearc/oil.nvim", |
"stevearc/oil.nvim", |
||||||
|
dependencies = { |
||||||
|
{"nvim-tree/nvim-web-devicons"}, |
||||||
|
}, |
||||||
opts = { |
opts = { |
||||||
columns = { |
columns = { |
||||||
-- "icon", |
"icon", |
||||||
-- "permissions", |
|
||||||
-- "size", |
|
||||||
-- "mtime", |
|
||||||
}, |
}, |
||||||
delete_to_trash = true, |
delete_to_trash = true, |
||||||
skip_confirm_for_simple_edits = true, |
skip_confirm_for_simple_edits = true, |
||||||
view_options = { |
view_options = { |
||||||
show_hidden = true, |
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