|
| 1 | +--- |
| 2 | +title: Editor support |
| 3 | +--- |
| 4 | + |
| 5 | +# Editor support / auto-complete |
| 6 | + |
| 7 | +When working with PodOS elements, it is best to use an IDE like IntelliJ IDEA or Visual Studio Code. These tools make it |
| 8 | +a lot easier to write valid HTML and can also autocomplete PodOS elements and show their documentation. |
| 9 | + |
| 10 | +<div markdown="span" style="display: flex; justify-content: space-between; align-items: center; gap: 1rem"> |
| 11 | + <figure markdown="span"> |
| 12 | +  |
| 13 | + <figcaption>Auto-complete suggesting various PodOS elements</figcaption> |
| 14 | + </figure> |
| 15 | + |
| 16 | + <figure markdown="span"> |
| 17 | + { width="300" } |
| 18 | + <figcaption>Pop-Ups show useful help, e.g. for properties</figcaption> |
| 19 | + </figure> |
| 20 | +</div> |
| 21 | + |
| 22 | +This is supported by any editor that |
| 23 | +understands [Custom Elements Manifests](https://github.com/webcomponents/custom-elements-manifest), e.g. by installing the Web Components Toolkit. |
| 24 | + |
| 25 | +## Install Web Components Toolkit |
| 26 | + |
| 27 | +We recommend using the [Web Components Toolkit](https://wc-toolkit.com), which is available as a plugin for several |
| 28 | +editors, |
| 29 | +like [VS Code](https://wc-toolkit.com/integrations/vscode/), [JetBrains IDEs](https://wc-toolkit.com/integrations/jetbrains/), [Neovim](https://wc-toolkit.com/integrations/neovim/) |
| 30 | +and [Zed](https://wc-toolkit.com/integrations/zed/). |
| 31 | + |
| 32 | +When installing PodOS via `npm`, auto-completion and documentation work out of the box. When using it from CDN, you |
| 33 | +must either download the `custom-elements.json` to your working directory or configure WC Toolkit to point to the remote |
| 34 | +file. |
| 35 | + |
| 36 | +Either download the manifest file: |
| 37 | +```bash |
| 38 | +wget https://cdn.jsdelivr.net/npm/@pod-os/elements/dist/custom-elements.json |
| 39 | +``` |
| 40 | + |
| 41 | +or configure WC Toolkit to load it from CDN: |
| 42 | + |
| 43 | +```js |
| 44 | +// wc.config.js |
| 45 | +export default { |
| 46 | + manifestSrc: "https://cdn.jsdelivr.net/npm/@pod-os/elements/dist/custom-elements.json" |
| 47 | +} |
| 48 | +``` |
| 49 | + |
| 50 | +!!! warning "You might need to restart the editor afterwards." |
0 commit comments