Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: load tokyonight.nvim in the intended way #1360

Merged
merged 1 commit into from
Feb 18, 2025
Merged

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
petalas pushed a commit to petalas/nvim that referenced this pull request Feb 19, 2025
petalas pushed a commit to petalas/nvim that referenced this pull request Feb 19, 2025
Alessandro201 pushed a commit to Alessandro201/kickstart.nvim that referenced this pull request Feb 19, 2025
charamzic pushed a commit to charamzic/kickstart.nvim that referenced this pull request Feb 19, 2025
perf: load tokyonight.nvim in the intended way (nvim-lua#1360)

Fixes nvim-lua#1357
SanteriHetekivi pushed a commit to SanteriHetekivi/nvim that referenced this pull request Feb 20, 2025
SanteriHetekivi pushed a commit to SanteriHetekivi/nvim that referenced this pull request Feb 20, 2025
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