Closed joshzcold closed 1 year ago
I kind of like this option if we want to put it in the wiki
require("github-theme").setup({
theme_style = "dark_default",
overrides = function (c)
-- fix the look of yaml in this color scheme
vim.api.nvim_create_autocmd("FileType", { pattern = { "yaml", "yaml.ansible" }, command = "hi TSField guifg=".. c.green })
return{ }
end
})
since overrides
is a function then c.green
is available
Can't you apply ["@field.yaml"]
as an override?
Something I do in my own colorscheme.
@olimorris
Can you override the unassigned highlight by enabling dev
mode? It's used to assign a new highlight that is not overridden by the colorscheme.
require('github-theme').setup({
-- ...
overrides = function(c)
return {
-- ...
['@field.yaml'] = { fg = c.red },
}
end,
dev = true,
})
@ful1e5 that works well. Thank you 👍
The treesitter parser for
yaml
sticks the yaml keys atTSField
which is white on this color scheme https://github.com/ikatyang/tree-sitter-yaml/issues/28using the autogroup recommended in the issue I was able to put it at the green used in github-nvim-theme which is closer to what is on the github website
My question is if we can get something more built in to override on filetypes to fix issues like this?
Or maybe better I can make a pull request to add this auto group to fix the color scheme for yaml for this one issue?
Which do you think would be better?