Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement LSP contract for Semantic Tokens #223

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

mattmasson
Copy link
Member

Attempt to implement semantic token parsing using the LSP API - #217

Before:
image

After:
image

However, I'm not sure if it is working as expected as the "Developer: Inspect Editor Tokens and Scope" only seems to show semantic token info for the as keyword.

image

test script:

section foo;

myfunc = (table as table, param as record, optional hello) =>
    let
        a = table,
        b = hello
    in
        a;

This PR builds on #222 (which should get merged first).

@mattmasson mattmasson requested a review from JordanBoltonMN May 23, 2024 03:29
@@ -41,6 +41,10 @@ export function handleError(
trace.exit({ vscodeMessage });
}

export function isCancellationError(value: unknown): boolean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use this signature instead:
export function isCancellationError(value: unknown): value is PQP.CommonError.CancellationError

Also, would it be useful to add a isCancellationError to PQP?

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.

2 participants