Comments (2)
After some investigating I found that commenting out this line fixes the issue.
This really just confirms that the ts-plugin is to blame. I am not sure if this is an issue in volar.js or in astro language tools.
I would like to setup a minimum viable volar.js typescript plugin to confirm if it is in upstream but I can't really find any docs on this function:
import { createLanguageServicePlugin } from '@volar/typescript/lib/quickstart/createLanguageServicePlugin.js';
All the volar.js docs I have found do not include the ts-plugin piece.
from language-tools.
And another bit of information I found really strange.
Looking at this line in the example.tsx
file:
import blogHeaderImg from "../assets/blog-header.jpg";
If I right-click on the "../assets/blog-header.jpg"
both "Go to Definition" and "Go to Type Definition" is able to find the correct ImageMetadata
type defined at node_modules/astro/client.d.ts
declare module '*.jpg' {
const metadata: ImageMetadata;
export default metadata;
}
However, if I right-click on the blogHeaderImg
part, "Go to Definition" still takes me to the correct definition but "Go to Type Definition" shows the error:
No type definition found for 'blogHeaderImg'.
from language-tools.
Related Issues (20)
- 🐛 BUG: Language server not starting properly in non-VSCode editors if prettier or the prettier plugin are missing HOT 1
- vscode: astro attributes intellisense
- 🐛 BUG: Formatting Layout components gives unexpected reults HOT 1
- 🐛 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 2
- 🐛 BUG: Astro VSCode extension crashing Typescript language server HOT 12
- 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: extension not doing anything (no syntax color, no intellisense, etc) HOT 4
- 🐛 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
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.