Skip to content

feature request: improve treesitter node highlighting #474

@quangd42

Description

@quangd42

Did you check existing requests?

  • I have searched the existing issues

Describe the feature

I'm using the provided snacks picker:

require('aerial').snacks_picker { layout = { preset = 'vscode', preview = 'main' } }

In the preview, the entire treesitter node is reverse highlighted like so
Image
which can be pretty hard to read because the syntax highlighting is lost, and personally the white text on bright blue is pretty bright but that could just be my colorscheme.

I would propose one of the two options

  • just highlighting the matched search term like snacks builtin treesitter picker Snacks.picker.treesitter(), which could be an easy fix
Image - or what Zed does, which could be considered better because the full node is still highlighted but the code is still easy to read Image

Provide background

As stated above.

What is the significance of this feature?

nice to have

Additional details

I'm not sure if I missed some obvious config, I tried searching through the readme. But even then I would propose to update the default. Thanks!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions