mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 14:21:53 +00:00
[red-knot] Support textDocument/didChange
notification (#13042)
## Summary This PR adds support for `textDocument/didChange` notification. There seems to be a bug (probably in Salsa) where it panics with: ``` 2024-08-22 15:33:38.802 [info] panicked at /Users/dhruv/.cargo/git/checkouts/salsa-61760caba2b17ca5/f608ff8/src/tracked_struct.rs:377:9: two concurrent writers to Id(4800), should not be possible ``` ## Test Plan https://github.com/user-attachments/assets/81055feb-ba8e-4acf-ad2f-94084a3efead
This commit is contained in:
parent
c73a7bb929
commit
21c5606793
7 changed files with 90 additions and 5 deletions
|
@ -6,7 +6,8 @@ use std::panic::PanicInfo;
|
|||
use lsp_server::Message;
|
||||
use lsp_types::{
|
||||
ClientCapabilities, DiagnosticOptions, DiagnosticServerCapabilities, MessageType,
|
||||
ServerCapabilities, TextDocumentSyncCapability, TextDocumentSyncOptions, Url,
|
||||
ServerCapabilities, TextDocumentSyncCapability, TextDocumentSyncKind, TextDocumentSyncOptions,
|
||||
Url,
|
||||
};
|
||||
|
||||
use self::connection::{Connection, ConnectionInitializer};
|
||||
|
@ -220,6 +221,7 @@ impl Server {
|
|||
text_document_sync: Some(TextDocumentSyncCapability::Options(
|
||||
TextDocumentSyncOptions {
|
||||
open_close: Some(true),
|
||||
change: Some(TextDocumentSyncKind::INCREMENTAL),
|
||||
..Default::default()
|
||||
},
|
||||
)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue