Skip to content

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

Merged
feoh merged 1 commit into
nvim-lua:masterfrom
warbacon:master
Feb 18, 2025
Merged

feoh merged 1 commit into
nvim-lua:masterfrom
warbacon:master

Conversation

@warbacon

Copy link
Copy Markdown
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.

Comment thread init.lua
vim.cmd.colorscheme 'tokyonight-night'

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

ghost Feb 17, 2025

Copy link
Copy Markdown

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?

ghost Feb 17, 2025

Copy link
Copy Markdown
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).

ghost left a comment

Copy link
Copy Markdown
Collaborator

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
@moustario moustario mentioned this pull request Dec 3, 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