new theme support

This commit is contained in:
MaasOedipa 2025-10-30 10:29:06 +01:00
parent 5235cedf6c
commit be98ef5738
7 changed files with 68 additions and 43 deletions

View File

@ -139,7 +139,7 @@ vim.o.timeoutlen = 300
-- Configure how new splits should be opened
vim.o.splitright = true
vim.o.splitbelow = true
vim.o.splitbelow = false
-- Sets how neovim will display certain whitespace characters in the editor.
-- See `:help 'list'`
@ -876,28 +876,6 @@ require('lazy').setup({
},
},
{ -- You can easily change to a different colorscheme.
-- Change the name of the colorscheme plugin below, and then
-- change the command in the config to whatever the name of that colorscheme is.
--
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
'folke/tokyonight.nvim',
priority = 999, -- Make sure to load this before all the other start plugins.
config = function()
---@diagnostic disable-next-line: missing-fields
require('tokyonight').setup {
styles = {
comments = { italic = false }, -- Disable italics in comments
},
}
-- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme 'tokyonight-moon'
end,
},
-- Highlight todo, notes, etc in comments
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
@ -985,7 +963,7 @@ require('lazy').setup({
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
{ import = 'custom.plugins' },
{ import = 'custom.themes' },
{ import = 'custom.plugins.themes' },
--
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope!
@ -1015,3 +993,5 @@ require('lazy').setup({
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et
require 'custom.themes'

View File

@ -0,0 +1,5 @@
return {
{ 'folke/tokyonight.nvim', lazy = false, priority = 1000 },
{ 'ellisonleao/gruvbox.nvim', lazy = false, priority = 1000 },
{ 'catppuccin/nvim', name = 'catppuccin', lazy = false, priority = 1000 },
}

View File

@ -0,0 +1,14 @@
return function()
-- setup Catppuccin
require('catppuccin').setup {
flavour = 'mocha', -- options: latte, frappe, macchiato, mocha
integrations = {
-- Optional: enable integrations for plugins like telescope, lualine, etc
telescope = true,
nvimtree = true,
cmp = true,
},
}
-- load the colorscheme
vim.cmd.colorscheme 'catppuccin'
end

View File

@ -1,19 +0,0 @@
return {
{
'catppuccin/nvim',
name = 'catppuccin',
priority = 1000, -- ensure it loads first
config = function()
require('catppuccin').setup {
flavour = 'mocha', -- latte, frappe, macchiato, mocha
transparent_background = true,
integrations = {
treesitter = true,
native_lsp = { enabled = true },
telescope = true,
},
}
vim.cmd.colorscheme 'catppuccin'
end,
},
}

View File

@ -0,0 +1,26 @@
return function()
require('gruvbox').setup {
terminal_colors = true, -- add neovim terminal colors
undercurl = true,
underline = true,
bold = true,
italic = {
strings = true,
emphasis = true,
comments = true,
operators = false,
folds = true,
},
strikethrough = true,
invert_selection = false,
invert_signs = false,
invert_tabline = false,
inverse = true, -- invert background for search, diffs, statuslines and errors
contrast = 'soft', -- can be "hard", "soft" or empty string
palette_overrides = {},
overrides = {},
dim_inactive = false,
transparent_mode = true,
}
vim.cmd 'colorscheme gruvbox'
end

View File

@ -0,0 +1,11 @@
-- Pick which theme to use
local theme_name = 'gruvbox' --
-- Loading it
local ok, theme = pcall(require, 'custom.themes.' .. theme_name)
if not ok then
vim.notify('Failed to load theme: ' .. theme_name, vim.log.levels.ERROR)
return
end
theme()

View File

@ -0,0 +1,8 @@
-- ~/.config/nvim/lua/custom/themes/tokyonight.lua
return function()
require('tokyonight').setup {
style = 'moon',
transparent = false,
}
vim.cmd.colorscheme 'tokyonight'
end