From ca8b62fca5ca2dfdb38608e4a7f76a6fe81b18bc Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Thu, 13 Jun 2024 15:42:57 -0400 Subject: [PATCH] doc: restore description for keymaps --- README.md | 8 ++++---- doc/oil.txt | 8 ++++---- lua/oil/config.lua | 10 ++++++---- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 67b2416..5b4022f 100644 --- a/README.md +++ b/README.md @@ -184,16 +184,16 @@ require("oil").setup({ keymaps = { ["g?"] = "actions.show_help", [""] = "actions.select", - [""] = { "actions.select", opts = { vertical = true } }, - [""] = { "actions.select", opts = { horizontal = true } }, - [""] = { "actions.select", opts = { tab = true } }, + [""] = { "actions.select", opts = { vertical = true }, desc = "Open the entry in a vertical split" }, + [""] = { "actions.select", opts = { horizontal = true }, desc = "Open the entry in a horizontal split" }, + [""] = { "actions.select", opts = { tab = true }, desc = "Open the entry in a horizontal split" }, [""] = "actions.preview", [""] = "actions.close", [""] = "actions.refresh", ["-"] = "actions.parent", ["_"] = "actions.open_cwd", ["`"] = "actions.cd", - ["~"] = { "actions.cd", opts = { scope = "tab" } }, + ["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory" }, ["gs"] = "actions.change_sort", ["gx"] = "actions.open_external", ["g."] = "actions.toggle_hidden", diff --git a/doc/oil.txt b/doc/oil.txt index b20dbe9..78b9209 100644 --- a/doc/oil.txt +++ b/doc/oil.txt @@ -75,16 +75,16 @@ CONFIG *oil-confi keymaps = { ["g?"] = "actions.show_help", [""] = "actions.select", - [""] = { "actions.select", opts = { vertical = true } }, - [""] = { "actions.select", opts = { horizontal = true } }, - [""] = { "actions.select", opts = { tab = true } }, + [""] = { "actions.select", opts = { vertical = true }, desc = "Open the entry in a vertical split" }, + [""] = { "actions.select", opts = { horizontal = true }, desc = "Open the entry in a horizontal split" }, + [""] = { "actions.select", opts = { tab = true }, desc = "Open the entry in a horizontal split" }, [""] = "actions.preview", [""] = "actions.close", [""] = "actions.refresh", ["-"] = "actions.parent", ["_"] = "actions.open_cwd", ["`"] = "actions.cd", - ["~"] = { "actions.cd", opts = { scope = "tab" } }, + ["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory" }, ["gs"] = "actions.change_sort", ["gx"] = "actions.open_external", ["g."] = "actions.toggle_hidden", diff --git a/lua/oil/config.lua b/lua/oil/config.lua index 563ed0f..615a436 100644 --- a/lua/oil/config.lua +++ b/lua/oil/config.lua @@ -1,3 +1,5 @@ +--stylua: ignore + local default_config = { -- Oil will take over directory buffers (e.g. `vim .` or `:e src/`) -- Set to false if you still want to use netrw. @@ -58,16 +60,16 @@ local default_config = { keymaps = { ["g?"] = "actions.show_help", [""] = "actions.select", - [""] = { "actions.select", opts = { vertical = true } }, - [""] = { "actions.select", opts = { horizontal = true } }, - [""] = { "actions.select", opts = { tab = true } }, + [""] = { "actions.select", opts = { vertical = true }, desc = "Open the entry in a vertical split" }, + [""] = { "actions.select", opts = { horizontal = true }, desc = "Open the entry in a horizontal split" }, + [""] = { "actions.select", opts = { tab = true }, desc = "Open the entry in a horizontal split" }, [""] = "actions.preview", [""] = "actions.close", [""] = "actions.refresh", ["-"] = "actions.parent", ["_"] = "actions.open_cwd", ["`"] = "actions.cd", - ["~"] = { "actions.cd", opts = { scope = "tab" } }, + ["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory" }, ["gs"] = "actions.change_sort", ["gx"] = "actions.open_external", ["g."] = "actions.toggle_hidden",