Skip to content

Commit f1ca023

Browse files
committed
docs(oil): improve comments and add type annotations for opts
- Enhance descriptions for `nvim-web-devicons` and setup options. - Add type annotation for the `opts` table. - Refine module header and plugin dependency comments.
1 parent 6f37fcb commit f1ca023

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lua/plugins/oil.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- oil.nvim | Edit your filesystem like a buffer
1+
-- oil.nvim | Neovim file explorer: edit your filesystem like a buffer
22
-- https://github.com/stevearc/oil.nvim
33
---@module "oil"
44

@@ -47,7 +47,10 @@ end
4747
---@type LazyPluginSpec
4848
return {
4949
"stevearc/oil.nvim",
50-
dependencies = { "nvim-tree/nvim-web-devicons" },
50+
dependencies = {
51+
-- Adds file type icons to Vim plugins
52+
{ "nvim-tree/nvim-web-devicons" },
53+
},
5154
cmd = {
5255
"Oil",
5356
"Explore",
@@ -83,8 +86,11 @@ return {
8386
create_command("Texplore", "tabedit % | Oil <args>", cmd_opts)
8487
create_command("Vexplore", "rightbelow vsplit | Oil <args>", cmd_opts)
8588
end,
89+
---@type oil.setupOpts
8690
opts = {
91+
-- Oil will take over directory buffers
8792
default_file_exporer = true,
93+
-- Set to true to watch the filesystem for changes and reload oil
8894
watch_for_changes = true,
8995
-- Keymaps in oil buffer.
9096
keymaps = {

0 commit comments

Comments
 (0)