Support for Svelte in your IDE of choice. Works in JetBrains products that support JavaScript.
Work in progress, pretty usable already.
- Use official Plugin Repository
- Head over to releases tab, download
.zip
archive and Install plugin from disk
- Syntax highlighting
- Code formatting
- Typing assistance
- Completions of components and props
- Auto import of components
- Navigation from components to their definition
- $ subscriptions and labels aren't recognised properly
- Directives are treated as plain attributes
- ...
This project is run by one person. Please leave a star and spread the word.
Contributions are very much welcome!
IntelliJ Platform runs on JVM, so this can seem like a huge limitation, but don't worry. Kotlin feels a lot like TypeScript. Bigger issue is scarce documentation for their API.
You'll need IntelliJ IDEA. Community edition is free and sufficient, you can also use Ultimate edition if you have one.
Clone the repository and run ./gradlew :runIde
(There are also other intermediate tasks).
IntelliJ Ultimate will download in a bit and you'll be prompted with license dialog - choose evaluation mode. After 30 days delete build/idea-sandbox
and start again.
Ready to share .zip
archive can be found in build/distributions
after running ./gradlew :buildPlugin
.
Tests can be run with ./gradlew :test
command or even better or by using run action in IntelliJ IDEA.
Some of the tests in IntelliJ Platform (notably lexer and parser ones) are similar to Jest snapshots.
You need to create a .svelte
file in scr/test/resources
directory and add function composed of the word test
and file name to appropriate class.
Then run the test. File with expected results will be created and you need to commit it. When updating test simply delete expected file and rerun test.
Lexer tests use .tokens.txt
extensions, while Parser tests use .txt
.