Closed AlexGustafsson closed 2 years ago
@UnwrittenFun ping
I've neglected the atom plugin a bit so its quite out of date. Will try to push a new version soon
@UnwrittenFun 🏓 😋
@UnwrittenFun Any update on this?
@UnwrittenFun ping :(
+1
+2 this is pretty rough for Atom users.
pong ?
@UnwrittenFun if transferring this repo to the sveltejs org would help, by making it easier for other people to help out on this project, let me know. I wouldn't personally have the first clue about maintaining an Atom plugin but I'm sure we can muddle through between us (at least to upgrade it to Svelte 3)
@UnwrittenFun @Rich-Harris I'll be happy to help with maintenance or contributions. Let me know.
@Rich-Harris Happy to transfer this. I think/hope updating would mostly be a matter of installing the latest version of the language server (Grammar might need updating a little?)
Excellent, thank you — will keep an eye out for the transfer
@Rich-Harris Have requested transfer to you as I can't do it to the svelte org without being a member
@UnwrittenFun gah, I just saw this but the link had already expired — can I trouble you to transfer it again?
@Rich-Harris Sent 😄
Thank you! It's now part of the sveltejs organisation: https://github.com/sveltejs/svelte-atom
Is there a workaround for this? Just opened up the sapper-template
for the first time, and the linter is already saying "nope".
Round 1
Ok, so I've partially worked around this. Went into <user>/.atom/packages/ide-svelte
and ran npm i svelte-language-server@0.10.3
(since a new version's been published, but the addon has the version pinned). That got rid of the lint error, but seems to have now brought in a Typescript lint info
message Variable 'segment' implicitly has an 'any' type, but a better type may be inferred from usage
.
I don't have Typescript enabled in the project, would be nice if this was an opt-in toggle in the addon.
Round 2
Ok, I've worked around this. Went into <user>/.atom/packages/ide-svelte
and ran npm i svelte-language-server@0.10.76
(since a new version's been published, but the addon has the version pinned). That got rid of the lint error.
TKO
The above worked on load of a file, but as soon as I tried to edit anything I got Parsing error: Unexpected token < (Fatal)
. Tried a bunch of different versions after that, and same result. So I'm callin' it quits for now.
Would be nice if there was a base package for syntax highlighting, and other packages for all the bells and whistles.
Fix in the works?
@dkotik https://github.com/sveltejs/language-tools/pull/160. Who knows when/if it'll get any traction.
Honestly though, it seems all the eggs have gone into the VS Code basket, which is a bummer.
@dkotik You can update the language server version manually, run npm install, and then reboot atom. Or you can just try out my forked package (https://atom.io/packages/ide-svelte-2), which updates the svelte language server to 0.11.0
That alone works fine on my projects, but feel free to report any issues and I'll have a go at fixing them.
@mlsvrts ok, I updated ide-svelte/package.json with (and it worked! what a marvelous person you are - can we be friends? I am dkotik on twitter):
"dependencies": {
"atom-languageclient": "^0.9.9",
"svelte-language-server": "0.11.0"
},
I deleted .lock file and ran npm install
Should be fixed in 1.0.0 that include the last version of Language Server (which is very big jump :sweat_smile: ).
Following the tutorial over at https://svelte.dev/tutorial/declaring-props, I've declared a component which looks like this:
However, I get a linter error from "svelte" saying that "A component can only have a default export". Clearly this must be wrong.
Any ideas of what could be causing this?