-
Notifications
You must be signed in to change notification settings - Fork 13
4.2 | Programmatic language features
Rácz Zalán edited this page Nov 25, 2023
·
2 revisions
This page is under construction.
The extension's source code is located in the src folder. The subfolders are:
- _generated: It contains the lexer's and the parser's code, generated from ANTLR.
- builtin: The files in the info subfolder contain all the information about builtin functions, variables, etc. interfaces.ts defines the data structures used for builtin information. builtin.ts loads and stores the builtin information. constructor-processor.ts and generic-type-processor.ts files generate all possible constructor variants, and type combinations for builtin functions. documentation.ts handles the builtin documentation, displayed in a Webview.
- core: glsl-editor.ts contains all processed GLSL files and the diagnostic information about them. document-info.ts contains information about one GLSL file, configuration.ts handles user settings.
- processor: Contains files that are part of the ANTLR tree traversal, and they collect information about specific areas, like type declarations, expressions, or functions.
- providers: Each file corresponds to a VS Code feature, like code completion, rename, or hover. They usually don't contain complex logic, they just query the already collected information. However, there are some more complicated, for example, formatting, which creates a state machine.
- scope: It contains basic types for the collected information, for example, variable declarations, keywords, or qualifiers.
At the moment the extension supports VS Code version 1.65+. If a new feature requires a higher version, you have to change the engines.vscode
property in package.json, and update the @types/vscode package.
- VS Code documentation: Programmatic Language Features
- VS Code documentation: Virtual Documents
- VS Code documentation: Webview API
- VS Code documentation: File Icon Theme
- VS Code documentation: VS Code API
- VS Code documentation: Webviews UX Guidelines
- VS Code documentation: Settings UX Guidelines
- VS Code documentation: Editor Actions UX Guidelines
- VS Code documentation: Command Palette UX Guidelines
- VS Code documentation: Document selector