mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
Update Luau LSP and project configurations
- Upgraded `luau-lsp` dependency to version 1.62.0 for improved features and bug fixes. - Modified sourcemap generator command in VSCode settings for better output handling. - Enabled `fillCallArguments` in project template settings to enhance code completion. - Added new configuration options for fragment autocomplete and quote conversion in project template settings. - Introduced a `sourcemap` flag in `SyncbackCommand` to allow optional sourcemap generation during syncback operations. These changes enhance the development experience and improve the functionality of the Luau language server integration.
This commit is contained in:
parent
4564ea242f
commit
a6341783ef
7 changed files with 67 additions and 37 deletions
|
|
@ -568,7 +568,7 @@ pub fn assert_round_trip(session: &TestServeSession, root_id: Ref) {
|
|||
/// (e.g., rename = REMOVE + CREATE on Windows) into a single logical packet
|
||||
/// for snapshot comparison. Takes the highest message cursor and combines
|
||||
/// all added/removed/updated entries into one message.
|
||||
fn merge_socket_packets(base: &mut SocketPacket<'static>, other: SocketPacket<'static>) {
|
||||
pub fn merge_socket_packets(base: &mut SocketPacket<'static>, other: SocketPacket<'static>) {
|
||||
match (&mut base.body, other.body) {
|
||||
(SocketPacketBody::Messages(base_msgs), SocketPacketBody::Messages(other_msgs)) => {
|
||||
base_msgs.message_cursor = base_msgs.message_cursor.max(other_msgs.message_cursor);
|
||||
|
|
|
|||
|
|
@ -853,9 +853,18 @@ fn api_write_then_filesystem_change() {
|
|||
session.post_api_write(&write_request).unwrap();
|
||||
std::thread::sleep(std::time::Duration::from_millis(500));
|
||||
|
||||
// Now make a filesystem change to a DIFFERENT file
|
||||
let socket_packet = session
|
||||
.recv_socket_packet(SocketPacketType::Messages, 0, || {
|
||||
// Drain the API write's patch message first. Subscribing at cursor 0
|
||||
// gets it immediately, which on macOS would start the settle timer
|
||||
// before the filesystem event arrives (FSEvents latency > 100ms).
|
||||
let api_packet = session
|
||||
.get_api_socket_packet(SocketPacketType::Messages, 0)
|
||||
.unwrap();
|
||||
let api_cursor = crate::rojo_test::serve_util::get_message_cursor(&api_packet);
|
||||
|
||||
// Now subscribe at the post-API cursor and make the filesystem change.
|
||||
// The settle timer won't start until this new event actually arrives.
|
||||
let fs_packet = session
|
||||
.recv_socket_packet(SocketPacketType::Messages, api_cursor, || {
|
||||
fs::write(
|
||||
session.path().join("src/server.server.luau"),
|
||||
"-- fs change\nprint('fs')",
|
||||
|
|
@ -863,9 +872,13 @@ fn api_write_then_filesystem_change() {
|
|||
.unwrap();
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
// Merge both packets for the combined snapshot assertion
|
||||
let mut combined = api_packet;
|
||||
crate::rojo_test::serve_util::merge_socket_packets(&mut combined, fs_packet);
|
||||
assert_yaml_snapshot!(
|
||||
"connected_api_then_fs_patch",
|
||||
socket_packet.intern_and_redact(&mut redactions, ())
|
||||
combined.intern_and_redact(&mut redactions, ())
|
||||
);
|
||||
|
||||
assert_round_trip(&session, root_id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue