-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
Goto definition for built-in symbols in HTML script #244074
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
@@ -601,3 +611,11 @@ function generateIndent(level: number, options: FormattingOptions) { | |||
return repeat('\t', level); | |||
} | |||
} | |||
|
|||
function getLibDomUriAndDocument(): [string, TextDocument] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To compute the library location, add a new function to
const serverFolder = basename(__dirname) === 'dist' ? dirname(__dirname) : dirname(dirname(__dirname)); |
As for the document URI, this is trickier as this also needs to run on the web (vscode.dev), and there's no 'file' there.
You probably need to start from the extensionUri that you get on the HTML client, and pass it on the server.
Fixes #236603
I handle the filename
lib.dom.d.ts
and resolves it to the correct file to view definition of built-in DOM classes.