Skip to content

Migrate hover, signature help, and completions to ArkFile#1264

Open
lionel- wants to merge 1 commit into
oak/salsa-23-ark-filefrom
oak/salsa-24-rewire-handlers
Open

Migrate hover, signature help, and completions to ArkFile#1264
lionel- wants to merge 1 commit into
oak/salsa-23-ark-filefrom
oak/salsa-24-rewire-handlers

Conversation

@lionel-

@lionel- lionel- commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Branched from #1263
Progress towards #1212

The handlers migrated use a slightly different approach because they use r_task() heavily and the Oak DB shouldn't be touched from an r_task() because of the risk of cancellation panics, which would be UB over the R stack. We could catch panics in r_task() and unwind for cancellation but I didn't want to think through the various implications.

  • DocumentContext drops Document and stores the pieces it needs from the ArkDb and LSP state (tree, contents, line_index, encoding). This way the DB is not sent over an r_task().

  • Add LSP <> TS position/range converters as methods on DocumentContext (parallel to the ones on ArkFile, also replacements for the Document methods).

  • Migrate hover, signature help, and completion to the refactored DocumentContext.

@lionel- lionel- changed the title Reshape DocumentContext and migrate hover and completions to ArkFile Migrate hover, signature help, and completions to ArkFile Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant