Skip to content

Instantly share code, notes, and snippets.

@RiteshChepuri
Created February 3, 2025 16:19
Show Gist options
  • Save RiteshChepuri/e0acea391c09aec9deab014af543ba72 to your computer and use it in GitHub Desktop.
Save RiteshChepuri/e0acea391c09aec9deab014af543ba72 to your computer and use it in GitHub Desktop.
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
pattern = "*",
callback = function()
if vim.bo.filetype == "c" then
vim.cmd.colorscheme("tokyonight")
elseif vim.bo.filetype == "plaintex" then
vim.cmd.colorscheme("catppucin")
elseif vim.bo.filetype == "sh" then
vim.cmd.colorscheme("dracula")
else
vim.cmd.colorscheme("gruvbox")
end
end,
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment