diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 54db55b..656a2d0 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -28,6 +28,8 @@ end vim.opt.rtp:prepend(lazypath) -- Setup the plugins you need. require("lazy").setup({ + -- For background transparency + { 'xiyaowong/transparent.nvim' }, -- === The colorscheme plugin is specified here. === -- Gruvbox theme plugin. It will be automatically installed by lazy.nvim. { 'ellisonleao/gruvbox.nvim', config = function() @@ -59,6 +61,16 @@ require("lazy").setup({ end }, }) +-- Transparent configuration +require('transparent').setup({ + enable = true, -- boolean: enable transparent + extra_groups = { -- table: additional groups to clear + 'Normal', 'NormalNC', 'Comment', 'Constant', 'Identifier', + 'Statement', 'PreProc', 'Type', 'Special', 'Underlined', + 'Todo', 'String', 'Function', 'Conditional', 'Repeat', + 'Operator', 'Structure', 'LineNr', 'SignColumn', 'EndOfBuffer' + }, +}) -- Treesitter configuration. require("nvim-treesitter.configs").setup({ highlight = { enable = true }, @@ -123,4 +135,6 @@ vim.keymap.set('n', 'a', 'ggVG', { desc = 'Select entire file' }) -- Groff => PDF vim.keymap.set('n', 'cg', ':!groff -ms -e %:t -T pdf > %:r.pdf', { desc = 'Compile Groff file to PDF' }) -- Typst => PDF -vim.keymap.set('n', 'ct', ':!typst compile %:t', { desc = 'Compile Typst file to PDF'} ) \ No newline at end of file +vim.keymap.set('n', 'ct', ':!typst compile %:t', { desc = 'Compile Typst file to PDF'} ) +-- Keybinding to toggle transparency +vim.api.nvim_set_keymap('n', 'tt', ':TransparentToggle', { noremap = true, silent = true })