Closed n-crespo closed 9 months ago
Firstly, thanks for flagging this. There was a change in the markdown Tree-sitter parser in the last day or two unfortunately. Hopefully the latest commit resolves it.
If you notice any highlights that haven't been applied, can you do :Inspect
and let me know what the highlight groups are and what the colors should be?
Here are some, and a) I don't fully remember what most of them were supposed to look like and b) there may be more highlights I don't have listed
(I could use a color picker but I'll get slight variations in the hex codes, but I think the following has some standard colors in it that would be consistent with the rest of the color scheme)
local onedark = require("onedarkpro.helpers").get_colors("onedark_dark")
old highlight group name | new highlight group name | fix |
---|---|---|
@text.todo.unchecked |
@markup.list.checked.markdown links to @markup markdown |
I don't know what this used to look like, but the highlight name changed (this is checkboxes) |
@text.emphasis |
@markup.italic.markdown_inline links to @markup markdown_inline |
should be italic |
@tag.html |
@tag.html |
This works properly |
idk | @markup.heading.2.markdown links to @markup markdown |
some kind of light green? I don't have a way to make the theme work properly so I'm not sure what the exact color is. This one probably is onedark.green (this applies to all headers) |
idk | @markup.strong.markdown_inline links to @markup markdown_inline |
should be bolded |
idk | @markup.list.markdown links to @markup markdown |
should be some type of red, probably onedark.red (this is the bullet points) |
idk | @markup.link.label.markdown_inline |
Should be some shade of blue, probably onedark.blue (this is text inside square brackets) |
idk | @markup.raw.markdown_inline |
Should be some shade of green, probably onedark.green (inline code) |
idk | @markup.link.markdown_inline and @markup.link.url.markdown_inline |
should be some shade of pink, probably onedark.pink (if that exists?) (this is a URL) |
idk | @markup.quote.markdown |
This didn't have any highlighting in the old theme, but since it is a quote it could have a fg like this: "#757876" (this is a quote > ) |
Hope this helps a bit at least! Is the problem just that the highlight names have changed?
Right I've moved my earlier additions to the treesitter.lua
file and referenced them as per https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#highlights. Also added some of your suggestions...great spot.
Any adjustments you wish to make should be possible via your config...I've tested the following and it works as expected:
local md_highlight = "#14161a"
return {
{
"olimorris/onedarkpro.nvim",
priority = 1000, -- Ensure it loads first
opts = {
styles = { -- For example, to apply bold and italic, use "bold,italic"
comments = "italic", -- Style that is applied to comments
virtual_text = "bold", -- Style that is applied to virtual text
},
options = {
cursorline = false, -- Use cursorline highlighting?
transparency = true, -- Use a transparent background?
terminal_colors = true, -- Use the theme's colors for Neovim's :terminal?
highlight_inactive_windows = false, -- When the window is out of focus, change the normal background?
bold = true,
italic = true,
underline = true,
undercurl = true,
},
highlights = {
["@text.emphasis"] = { italic = true },
["@tag.html"] = { fg = "#89ca78" },
["@text.todo.unchecked"] = { bg = md_highlight },
Headline = { bg = md_highlight },
CodeBlock = { bg = md_highlight },
WhichKeyFloat = { bg = nil }, -- transparent whichkey
TabLineSel = { bg = "#22272f", bold = true },
MiniStatuslineModeNormal = { bg = "#22272f" },
LazyButton = { bg = "#22272f" },
TreeSitterContext = { bg = "#22272f" },
},
},
config = function(_, opts)
require("onedarkpro").setup(opts)
vim.cmd([[colorscheme onedark_dark]])
end,
},
}
Looks great! Thanks for everything and for the quick response time!
Btw, not sure it's worth the effort for changing this, but the colors for the part of markdown links inside of the square brackets and text inside the parenthesis are switched:
For reference, here how it used to be (switched around)
Your
minimal.lua
configError messages
No response
Describe the bug
What I expect to happen:
Syntax highlighting on markdown files, similar to below: (this is with tokyonight_night enabled with the minimal configuration)
Below is an image from a week ago with onedark_dark from my default configuration:
The default configuration: (none of the custom highlighting works either)
What actually happens:
No highlighting:
I could not re-create functional markdown highlighting with the minimal configuration, but I have been using this color scheme for a long time in my regular config and only today has markdown highlighting not worked.
Reproduce the bug
Steps to reproduce:
Open any markdown file with this color scheme enabled.
Final checks
minimal.lua
config file above and still get the issue:checkhealth treesitter