Skip to content

Commit c8967fa

Browse files
warbaconkmha915
authored andcommitted
perf: load tokyonight.nvim in the intended way (nvim-lua#1360)
Fixes nvim-lua#1357
1 parent d0613e3 commit c8967fa

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

init.lua

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -878,14 +878,18 @@ require('lazy').setup({
878878
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
879879
'folke/tokyonight.nvim',
880880
priority = 1000, -- Make sure to load this before all the other start plugins.
881-
init = function()
881+
config = function()
882+
---@diagnostic disable-next-line: missing-fields
883+
require('tokyonight').setup {
884+
styles = {
885+
comments = { italic = false }, -- Disable italics in comments
886+
},
887+
}
888+
882889
-- Load the colorscheme here.
883890
-- Like many other themes, this one has different styles, and you could load
884891
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
885892
vim.cmd.colorscheme 'tokyonight-night'
886-
887-
-- You can configure highlights by doing something like:
888-
vim.cmd.hi 'Comment gui=none'
889893
end,
890894
},
891895

0 commit comments

Comments
 (0)