#Auto Complete?

57 messages · Page 1 of 1 (latest)

haughty flame
#

(not sure if auto complete is the right word)
Is there a way to have it when i type out Layout is there a way to have it automatically import it from where its located and then automatically replace Layout with <Layout></Layout> like how it does with JSX?

#

another thing to add, is it normal to not have auto complete when typing in my import statements?

woven lotus
#

If you are using visual studio code you could install the Astro extension

#

That should probably fix all of those problems

haughty flame
#

already have the extension installed, even uninstalled and reinstalled it

woven lotus
#

Interesting. Could you check if the extension is somehow disabled?

#

And we are talking about .astro files right?

haughty flame
#

it doesnt seem like its disabled, and yea .astro files

#

i messed around with astro a good while ago and iirc it worked then but not sure what i changed now

errant lodge
#

Try <Layout instead of just Layout

woven lotus
#

Oh. Of course. I kinda skimped over that part of the question…

woven lotus
#

While having typed something like “<La” try control space

haughty flame
#

it says no suggestions

hushed saffron
sonic vessel
#

Yeah, this is supposed to work. Hard to debug without further information

haughty flame
sonic vessel
#

Here's how it looks for me

haughty flame
#

oh that is so weird

#

yea im not getting any of that lol

sonic vessel
#

If you go in the Output tab, and then choose Astro in the dropdown, is there any information?

haughty flame
#

and its the Astro vscode extension that should be providing that right?

haughty flame
#

oh i dont even see an Astro thing in the output

sonic vessel
#

Hmm, that'd mean that the extension never started

#

If you confirm that the extension is installed and enabled, I'm not quite sure what else to say unfortunately

#

Anything unusual about your setup?

haughty flame
#

yea it seems installed to me and enabled

haughty flame
sonic vessel
#

And in software? Something like WSL perhaps?

#

If you go in this log:

#

Is there anything about Astro?

haughty flame
#

oh i do actually, tired it out once but didnt like it lol

#
2022-11-07 07:57:17.467 [info] ExtensionService#_doActivateExtension astro-build.astro-vscode, startup: true, activationEvent: 'workspaceContains:astro.config.*'
2022-11-07 07:57:17.467 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*'
2022-11-07 07:57:17.467 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2022-11-07 07:57:17.697 [error] Activating extension astro-build.astro-vscode failed due to an error:
2022-11-07 07:57:17.697 [error] TypeError: The "path" argument must be of type string. Received null
    at new NodeError (node:internal/errors:371:5)
    at validateString (node:internal/validators:120:11)
    at Object.join (node:path:429:7)
    at ww (c:\Users\adm\.vscode\extensions\astro-build.astro-vscode-0.28.2-win32-x64\dist\node\client.js:39:61851)
    at Tm (c:\Users\adm\.vscode\extensions\astro-build.astro-vscode-0.28.2-win32-x64\dist\node\client.js:39:62409)
    at hs (c:\Users\adm\.vscode\extensions\astro-build.astro-vscode-0.28.2-win32-x64\dist\node\client.js:39:60330)
    at Pw (c:\Users\adm\.vscode\extensions\astro-build.astro-vscode-0.28.2-win32-x64\dist\node\client.js:39:67493)```
#

thats the output of Extension Host

sonic vessel
#

Oh! That's really interesting

#

That's definitely some information, let me take a look at that

haughty flame
#

okay, ill go uninstall WSL as i dont use it anymore and see if it fixes it

sonic vessel
#

I don't think that's related

#

Wild guess: Do you have the TypeScript extension uninstalled?

haughty flame
#

i do not no

sonic vessel
#

Do you have any settings that looks like typescript.tsdk? Or typescript.locale

#

The error is essentially complaining that it couldn't find TypeScript, or more precisely the language files for it

haughty flame
#

i do have a tsconfig.json in the repo

sonic vessel
#

I meant in your VS Code config

haughty flame
#

"typescript.locale": null,

#

im guessing that isnt supposed to be null? lol

sonic vessel
#

It is not haha!

#

If you set it to anything else, or "auto" it should work

haughty flame
#

aww, its even set up as null as default

sonic vessel
#

I don't think it is? The default value is "auto":

haughty flame
#

oh read their comment wrong my bad

#

wonder how it got set to null tho

#

and it works!

#

thank you so much