Skip to content

Implement SQL File Folding #322

@xterao

Description

@xterao

Is your feature request related to a problem? Please describe.
Implemented a folding feature that collapses the text between directive blocks such as if ~ elseif ~ else ~ end in SQL files.

Describe the solution you'd like

  • Created a FoldingBuilder implementation class.
  • The builder searches for matching directive blocks, such as:
    • if with its corresponding elseif, else, and end
  • Determines the folding range based on the positions of these paired directive blocks.
/*%if div == 1 */
  -- Folding Block1
/*%elseif  div == 2 */
  -- Folding Block2
/*%else */
  -- Folding Block3
/*%end */

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions