From 552276cb23260fbadd97999beb8c09a60b83399a Mon Sep 17 00:00:00 2001 From: TiagoRG Date: Fri, 24 May 2024 09:48:04 +0100 Subject: [PATCH] Plugin updates Signed-off-by: TiagoRG --- .config/nvim/.gitignore | 2 ++ .config/nvim/after/plugin/cloak.lua | 29 +++++++++++++++++++++++++++++ .config/nvim/lua/tiagorg/packer.lua | 21 +++++++++++---------- .config/nvim/snippets/c.snippets | 4 ++-- 4 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 .config/nvim/.gitignore create mode 100644 .config/nvim/after/plugin/cloak.lua diff --git a/.config/nvim/.gitignore b/.config/nvim/.gitignore new file mode 100644 index 0000000..bd54fb1 --- /dev/null +++ b/.config/nvim/.gitignore @@ -0,0 +1,2 @@ +data/ +plugin/packer_compiled.lua diff --git a/.config/nvim/after/plugin/cloak.lua b/.config/nvim/after/plugin/cloak.lua new file mode 100644 index 0000000..822d169 --- /dev/null +++ b/.config/nvim/after/plugin/cloak.lua @@ -0,0 +1,29 @@ +require('cloak').setup({ + enabled = true, + cloak_character = '*', + -- The applied highlight group (colors) on the cloaking, see `:h highlight`. + highlight_group = 'Comment', + -- Applies the length of the replacement characters for all matched + -- patterns, defaults to the length of the matched pattern. + cloak_length = nil, -- Provide a number if you want to hide the true length of the value. + -- Whether it should try every pattern to find the best fit or stop after the first. + try_all_patterns = true, + -- Set to true to cloak Telescope preview buffers. (Required feature not in 0.1.x) + cloak_telescope = true, + patterns = { + { + -- Match any file starting with '.env'. + -- This can be a table to match multiple file patterns. + file_pattern = '.env*', + -- 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 = '=.+', + -- 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, + }, + }, +}) diff --git a/.config/nvim/lua/tiagorg/packer.lua b/.config/nvim/lua/tiagorg/packer.lua index 06622cd..3185253 100644 --- a/.config/nvim/lua/tiagorg/packer.lua +++ b/.config/nvim/lua/tiagorg/packer.lua @@ -7,7 +7,7 @@ return require('packer').startup(function(use) -- Themes use "loctvl842/monokai-pro.nvim" - use 'olimorris/onedarkpro.nvim' + use "TiagoRG/onedarkpro.nvim" use 'Mofiqul/vscode.nvim' -- Essentials @@ -61,6 +61,7 @@ return require('packer').startup(function(use) use { "akinsho/toggleterm.nvim", tag = '*' } use 'nvim-lualine/lualine.nvim' use 'lervag/vimtex' + use 'laytan/cloak.nvim' -- Misc use('wakatime/vim-wakatime') @@ -74,15 +75,15 @@ return require('packer').startup(function(use) 'windwp/nvim-ts-autotag', config = function() require('nvim-ts-autotag').setup() - require 'nvim-treesitter.configs'.setup { - autotag = { - enable = true, - enable_rename = true, - enable_close = true, - enable_close_on_slash = true, - filetypes = { "html", "xml", "javascript", "typescript", "svelte", "vue", "javascriptreact", "typescriptreact"}, - } - } + -- require 'nvim-treesitter.configs'.setup { + -- autotag = { + -- enable = true, + -- enable_rename = true, + -- enable_close = true, + -- enable_close_on_slash = true, + -- filetypes = { "html", "xml", "javascript", "typescript", "svelte", "vue", "javascriptreact", "typescriptreact"}, + -- } + -- } end } use 'mg979/vim-visual-multi' diff --git a/.config/nvim/snippets/c.snippets b/.config/nvim/snippets/c.snippets index 9289333..0c60419 100644 --- a/.config/nvim/snippets/c.snippets +++ b/.config/nvim/snippets/c.snippets @@ -23,10 +23,10 @@ snippet mainn ## Preprocessor # #include <...> snippet inc - #include <${1:stdio}.h> + #include <${1:stdio}.h>${0} # #include "..." snippet Inc - #include "${1:`vim_snippets#Filename("$1.h")`}" + #include "${1:`vim_snippets#Filename("$1.h")`}"${0} # ifndef...define...endif snippet ndef #ifndef $1