Skip to content

Conversation

warbacon
Copy link
Contributor

This will cause tokyonight.nvim to use its cache and set only the necessary highlighting groups according to the installed plugins, and may improve startup time.

Fixes #1357.

-- 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-night'

-- You can configure highlights by doing something like:
vim.cmd.hi 'Comment gui=none'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure what it stood for, but why do you remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prevented comments from being displayed in italics, as that's the default behavior in Tokyonight. I removed that line of code and instead used Tokyonight's built-in method (as shown in the setup function above).

Copy link
Collaborator

@feoh feoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks excellent. Thank you!

@feoh feoh merged commit ebca680 into nvim-lua:master Feb 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tokyonight should be initialized as intended
3 participants