diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-01-24 20:35:27 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-01-24 20:35:27 +0900 |
| commit | c80a54e42b52ce297f0f2f71af23c562832025c7 (patch) | |
| tree | dcce8bb977a770f473325d48f6f70b21d9818a40 /ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/cloak.lua | |
init
Diffstat (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/cloak.lua')
| -rw-r--r-- | ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/cloak.lua | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/cloak.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/cloak.lua new file mode 100644 index 0000000..09b14d8 --- /dev/null +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/cloak.lua @@ -0,0 +1,42 @@ +return { + "laytan/cloak.nvim", + lazy = false, + init = function() + local wk = require("which-key") + wk.add({ + mode = { "n", "v" }, + { "<leader>c", group = "Cloak" }, + }) + end, + config = function() + require("cloak").setup({ + enabled = true, + cloak_character = "*", + -- The applied highlight group (colors) on the cloaking, see `:h highlight`. + highlight_group = "Comment", + patterns = { + { + -- Match any file starting with ".env". + -- This can be a table to match multiple file patterns. + file_pattern = { + ".env*", + "wrangler.toml", + ".dev.vars", + "address*", + "*api*", + }, + -- Match an equals sign and any character after it. + -- This can also be a table of patterns to cloak, + -- example: cloak_pattern = { ":.+", "-.+" } for yaml files. + cloak_pattern = { "=.+", ":.+", "-.+" }, + }, + }, + }) + end, + keys = { + { "<leader>ce", "<cmd>CloakEnable<cr>", desc = "Enable cloak" }, + { "<leader>cd", "<cmd>CloakDisable<cr>", desc = "Disable cloak" }, + { "<leader>cl", "<cmd>CloakPreviewLine<cr>", desc = "Preview line cloak" }, + { "<leader>zC", "<cmd>CloakToggle<cr>", desc = "Toggle cloak" }, + }, +} |
