Skip to content

Commit 18ee587

Browse files
warbaconandreacanton
authored andcommitted
perf: load tokyonight.nvim in the intended way (nvim-lua#1360)
Fixes nvim-lua#1357
1 parent 368e6d6 commit 18ee587

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

0 commit comments

Comments
 (0)