nightfox.nvim
nightfox.nvim copied to clipboard
bug: Can't disable italics for React components properties
Neovim version (nvim -v)
0.8.3
Operating system/version
Fedora 36
Describe the bug
I have the default config options for the colorscheme, but i am not being able to disable the italics style for the properties in the react components with javascript.
Steps To Reproduce
- Install nightfox using Packer
- Install treesitter
- Create a react component with properties
Expected Behavior
Not having styles at all on my syntax
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
{
"EdenEast/nightfox.nvim",
config = function()
require("nightfox").setup({
-- setup here ...
})
end,
},
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("nightfox")
@cloudUser98 I just installed this theme and encountered this issue as well (on Mac, using Packer). JSX props look to be tied to the @tag.attribute highlight group, you can get around this temporarily by adding an override in your "after" config folder, e.g. "after/plugin/nightfox.lua"
vim.cmd("highlight @tag.attribute gui=NONE cterm=NONE")
The same bug applies to fenced_code_block in markdown files.
Adapted the workaround suggested by @cmattinson :
vim.cmd("highlight @text.literal.block.markdown gui=NONE cterm=NONE")
I have the same bug for react code ! How can I disable the italics for the React components attributes , I tried to style them but is not working !
Can you tell me the highlight group being applied? If you are using 0.9+ put your cursor over the target area and use :Inspect
. What is the result of this?
I hope this helps :
This is inherited from
https://github.com/EdenEast/nightfox.nvim/blob/34542a433e5bd03c27b6cd4570849d9cde59acf7/lua/nightfox/group/modules/treesitter.lua#L114
You can override this by removing the style:
require("nightfox").setup({
groups = {
all = {
["@tag.attribute"] = { fg = "func" },
},
},
})