Skip to content

Commit eb78349

Browse files
warbacondribic
authored andcommitted
perf: load tokyonight.nvim in the intended way (nvim-lua#1360)
Fixes nvim-lua#1357 Signed-off-by: Dejan Ribič <[email protected]>
1 parent 5e18d79 commit eb78349

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
@@ -885,14 +885,18 @@ require('lazy').setup({
885885
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
886886
'folke/tokyonight.nvim',
887887
priority = 1000, -- Make sure to load this before all the other start plugins.
888-
init = function()
888+
config = function()
889+
---@diagnostic disable-next-line: missing-fields
890+
require('tokyonight').setup {
891+
styles = {
892+
comments = { italic = false }, -- Disable italics in comments
893+
},
894+
}
895+
889896
-- Load the colorscheme here.
890897
-- Like many other themes, this one has different styles, and you could load
891898
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
892899
vim.cmd.colorscheme 'tokyonight-night'
893-
894-
-- You can configure highlights by doing something like:
895-
vim.cmd.hi 'Comment gui=none'
896900
end,
897901
},
898902

0 commit comments

Comments
 (0)