feat: default random theme

This commit is contained in:
Thomas Alcala Schneider 2023-05-21 15:12:08 +02:00
parent 12a3507c46
commit 40ec1000bb
No known key found for this signature in database
GPG Key ID: 24BE5CF48622091B
3 changed files with 18 additions and 8 deletions

View File

@ -12,4 +12,4 @@ end
ColorMyPencils()
-- vim.cmd [[ ThematicRandom ]]
vim.cmd 'autocmd BufEnter * ThematicRandom'

View File

@ -1,7 +0,0 @@
local lazy = require('lazy')
lazy.setup({
timeout = 300
})
return {}

View File

@ -163,5 +163,22 @@ let g:thematic#defaults = {
let g:thematic#theme_name = 'catppuccin'
]]
-- Retrieve all mappings
local mappings = vim.api.nvim_get_keymap ''
-- Iterate through the mappings to find and remove any existing ones for the commands
for _, mapping in ipairs(mappings) do
if mapping.cmd == 'ThematicRandom' or mapping.cmd == 'ThematicCatppuccino' then
-- Remove existing mappings
vim.api.nvim_del_keymap(mapping.mode, mapping.lhs)
end
end
-- Set new mapping for ThematicRandom
vim.api.nvim_set_keymap('n', '<leader>tr', ':ThematicRandom<CR>', { silent = true })
-- Set new mapping for ThematicCatppuccino
vim.api.nvim_set_keymap('n', '<leader>tc', ':Thematic catppuccin<CR>', { silent = true })
end,
}