Skip to content

Fix completion contexts in nested scopes#4969

Open
crtschin wants to merge 4 commits into
haskell:masterfrom
crtschin:crtschin/completion-context-refactor
Open

Fix completion contexts in nested scopes#4969
crtschin wants to merge 4 commits into
haskell:masterfrom
crtschin:crtschin/completion-context-refactor

Conversation

@crtschin

Copy link
Copy Markdown
Collaborator

The previous completion code took the first context returned through descent into the AST.

Moved context determination into it's own module and adjusted the descent to keep track of the "tightest" context around the cursor. Same caveat applies as #4910, I don't compare columns so the it has better support for invalid parses which are common while typing.

This doesn't contain the top-level snippet from #4905 yet, that'll be in a follow-up.

@crtschin crtschin force-pushed the crtschin/completion-context-refactor branch from 3eefc7f to 5e16bde Compare June 11, 2026 01:29
@crtschin crtschin added the status: needs review This PR is ready for review label Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: needs review This PR is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants