svelte-intellij icon indicating copy to clipboard operation
svelte-intellij copied to clipboard

SvelteKit

Open tomblachut opened this issue 3 years ago • 5 comments

SvelteKit went into public beta. This issue is meant to track improvements on intellij plugin side.

  • [x] sveltekit:prefetch, sveltekit:noscroll, rel=external – completions, do not highlight as not allowed
  • [ ] load function
    • [x] mark as implicitly used
    • [ ] completions
    • [ ] (?) suggest and validate prop types defined on component and returned from load function
  • [ ] hydrate, prerender, router, ssr variables
    • [x] mark as implicitly used
    • [ ] completions
  • [ ] hooks – mark as implicitly used (handle, getSession, serverFetch)
  • [ ] api functions – mark as implicitly used (get, del, etc)
  • [ ] project generator based on create-svelte
  • [ ] mark .svelte subdirectories as library roots or excluded
  • [x] file references to static directory – suppress inspection ~or contribute references~
  • [ ] Events on window
  • [x] Correct highlighting of $app/* paths

Update:

  • some improvements are available in v0.20.0
  • $app/* is fixed in v0.21.0

tomblachut avatar Mar 24 '21 16:03 tomblachut

Typescript path alias / resolve does not work for me as well. It could also be a vite issue, but I'm not sure

wiesson avatar Apr 12 '21 19:04 wiesson

Is addressing import errors on modules like $app/store on the agenda as well? It makes using SvelteKit in IntelliJ kind of frustrating sometimes. image

miosenpai avatar Jul 15 '21 16:07 miosenpai

@miosenpai yes, sure. It's missing in checklist and I'll amend that.

tomblachut avatar Jul 15 '21 16:07 tomblachut

@miosenpai Workaround is to copy ambient-modules.d.ts (you can find it with Shift+Shift popup) and paste it into src/global.d.ts

tomblachut avatar Jul 15 '21 17:07 tomblachut

Private components are not visible for import – https://kit.svelte.dev/docs#routing-private-modules

image image

I would expect <PrivateComponent /> to give me an auto import like import PrivateComponent from './_PrivateComponent'

jjrgen avatar Sep 15 '21 05:09 jjrgen

@tomblachut, hi!

Are there any plans to develop the plugin? In the current version to use it with SvelteKit, very difficult, almost nothing is indexed and it seems the only option is to use VSCode :(

flymedllva avatar Mar 15 '23 21:03 flymedllva

There was lots of changes to SvelteKit since the list was written, most things work in 2023.2 thanks to WEB-58397 use the svelte language server.

missing bits:

  • WEB-61821 SvelteKit: mark load, actions etc as used
  • WEB-61610 use typescript-svelte-plugin.

Please open any additional issues on YouTrack, thanks!

tomblachut avatar Aug 01 '23 18:08 tomblachut