glint icon indicating copy to clipboard operation
glint copied to clipboard

Semantic Token Scopes not provided

Open evoactivity opened this issue 2 years ago • 2 comments

Semantic tokens add additional syntax highlighting for things like decorators etc.

Also tracking in https://github.com/chiragpat/vscode-glimmer/issues/14

When this is used with vscode-glimmer, I don't think the language server provides the semanticTokenScopes required to apply the correct colours ontop of the syntax highlighting.

Typescript Language Server provides semantic tokens here https://github.com/microsoft/vscode/blob/main/extensions/typescript-language-features/src/languageFeatures/semanticTokens.ts

Incorrect Correct
image image
image image

evoactivity avatar Jul 10 '23 02:07 evoactivity

Actually not sure if this would be a glint concern or an ember language server concern.

I'm tracking an issue related to code folding on ELS here https://github.com/lifeart/vscode-ember/issues/43 and if the fix for code folding is for ELS to provide JS/TS folding, the fix for semantic tokens might also be to add it to ELS.

Since the typescript language server is not running for a glimmer-ts or glimmer-js files one of the projects will need to fill in the missing features but I'm not sure which project is the right one.

evoactivity avatar Jul 11 '23 23:07 evoactivity

I think adding semantic folding here makes sense as well, at the very least for the js/ts stuff.

To do the in-<template>-tag folding, we'd need to also produce an AST for for the things within the template, which I know @patricklx has been playing with in other tools (eslint)

NullVoxPopuli avatar Oct 03 '23 16:10 NullVoxPopuli