diff --git a/nvim/.config/nvim/lua/maps.lua b/nvim/.config/nvim/lua/maps.lua index b0b6d43..2597fd5 100644 --- a/nvim/.config/nvim/lua/maps.lua +++ b/nvim/.config/nvim/lua/maps.lua @@ -4,7 +4,7 @@ local prefix = require('which-key').register -- The general ideas behind these mappings: -- -- * Leader prefix is the generally preferred way to map new things, however --- only for those that affect all of vim of work in a supra-buffer way. +-- only for those that affect all of vim or work in a supra-buffer way. -- -- * Localleader prefix is used for mappings which only affect single buffers. -- In other words mostly filetype specific mappings @@ -277,3 +277,7 @@ map('n', 'ss', ':EasyreadToggle', { silent = true, desc = 'togg map('n', 'sv', 'lua require("nabla").popup()', { silent = true, desc = 'latex formula popup' }) map('n', 'sV', 'lua require("nabla").toggle_virt({autogen = true, silent = true})', { silent = true, desc = 'toggle formula notation' }) +-- PLUGIN: nvim-colorizer +map('n', 'sc', 'ColorizerToggle', { silent = true, desc = 'toggle colorizer' }) +map('n', 'sC', 'lua require("colorizer").attach_to_buffer(0, {mode = "background"} )', + { silent = true, desc = 'colorize background' }) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index ca2b57d..70df9a8 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -28,7 +28,13 @@ return { dependencies = { 'rktjmp/fwatch.nvim' } }, { 'NvChad/nvim-colorizer.lua', -- color hex, named colors in the correct preview scheme - config = true, + config = function() + require('colorizer').setup({ + user_default_options = { + mode = 'virtualtext' + } + }) + end, event = "VeryLazy" }, { 'mhartington/formatter.nvim', -- auto formatting on save