nvim: Fix colorizer setup and add mappings
This commit is contained in:
parent
3a6c7717c8
commit
8606652b93
2 changed files with 12 additions and 2 deletions
|
@ -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', '<localleader>ss', ':EasyreadToggle<cr>', { silent = true, desc = 'togg
|
|||
map('n', '<localleader>sv', '<cmd>lua require("nabla").popup()<cr>', { silent = true, desc = 'latex formula popup' })
|
||||
map('n', '<localleader>sV', '<cmd>lua require("nabla").toggle_virt({autogen = true, silent = true})<cr>',
|
||||
{ silent = true, desc = 'toggle formula notation' })
|
||||
-- PLUGIN: nvim-colorizer
|
||||
map('n', '<localleader>sc', '<cmd>ColorizerToggle<cr>', { silent = true, desc = 'toggle colorizer' })
|
||||
map('n', '<localleader>sC', '<cmd>lua require("colorizer").attach_to_buffer(0, {mode = "background"} )<cr>',
|
||||
{ silent = true, desc = 'colorize background' })
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue