Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling filetype for treesitter highlighting #171

Closed
NicoElbers opened this issue Oct 22, 2024 · 1 comment
Closed

Allow disabling filetype for treesitter highlighting #171

NicoElbers opened this issue Oct 22, 2024 · 1 comment

Comments

@NicoElbers
Copy link
Contributor

I personally don't use the Zig treesitter parser because for me it causes unreasonable delays. However, blink will try to create a parser when showing documentation, creating a very annoying error.

Therefore I'd personally like for it to be possible to disable certain treesitter filetypes, falling back on regex parsing instead.

I am not super familiar with Lua development, but I think maybe a pcall on the get_parser function may also allow catching the error (and then fall back on regex parsing).

@Saghen Saghen closed this as completed in fe68c28 Oct 24, 2024
@Saghen
Copy link
Owner

Saghen commented Oct 24, 2024

Not falling back to regex for now but this should at least unblock your use case. It might be best to make an exception and allow treesitter on the documentation window. It should be extremely fast on such a small amount of code (3-6ms on my system)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants