Skip to content

Editor Support

The package ships editor metadata for every component, with autocomplete for tags and attributes and hover documentation, and you generate nothing:

Note

The three files give the same features, and you set up only the one that fits your editor.

VS Code

custom.html-data.json

Register it in your workspace settings:

.vscode/settings.json
{
"html.customData": ["./node_modules/@staticview/ui/custom.html-data.json"],
}

Since it covers only .html files, use the language server below for JSX, TSX, Vue, and Svelte.

custom-elements.json

Install the Web Components Language Server extension from the VS Code Marketplace, and it finds custom-elements.json in your dependencies with no configuration. It also works in VSCodium, Cursor, Windsurf, and Theia.

Neovim

custom.html-data.json

Pass it to the HTML language server in your LSP config:

require('lspconfig').html.setup {
settings = {
html = {
customData = { vim.fn.getcwd() .. '/node_modules/@staticview/ui/custom.html-data.json' }
}
}
}

custom-elements.json

Install the wc-toolkit Neovim plugin, and install its language server with Mason:

:MasonInstall wc-language-server

Then set up the plugin:

require("wc_language_server").setup()

It finds custom-elements.json in your dependencies and attaches to HTML, Astro, Vue, Svelte, JSX, TSX, and Markdown files.

Zed

Install the Web Components Language Server extension from Zed's extension marketplace, and it finds custom-elements.json in your dependencies.

custom.html-data.json

Caution

The Zed HTML extension does not read customData from settings.json yet, and this method has no effect in Zed until it does. Use the extension above instead.

Once support lands, the registration looks like this:

.zed/settings.json
{
"lsp": {
"vscode-html-language-server": {
"settings": {
"html": {
"customData": ["./node_modules/@staticview/ui/custom.html-data.json"],
},
},
},
},
}

JetBrains IDEs

web-types.json

JetBrains IDEs, like WebStorm, IntelliJ IDEA, and Rider, pick up the package's web-types.json with no configuration.

custom-elements.json

Install the Web Components Language Server JetBrains plugin, which reads custom-elements.json from your dependencies.

Note

JetBrains IDEs do not support custom.html-data.json.

AI Assistants

The documentation site serves llms.txt, following the llms.txt convention. It is an index that links every guide, package README, component reference, and example as Markdown, for a tool to fetch only the pages it needs.

Cursor

In Settings → Features → Docs → Add new doc, paste the llms.txt URL. Once it is indexed, reference it in chat with @Staticview.

Claude Code, Codex, and Similar

Since these tools read the repository's instructions file, add a line there that points at llms.txt and tells the agent to fetch it before it answers questions about sv-* components.