Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@codemirror/lsp-client

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/lsp-client - npm Package Compare versions

Comparing version
6.1.0
to
6.1.1
+8
-0
CHANGELOG.md

@@ -0,1 +1,9 @@

## 6.1.1 (2025-09-02)
### Bug fixes
Properly declare the @codemirror/lint dependency.
Make sure document changes are eagerly pushed to the server when `serverDiagnostics` is active.
## 6.1.0 (2025-08-23)

@@ -2,0 +10,0 @@

+2
-1
{
"name": "@codemirror/lsp-client",
"version": "6.1.0",
"version": "6.1.1",
"description": "Language server protocol client for CodeMirror",

@@ -21,2 +21,3 @@ "keywords": [

"@codemirror/language": "^6.11.0",
"@codemirror/lint": "^6.8.5",
"@codemirror/state": "^6.5.2",

@@ -23,0 +24,0 @@ "@codemirror/view": "^6.37.0",

import type * as lsp from "vscode-languageserver-protocol"
import {setDiagnostics} from "@codemirror/lint"
import {ViewPlugin, ViewUpdate} from "@codemirror/view"
import {LSPPlugin} from "./plugin"

@@ -10,2 +11,19 @@ import {LSPClientExtension} from "./client"

const autoSync = ViewPlugin.fromClass(class {
pending = -1
update(update: ViewUpdate) {
if (update.docChanged) {
if (this.pending > -1) clearTimeout(this.pending)
this.pending = setTimeout(() => {
this.pending = -1
let plugin = LSPPlugin.get(update.view)
if (plugin) plugin.client.sync()
}, 500)
}
}
destroy() {
if (this.pending > -1) clearTimeout(this.pending)
}
})
export function serverDiagnostics(): LSPClientExtension {

@@ -28,4 +46,5 @@ return {

}
}
},
editorExtension: autoSync
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display