You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the names of these concepts are too broad and not specific enough, making them difficult to understand. If it weren't for chatgpt, I think it would be difficult for me to quickly figure out the difference between the two plugins. Can the names of these two plugins be changed to be more specific? For example, LanguageVirtualCodePlugin and LanguageLspPlugin. Of course, it's possible that the names I provided are not very good. They only represent my personal opinion. Maybe others don't have this problem. It's just my own technical level.
1️⃣ Concept Definitions
Concept
Nature
Core Responsibility
Scope / Dependency
Project
Workspace context
Manages a set of files, tsconfig configuration, and dependencies; provides context for the LanguageService
Each Project corresponds to one LanguageService instance
LanguageServer (LSP)
Independent process / protocol implementation
Handles communication with the editor via LSP, processing requests like completion, go-to-definition, diagnostics, etc.
Can manage multiple Projects; supports multiple languages
LanguageService
TypeScript core language service
Provides TS/JS completions, type checking, navigation, refactoring, diagnostics, etc.
Core TS/JS functionality; framework-agnostic
LanguagePlugin
Volar file parser plugin
Parses .vue or custom files into virtual TS/JS files
Used by LanguageService or LanguageServicePlugin to provide semantic information
LanguageServicePlugin
Volar language service enhancement plugin
Enhances TS/JS functionality based on virtual files, e.g., template completion, props type hints, framework-specific diagnostics
Depends on virtual files produced by LanguagePlugin
2️⃣ Relationships and Flow
The flow between the components in the Volar / TypeScript ecosystem:
Editor / IDE
Sends requests (completion, diagnostics, navigation) via LSP.
LanguagePlugin
Parses source files (.vue) into virtual TS/JS files for semantic analysis.
LanguageServicePlugin
Enhances LanguageService with framework-specific features (e.g., Vue template completions, props type hints); depends on virtual files from LanguagePlugin.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I think the names of these concepts are too broad and not specific enough, making them difficult to understand. If it weren't for chatgpt, I think it would be difficult for me to quickly figure out the difference between the two plugins. Can the names of these two plugins be changed to be more specific? For example, LanguageVirtualCodePlugin and LanguageLspPlugin. Of course, it's possible that the names I provided are not very good. They only represent my personal opinion. Maybe others don't have this problem. It's just my own technical level.
1️⃣ Concept Definitions
tsconfigconfiguration, and dependencies; provides context for the LanguageService.vueor custom files into virtual TS/JS files2️⃣ Relationships and Flow
The flow between the components in the Volar / TypeScript ecosystem:
Editor / IDE
Sends requests (completion, diagnostics, navigation) via LSP.
LanguageServer (LSP)
Receives editor requests; manages multiple Projects; routes requests to LanguageService.
Project
Provides file list,
tsconfigconfiguration, and dependency information; each Project owns a LanguageService instance.LanguageService
Provides TypeScript/JavaScript core intelligence (completion, type-checking, navigation, refactoring).
LanguagePlugin
Parses source files (.vue) into virtual TS/JS files for semantic analysis.
LanguageServicePlugin
Enhances LanguageService with framework-specific features (e.g., Vue template completions, props type hints); depends on virtual files from LanguagePlugin.
Simplified flow diagram:
Simplified Flow Diagram
3️⃣ Key Differences
4️⃣ Summary
Simplified flow:
5️⃣ Other Related Concepts
Beta Was this translation helpful? Give feedback.
All reactions