Skip to content

Commit f6852f1

Browse files
committed
doc(homepage): Explain how to configure editor to support PodOS elements auto-completion and documentation
1 parent aef5bd3 commit f6852f1

File tree

4 files changed

+51
-0
lines changed

4 files changed

+51
-0
lines changed

homepage/docs/getting-started/.nav.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ nav:
33
- Building dashboards:
44
- quick-start.md
55
- installation.md
6+
- editor-support.md
67
- displaying-data.md
101 KB
Loading
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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+
![Auto-componete](./autocomplete.png)
13+
<figcaption>Auto-complete suggesting various PodOS elements</figcaption>
14+
</figure>
15+
16+
<figure markdown="span">
17+
![Property documentation](./property-help.png){ 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."
21.8 KB
Loading

0 commit comments

Comments
 (0)