{"id":50704357,"url":"https://github.com/nberlette/vscode-webidl","last_synced_at":"2026-06-09T10:32:04.276Z","repository":{"id":360340230,"uuid":"1244171423","full_name":"nberlette/vscode-webidl","owner":"nberlette","description":"WebIDL Language Support for VSCode, featuring the most accurate syntax highlighter available for *.webidl and *.idl files, and linting/formatting powered by webidl2!","archived":false,"fork":false,"pushed_at":"2026-06-02T15:43:11.000Z","size":128,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-02T17:11:34.560Z","etag":null,"topics":["formatter","idl","linter","syntax-highlighting","tmlanguage","vscode","vscode-extension","vsix","webidl","webidl-lang","webidl2"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=nberlette.webidl","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nberlette.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"ko_fi":"nberlette"}},"created_at":"2026-05-20T03:01:25.000Z","updated_at":"2026-06-02T15:43:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nberlette/vscode-webidl","commit_stats":null,"previous_names":["nberlette/vscode-webidl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nberlette/vscode-webidl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nberlette%2Fvscode-webidl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nberlette%2Fvscode-webidl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nberlette%2Fvscode-webidl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nberlette%2Fvscode-webidl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nberlette","download_url":"https://codeload.github.com/nberlette/vscode-webidl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nberlette%2Fvscode-webidl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34103355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["formatter","idl","linter","syntax-highlighting","tmlanguage","vscode","vscode-extension","vsix","webidl","webidl-lang","webidl2"],"created_at":"2026-06-09T10:32:02.136Z","updated_at":"2026-06-09T10:32:04.261Z","avatar_url":"https://github.com/nberlette.png","language":"TypeScript","funding_links":["https://ko-fi.com/nberlette"],"categories":[],"sub_categories":[],"readme":"# WebIDL for VSCode\n\n[![nberlette.webidl2 on VSCode Marketplace](https://vsmarketplacebadges.dev/version/nberlette.webidl2.png?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=nberlette.webidl2)\n[![GitHub issues](https://img.shields.io/github/issues/nberlette/vscode-webidl?style=flat-square)](https://github.com/nberlette/vscode-webidl/issues)\n[![GitHub stars](https://img.shields.io/github/stars/nberlette/vscode-webidl?style=flat-square)](https://github.com/nberlette/vscode-webidl/stargazers)\n[![GitHub license](https://img.shields.io/github/license/nberlette/vscode-webidl?style=flat-square)](https://github.com/nberlette/vscode-webidl/blob/main/LICENSE)\n\nThis extension brings a complete editing experience for\n[Web IDL](https://www.w3.org/TR/WebIDL/) to VSCode and compatible editors, on\nboth desktop and web. It provides syntax highlighting, on‑the‑fly validation,\nsemantic linting, formatting and simple commands to help you work with WebIDL\ndefinitions more productively.\n\n## Features\n\nThe extension uses the [webidl2](https://github.com/w3c/webidl2.js/) library\nunder the hood to parse, validate, and format your IDL.\n\n- **Syntax highlighting:** A comprehensive TextMate grammar describes WebIDL\n  syntax so that keywords, literals, identifiers and punctuation are colored\n  correctly.\n- **Automatic diagnostics:** Whenever you open or edit a WebIDL file the\n  extension parses it and runs semantic validation. Diagnostics are shown inline\n  in the editor with error or warning severity depending on the issue. The\n  validation logic is powered by `webidl2.validate()`. Syntax and semantic\n  problems are reported with concise messages, rule names where available, and\n  precise token ranges when the parser exposes them.\n- **Document formatting:** You can reformat a WebIDL document using either the\n  `WebIDL: Format Document` command or the built‑in _Format Document_ action.\n  Formatting parses the document, applies any available autofixes and\n  regenerates canonical output using `webidl2.write()`. Autofixes are applied\n  transparently to your buffer.\n- **Manual validation:** Use the `WebIDL: Validate Document` command to run\n  validation on demand. When no problems are found an informational notification\n  appears.\n\n### Commands\n\n| Command ID        | Description                                                                                                                                |\n| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |\n| `webidl.format`   | Formats the current WebIDL document in place using `webidl2.write()` and any available autofixes.                                          |\n| `webidl.validate` | Parses and validates the active WebIDL document using `webidl2.parse()` and `webidl2.validate()`. Diagnostics are published to the editor. |\n\n## Usage\n\n1. Install the extension from the VS Code Marketplace or by side‑loading the\n   `.vsix` created from this repository.\n2. Open a file with a `.webidl` or `.idl` extension. The extension activates\n   automatically on the first WebIDL file.\n3. Edit your WebIDL as usual. Syntax errors are highlighted immediately.\n   Semantic warnings (for example, using a `sequence` type on an attribute)\n   appear as you type.\n4. Run **WebIDL: Format Document** from the command palette\n   (`⇧⌘P`/`Ctrl+Shift+P`) to reflow your definitions. The formatter parses the\n   AST with `webidl2.parse()`, applies autofixes exposed by `webidl2.validate()`\n   and then writes the result with `webidl2.write()`.\n5. Run **WebIDL: Validate Document** to manually re‑evaluate the current file\n   and see a summary in the notifications area.\n\n### Example\n\nThe following IDL contains a semantic error: an attribute may not have a\nsequence type. When the file is opened or edited, the extension adds a\ndiagnostic to the offending token.\n\n```webidl\ninterface Example {\n  attribute sequence\u003clong\u003e data;\n};\n```\n\nThe validation API in `webidl2` returns an array of problem objects whose\n`message`, `line`, `level`, token and rule fields describe the issue. The\nextension enriches those tokens with source ranges, converts the results into\nVS Code diagnostics and displays them inline. Formatting the example would leave\nthe semantic error intact but tidy up whitespace and braces.\n\n### Configuration\n\nThe extension relies only on the built‑in VS Code settings. There are no custom\nconfiguration options at this time, but you can control editor behavior through\nstandard settings such as `editor.formatOnSave` to automatically format WebIDL\nfiles on save.\n\n---\n\n## Contributing\n\nContributions to this project are warmly welcomed! If you have an idea for a new\nfeature, a bug fix, or an improvement to the documentation, please open an\nissue, and if appropriate, feel free to open a pull request on GitHub.\n\nOpening an issue first is always a good idea to discuss your proposed changes\nand get feedback from the maintainers/community before investing time in a PR.\n\n\u003e [!TIP]\n\u003e\n\u003e Please refer to the [contributing guidelines](.github/CONTRIBUTING.md) for\n\u003e more details on how to contribute effectively to this project.\n\n---\n\n[MIT] © [Nicholas Berlette]. All rights reserved.\n\n[MIT]: https://nick.mit-license.org \"MIT © Nicholas Berlette\"\n[Nicholas Berlette]: https://github.com/nberlette \"Follow Nicholas Berlette on GitHub\"\n[github]: https://github.com/nberlette/vscode-webidl \"Give the vscode-webidl extension a star on GitHub! ⭐\"\n[issues]: https://github.com/nberlette/vscode-webidl/issues \"Report issues on GitHub\"\n[webidl2]: https://github.com/w3c/webidl2.js/#readme \"The webidl2.js library on GitHub\"\n[webidl2.ts]: https://github.com/nberlette/webidl2.ts \"A TypeScript port of webidl2.js on GitHub\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnberlette%2Fvscode-webidl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnberlette%2Fvscode-webidl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnberlette%2Fvscode-webidl/lists"}