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

Tree-Sitter function color #97

Open
lluar opened this issue Jan 20, 2022 · 4 comments
Open

Tree-Sitter function color #97

lluar opened this issue Jan 20, 2022 · 4 comments

Comments

@lluar
Copy link

lluar commented Jan 20, 2022

Environment:

  • OS: Linux
  • Vim (:version): Neovim 0.6
  • Terminal: Bash

If you have a trouble with coloration and are using Vim/Neovim with terminal:

  • [ x] Does your Vim support full colors? (:set termguicolors)
  • [ x] Does your terminal support full colors? (e.g. Terminal.app doesn't support it)

With Tree-Sitter the class, function etc. declarations are not in orange.

@cocopon
Copy link
Owner

cocopon commented Jan 20, 2022

Please share a example code. This is important to investigate the issue.

@lluar
Copy link
Author

lluar commented Jan 22, 2022

Without tree-sitter for python it looks like this:

no_tree_sitter

With tree-sitter for python:

with_tree_sitter

@shveikus
Copy link

Faced the same issue with the tree-sitter.

@swnakamura
Copy link
Contributor

Hi, I'm interested in and took a quick look on this issue (with the help of :Inspect command).
It seems class definitions (SomeClass in the example) is in the @type group in treesitter. So, highlighting it into orange is possible, but makes all type keywords highlighted in orange, which puts a bit too much orange in the screen.
image

To avoid that problem, I am currently using a bit opinionated fork of mine that highlights types/classes in green and function/method definitions in orange.
image
If you are still having trouble, this may help you. Or if you came up with other solutions, please let me know!

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

4 participants