Comments (4)
For now, I can set language mode to HTML to get some color (but no type checking, etc). Once I open other files (f.e. none-astro files such as .ts files) the intellisense works fine, so another workaround is to move as much code as I can into components instead of in the Astro files.
from language-tools.
It looks like the Astro plugin also gets in the way of TypeScript working normally with non-astro files. For example here TypeScript does not find type definitions for a package that ships with type defs built in:
![Screenshot 2024-04-22 at 1 55 57 AM](https://private-user-images.githubusercontent.com/297678/324396174-3d260cd2-bc3c-4eeb-9642-8057454572ef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkwOTI4NDUsIm5iZiI6MTcxOTA5MjU0NSwicGF0aCI6Ii8yOTc2NzgvMzI0Mzk2MTc0LTNkMjYwY2QyLWJjM2MtNGVlYi05NjQyLTgwNTc0NTQ1NzJlZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyMlQyMTQyMjVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mY2ViOGIxMDc1NDFjZWM0ZmYxMzZkMzAzYTNkYWUwNTNkMzBlZmZkM2VmOTJkM2IxODczZGE5NGVhYjQ4NTExJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.0Y3nrMhebJMOMwMwWdlEZ8m4niOb2lg9oakSbIVxPG4)
If I uninstall the Astro plugin and restart TS server, the problem goes away (going to definition on the module name will take me to @lume/element
's code in node_modules).
from language-tools.
On the first screenshot you shared, the extension looks disabled (it's grayed out)
Everything looks fine to me:
When following your steps.
For your second problem, I cannot help without a reproduction.
from language-tools.
Closing due to inactivity.
from language-tools.
Related Issues (20)
- 🐛 BUG: version 2.8.1 removes trailing comma on save HOT 6
- 🐛 BUG: Type annotation for Astro.props can fail with single property HOT 3
- 🐛 BUG: Using Vue component with optional properties in Astro file cause type error HOT 4
- 🐛 BUG: Astro VSCode extension crashing Typescript language server HOT 15
- Auto import of Astro's navigate() in VS Code defaults to astro/dist/transitions/router HOT 2
- 🐛 BUG: Missing trailing backslash in void elements breaks code highlighting when inside a map method HOT 1
- 💡 RFC: Add {} after =
- 🐛 BUG: The Astro syntax parser freezes Neovim when writing an opening curly brace HOT 1
- 🐛 BUG: Comment shortcut generates `//` within a JSX expression HOT 1
- Is crashing my ts server HOT 1
- Extension causes the JS/TS language server to crash HOT 1
- 🐛 BUG: autocomplete does not work with inline style when Japanese text is included in an element. HOT 1
- 🐛 BUG: 2.8.6 breaks typescript server on VSCode
- 💡 RFC: Add code fix to replace quotes with curly braces
- 🐛 BUG: Moving files results in formatting issues in Svelte files HOT 8
- 🐛 BUG: astro check cannot parse file HOT 3
- 🐛 BUG: Go to problems after version 2.9.0 HOT 6
- 🐛 BUG: Astro check support for Object.groupBy() HOT 4
- 🐛 BUG: TS Tries To Parse Code In `<pre>` Tags HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from language-tools.