chapel-lang / chapel

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

CLS: support more end marker types #24636

Open jabraham17 opened 6 months ago

jabraham17 commented 6 months ago

The language server currently adds inlay hints to the ends of interesting blocks, however there are a few more block types it should support.

jabraham17 commented 5 months ago

Noting that select/when support was added in https://github.com/chapel-lang/chapel/pull/24837

mppf commented 5 months ago
  • this one is funky, as a common coding style is to attach else to the trailing brace (} else)

I would also use this style for select / when, and I'm guessing that pattern won't look good with the current end marker support. This does not bother me as long as the end marker display is opt-in.

jabraham17 commented 5 months ago

Currently, if a block is attached to a trailing brace, no end marker will show

when cond1 {

} when cond2 { // nothing shows up here

} // end marker shows up

Additionally, end markers are off-by-default and are controlled with --end-markers <marker_list>. Users can selectively turn them on/off