Skip to content

Refactor selection range plugin #2996

Closed
@kokobd

Description

@kokobd

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:
    1. Build CodeRange from HieAST a and comments (put this step in Rules)
    2. Derive [SelectionRange] from CodeRange (put this step in selection range lsp method handler)

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.

Metadata

Metadata

Assignees

Labels

component: hls-code-range-pluginfor code range related functionalities, such as selection range and folding rangetype: enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions