Closed lmburns closed 2 years ago
Neovim now supports mapping captures directly (so you can do hi link @variable Identifier
-- or, indeed, hi link @variable.lua Function
). This makes the highlight group functionality no longer needed (for its intended purpose: knowing what to hi link
).
There may be new convenience functions (either in Neovim or this plugin) at a later point if these are deemed useful enough(!).
What was displayed was just plainly wrong. The copy of the internal implementation of Neovim was just not update. We should probably try to get the extmarks from the tree-sitter namespace or just try to get an API for extmark based highlights.
Thank you, I understand it now.
I'll also go ahead and ask this while I am here because it seems silly to create an issue upstream to ask but, what's the best way to check if the user has this functionality? I tried vim.fn.has('patch-8.2.0674')
but it shows 0 on my end. I'd like to check whether the user's version allows for this because otherwise the error W18: Invalid character in group name
is shown. I chose this patch because it was the next one I saw after the commit 030b422d1
.
The old TS* mapping will still exist for now. You could use the same check as we do in highlight.lua in this repo (does hl_map exist)
I'll also go ahead and ask this while I am here because it seems silly to create an issue upstream to ask but, what's the best way to check if the user has this functionality?
You don't -- Neovim doesn't do patch/commit levels. You need to check for a specific version (has('nvim-0.8
)` in this case), where nightly/master reports as the next (unreleased) version.
You cannot and should not support users running anything but the very latest master (or a recent release) -- if they report an error, tell them to git pull
and rebuild.
Does this repo require the upstream builtin treesitter support to finish their implementation before highlight groups can be correctly displayed like they were before?
I see a similar issue was opened #89 that only showed that there was an error that occurred due to what I am asking about here.
For example, before this was removed from this repository, this is what was shown: I can go into my configuration and specify that I want to change
luaTSFunction
and the color of the item that I am currently hovering above will change to that color.After this function was removed, this is what is shown: The highlight groups are still the same name as above, but now
luafunction
provides no meaning to me as someone who wants to create or alter a theme.Also, this might not be the exact place to ask this question, but are filetype specific highlight groups being erased? That is,
luaTSField
vsTSField
. (I hope that they aren't.)