chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.78k stars 418 forks source link

[Feature Request]: Type highlighting for chpl-language-server #25720

Open Iainmon opened 1 month ago

Iainmon commented 1 month ago

Summary of Feature

Description:

Provide syntax highlighting for record/class/type alias usage in code:

record R {}
proc foo(x: R) {}
// would be
proc foo(x: [[R]]) {}

Here is another example: Given,

record struct { proc foo() {} }
proc type struct.foo() {}
var struc = new struct();
struct.foo();
struc.foo();

there is no highlighting difference between struc and struct. It would be nice if the syntax highlighting could highlight user defined types like struct, similar to how it highlights built in types like string and bytes.

Is this issue currently blocking your progress?

No

jabraham17 commented 1 month ago

This feature is called Semantic Highlighting and is supported by the LSP. Rudimentary support for this could be added today for types, procedures, and variables, but full support is going to require full dyno resolver support