Closed
Description
Previously, hls-selection-range-plugin
converts HieAST a
(from ghc) to [SelectionRange]
(from lsp). This design is very tight-coupled.
I'm planning to:
- Extract a new data type
CodeRange = CodeRange RealSrcSpan [CodeRange]
- Split the process into two phases:
- Build
CodeRange
fromHieAST a
and comments (put this step inRules
) - Derive
[SelectionRange]
fromCodeRange
(put this step in selection range lsp method handler)
- Build
I'll probably finish this in no more than two weeks. Then, "folding range" will simply become a use case of CodeRange
. Adding it should be easier.
@sloorush Hope this will help your GSOC project (I'm assuming you have the same username on IRC and GitHub. Sorry if it's not the case). If you have any questions or advice, feel free to discuss them here or on the IRC channel.