From bb81769de6433b8b48c3f03850b75ca5aab4a2a7 Mon Sep 17 00:00:00 2001 From: Charles Danesi Date: Sun, 15 Dec 2024 11:14:33 -0500 Subject: [PATCH] feat: add cloak with default config --- .config/nvim/lua/plugins/cloak.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .config/nvim/lua/plugins/cloak.lua diff --git a/.config/nvim/lua/plugins/cloak.lua b/.config/nvim/lua/plugins/cloak.lua new file mode 100644 index 0000000..b9ac321 --- /dev/null +++ b/.config/nvim/lua/plugins/cloak.lua @@ -0,0 +1,27 @@ +return { + 'laytan/cloak.nvim', + event = 'VeryLazy', + opts = { + enabled = true, + cloak_character = '*', + highlight_group = 'Comment', + cloak_length = nil, -- Provide a number if you want to hide the true length of the value. + try_all_patterns = true, + cloak_telescope = true, + cloak_on_leave = false, + patterns = { + { + -- This can be a table to match multiple file patterns. + file_pattern = '.env*', + -- This can also be a table of patterns to cloak, + -- example: cloak_pattern = { ':.+', '-.+' } for yaml files. + cloak_pattern = '=.+', + -- A function, table or string to generate the replacement. + -- The actual replacement will contain the 'cloak_character' + -- where it doesn't cover the original text. + -- If left empty the legacy behavior of keeping the first character is retained. + replace = nil, + }, + }, + }, +} \ No newline at end of file