Skip to content

Field and value completion does not work inside conditionals #4289

Closed
@VeryMilkyJoe

Description

@VeryMilkyJoe

Cabal completion seems to not be able to complete anything inside if statements.

Here, the default completion for vscode is suggested inside an if conditional, when it should be the library section fields:
image
Here, the exposed modules values should be completed instead of the default vscode completions:
image

The fields we are checking for completion are defined here.
I think to fix this we can check the parent sections recursively instead of simply the most direct parent to figure out the stanza the cursor is located in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HackathonThis issue is suitable for hackathon sessionscomponent: hls-cabal-pluginIssues related to the hls-cabal-pluginlevel: easyThe issue is suited for beginnerstype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions