nvim-treesitter / playground

Treesitter playground integrated into Neovim
Apache License 2.0
898 stars 47 forks source link

Full name of highlight group not displayed by TSHighlightCaptureUnderCursor #94

Closed anthony-S93 closed 2 years ago

anthony-S93 commented 2 years ago

This is a bit similar to #70, but I still can't get the full name of the highlight group to show with TSHighlightCaptureUnderCursor as shown in the README. image

Here is mine: Screenshot_2022-09-06_08-32-52

For some reason, the full name of the highlight group wasn't displayed. I'm obviously missing something here.

My configs:

        use
    {
        "nvim-treesitter/nvim-treesitter",
        run = ':TSUpdate',
        config = function()
        require("nvim-treesitter.configs").setup{
            highlight = {
                enable = true,
                additional_vim_regex_highlighting = true,
            },
            ensure_installed = {"c", "cpp", "java", "python", "lua"},
        }
        end,
    }

    use
    {
        "nvim-treesitter/playground",
        config = function()
        playgrond = {
            enable = true,
            disable = {},
            updatetime = 25,
            persist_queries = false,
            keybindings = {
                toggle_query_editor = 'o',
                toggle_hl_groupd = 'i',
                toggle_injected_languages = 't',
                toggle_anonymous_nodes = 'a',
                toggle_language_display = 'I',
                focus_language = 'f',
                unfocus_language = 'F',
                update = 'R',
                goto_node = '<cr>',
                show_help = '?',
            },
        }
        end,
        --after = {"nvim-treesitter"}
    }
clason commented 2 years ago

Those are the full names of the highlight groups after a recent change to Neovim. The function has to be adapted to again show the linked highlight groups (if any).

gsheru commented 2 years ago

Same here.

image

Capture group is shown but linked higroups do not.

clason commented 2 years ago

Capture group is highlight group for 0.8.

gsheru commented 2 years ago

Capture group is highlight group for 0.8.

With the @ and the dots? Like in @function.builtin? And we loose the syntax prefix? Like in vimTSConstant?

There is any documentation about that change? To be prepared. And to learn the reason and benefits behind than change. That'll be a huge pain in the bumbum for a lot of colorschemes, I think. But... 🤷

clason commented 2 years ago

With the @ and the dots? Like in @function.builtin?

Yes.

There is any documentation about that change? To be prepared. And to learn the reason and benefits behind than change.

https://github.com/neovim/neovim/issues/14090#issuecomment-1228444035

A reminder that (all of!) treesitter integration is still declared experimental and subject to big changes as we work out the best way of doing things. (Case in point: this change makes setting up color schemes much more straightforward.)

clason commented 2 years ago

Closing this as basically "won't fix", since the capture name (plus implicit .language) now replaces the chain of highlight links.

Showing custom links was never part of this functionality but is already tracked as a new feature request in #70.