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

TSBufToggle #259

Closed
kyazdani42 opened this issue Aug 4, 2020 · 4 comments · Fixed by #895
Closed

TSBufToggle #259

kyazdani42 opened this issue Aug 4, 2020 · 4 comments · Fixed by #895
Assignees
Labels
enhancement New feature or request

Comments

@kyazdani42
Copy link
Member

When i work in some files, i sometime want to enable a plugin that uses the default neovim syntax (like styled-components stuff in js files).
Mapping TSBufDisable and TSBufEnable would work but it's a hassle and it would be easier to just map TSBufToggle highlight.

@kyazdani42 kyazdani42 added the enhancement New feature or request label Aug 4, 2020
@kyazdani42 kyazdani42 self-assigned this Aug 4, 2020
@apazzolini
Copy link

Maybe this would be better served as a separate issue, but for the use case described above, would it instead be possible to define a rule to exclude a specific chunk of a file from treesitter highlighting and fall back to Neovim highlighting? I also use styled-components (and the nvim plugin for it), and it would be awesome if there was something like:

(call_expression
  left: (member_expression (identifier #eq? 'styled')
  right: (template_string @neovim_fallback_highlight))

@kyazdani42
Copy link
Member Author

this is a completely different issue indeed, and this is on the roadmap and i think it should be first addressed upstream.

@vigoux
Copy link
Member

vigoux commented Aug 10, 2020

I guess that this would be really hard too.

@kyazdani42
Copy link
Member Author

js land makes everything harder doesn't it x)

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

Successfully merging a pull request may close this issue.

3 participants