-
-
Notifications
You must be signed in to change notification settings - Fork 6
Update Language Server Protocol #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
The pull request updates the Language Server Protocol (LSP) dependencies to version 9.x, addressing breaking API changes, missing dependencies, extension configuration, and build processes. The update aims to improve performance, provide access to modern APIs, enhance error handling, and ensure future support.
| // Convert URI to file path manually since Files API is not available | ||
| let fsPath = uri.replace(/^file:\/\//, ""); | ||
| if (process.platform === "win32" && fsPath.startsWith("/")) { | ||
| fsPath = fsPath.substring(1); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider extracting the platform-specific path conversion to a separate function for better readability and maintainability.
let uri = document.uri;
// Convert URI to file path manually since Files API is not available
let fsPath = uri.replace(/^file:\/\//, "");
if (process.platform === "win32" && fsPath.startsWith("/")) {
fsPath = fsPath.substring(1);
}| "version": "8.2.0", | ||
| "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", | ||
| "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", | ||
| "engines": { | ||
| "node": ">=4.0.0 || >=6.0.0" | ||
| "node": ">=14.0.0" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The engine constraint has been updated. Ensure that this change aligns with the project's supported Node.js versions.
"node_modules/vscode-jsonrpc": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz",
"integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==",
"engines": {
"node": ">=14.0.0"
What was fixed:
✅ Dependencies: Updated all LSP packages to version 9.x
✅ Breaking Changes: Fixed all API changes (imports, connection setup, TextDocuments, etc.)
✅ Missing Dependencies: Added vscode-languageserver-textdocument@^1.0.12
✅ Extension Configuration: Fixed activation events to be more specific
✅ Build Process: Updated bundle-dependencies script
✅ Code Quality: Removed deprecated APIs and modernized the codebase
Benefits you'll get from LSP 9.x:
🚀 Better Performance: More efficient client-server communication
🔧 Modern APIs: Access to latest Language Server Protocol features
🛡️ Better Error Handling: Improved debugging and error reporting
🔄 Future-Proof: Ongoing support and updates
📊 Enhanced Diagnostics: Better linting feedback
The extension should now work faster and more reliably with HTML files, providing the same great HTMLHint linting experience with the modern LSP infrastructure underneath