tree: 170107b0ed377339ac79d639271604fa7d46f503 [path history] [tgz]
  1. .vscode/
  2. images/
  3. src/
  4. syntaxes/
  5. tools/
  6. AUTHORS
  7. CHANGELOG.md
  8. CONTRIBUTING.md
  9. language-configuration.json
  10. LICENSE
  11. package-lock.json
  12. package.json
  13. PATENTS
  14. README.md
  15. test.test.fidl
  16. tsconfig.json
  17. tslint.json
vscode-language-fidl/README.md

FIDL Language Support for Visual Studio Code

This extension provides support for fidl-lsp, an LSP language server for FIDL. For more information about the language server, how to run a test instance, and how to contribute, see the fidl-lsp README.

Getting Started

  1. Run fx gen and fx build build/fidl:validate_fidl_project_json
  2. Download VSCode and install the FIDL Language extension.
  3. Either set your FUCHSIA_DIR environment variable, or configure these settings in VSCode and reload the editor:
    • Fidl > Project Root should be the root directory of your fuchsia.git checkout, e.g. ‘/usr/local/google/home/$LDAP/fuchsia’
    • Fidl > Fidl Project should be the absolute path to your fidl_project.json, which is generated in your build output directory, such as ‘${env:FUCHSIA_DIR}/out/default/fidl_project.json’ (see here for how to use env vars in VSCode settings)
  4. Open a FIDL file in VSCode, and you should be ready to go!

If you want to use local versions of fidlc and fidl-format instead of the latest SDK versions, you can edit the extension settings in VSCode. (You may need to reload the editor for the settings to take effect.)

Syntax Highlighting

In addition to LSP capabilities, this extension provides syntax highlighting. The syntax highlighting is generated by a script called generate-syntax.ts. That can be run by:

npm install
npm run-script build-syntax