implements PLN-0137 (3/7) folding-and-selection-ranges
Advertise folding and selection only when the frontend supports them. Folding uses recovered spans for the listed declarations, their bodies, parameter lists, and Doc text blocks. A brace, parenthesis, or text block the tree does not cover still folds, including an unmatched opener through the end of the text. Selection grows outward from the identifier to the argument or parameter list, the block, and the declaration.
This commit is contained in:
+6
@@ -33,6 +33,12 @@ class FrontendLanguageServiceTest {
|
||||
assertFalse(service.documentLinksSupported());
|
||||
assertTrue(service.documentLinks(request).isEmpty());
|
||||
assertTrue(service.documentLinks(request, null).isEmpty());
|
||||
assertFalse(service.foldingRangesSupported());
|
||||
assertTrue(service.foldingRanges(request).isEmpty());
|
||||
assertTrue(service.foldingRanges(request, null).isEmpty());
|
||||
assertFalse(service.selectionRangesSupported());
|
||||
assertTrue(service.selectionRanges(request, List.of(0)).isEmpty());
|
||||
assertTrue(service.selectionRanges(request, null, List.of(0)).isEmpty());
|
||||
assertFalse(service.codeActionsSupported());
|
||||
assertTrue(service.codeActions(request).isEmpty());
|
||||
assertTrue(service.codeActions(request, null).isEmpty());
|
||||
|
||||
Reference in New Issue
Block a user