Skip to content

Commit 3c32e54

Browse files
warbaconpetalas
authored andcommitted
perf: load tokyonight.nvim in the intended way (nvim-lua#1360)
Fixes nvim-lua#1357
1 parent e442673 commit 3c32e54

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
@@ -916,14 +916,18 @@ require('lazy').setup({
916916
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
917917
'folke/tokyonight.nvim',
918918
priority = 1000, -- Make sure to load this before all the other start plugins.
919-
init = function()
919+
config = function()
920+
---@diagnostic disable-next-line: missing-fields
921+
require('tokyonight').setup {
922+
styles = {
923+
comments = { italic = false }, -- Disable italics in comments
924+
},
925+
}
926+
920927
-- Load the colorscheme here.
921928
-- Like many other themes, this one has different styles, and you could load
922929
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
923930
vim.cmd.colorscheme 'tokyonight-night'
924-
925-
-- You can configure highlights by doing something like:
926-
vim.cmd.hi 'Comment gui=none'
927931
end,
928932
},
929933

0 commit comments

Comments
 (0)