withastro / language-tools

Language tools for Astro
MIT License
240 stars 45 forks source link

🐛 BUG:Astro ls not working with JS project (neovim) #837

Closed BlueEnd07 closed 3 months ago

BlueEnd07 commented 3 months ago

Describe the Bug

When I create an astro project with JS, astro ls not working and throwing an error

it's working properly when I create a typescript project

Lspinfo Screenshot_21-Mar_10-19-40_7818

plz ask for any other info

Steps to Reproduce

npm create astro@latest

Project name=./astrotest Project= empty Do you plan to write Typescript?? no"no worries......" install dependencies = yes git = yes

CD astrojs nvim(for Neovim) opening index.astro file

Screenshot_21-Mar_10-13-00_8151

Princesseuh commented 3 months ago

Astro projects are always TypeScript, answering no to that prompt does nothing apart from outputting a message and using the most relaxed preset.

Is there a more detailed log? Note that the language server still needs an installation of TypeScript in its init param even if not using TypeScript. Your init params should point to either a globally installed version of TypeScript, or if pointing to a local installation, be installed in your project.

BlueEnd07 commented 3 months ago

O THX for reply I just install TypeScript and its work