tree-sitter / tree-sitter-julia

Julia grammar for Tree-sitter
MIT License
93 stars 31 forks source link

Subtype operator in parametric composite type definition not captured in Neovim #95

Closed mroavi closed 1 month ago

mroavi commented 1 year ago

The <: operator in the code below is not properly captured and highlighted in Neovim. I think this can also be solved with a query (in the future, should I open this kind of PRs in https://github.com/nvim-treesitter/nvim-treesitter instead?)

struct Point{T} <: Pointy{T}
  x::T
  y::T
end

image

fredrikekre commented 1 month ago

Fixed:

struct A <: B
end
(struct_definition) ; [1:1 - 2:3]
 name: (identifier) ; [1:8 - 8]
 (type_clause) ; [1:10 - 13]
  (operator) ; [1:10 - 11]
  (identifier) ; [1:13 - 13]