iceberg.vim icon indicating copy to clipboard operation
iceberg.vim copied to clipboard

Tree-Sitter function color

Open lluar opened this issue 2 years ago • 4 comments

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.

lluar avatar Jan 20 '22 17:01 lluar

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

cocopon avatar Jan 20 '22 23:01 cocopon

Without tree-sitter for python it looks like this:

no_tree_sitter

With tree-sitter for python:

with_tree_sitter

lluar avatar Jan 22 '22 17:01 lluar

Faced the same issue with the tree-sitter.

shveikus avatar Sep 18 '22 11:09 shveikus

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!

swnakamura avatar Jan 23 '23 01:01 swnakamura