@@ -11,11 +11,12 @@ use oxc_formatter::{
1111use oxc_parser:: Parser ;
1212use tower_lsp_server:: ls_types:: { Pattern , Position , Range , ServerCapabilities , TextEdit , Uri } ;
1313
14- use crate :: {
15- capabilities :: Capabilities ,
16- formatter :: { FORMAT_CONFIG_FILES , options :: FormatOptions as LSPFormatOptions } ,
17- tool :: { Tool , ToolBuilder , ToolRestartChanges } ,
14+ use crate :: lsp :: { FORMAT_CONFIG_FILES , options :: FormatOptions as LSPFormatOptions } ;
15+
16+ use oxc_language_server :: {
17+ Capabilities ,
1818 utils:: normalize_path,
19+ { Tool , ToolBuilder , ToolRestartChanges } ,
1920} ;
2021
2122pub struct ServerFormatterBuilder ;
@@ -370,7 +371,8 @@ fn load_ignore_paths(cwd: &Path) -> Vec<PathBuf> {
370371
371372#[ cfg( test) ]
372373mod tests_builder {
373- use crate :: { ServerFormatterBuilder , ToolBuilder , capabilities:: Capabilities } ;
374+ use crate :: lsp:: server_formatter:: ServerFormatterBuilder ;
375+ use oxc_language_server:: { Capabilities , ToolBuilder } ;
374376
375377 #[ test]
376378 fn test_server_capabilities ( ) {
@@ -392,7 +394,7 @@ mod test_watchers {
392394 const FAKE_DIR : & str = "fixtures/formatter/watchers" ;
393395
394396 mod init_watchers {
395- use crate :: formatter :: { server_formatter:: test_watchers:: FAKE_DIR , tester:: Tester } ;
397+ use crate :: lsp :: { server_formatter:: test_watchers:: FAKE_DIR , tester:: Tester } ;
396398 use serde_json:: json;
397399
398400 #[ test]
@@ -432,10 +434,8 @@ mod test_watchers {
432434 }
433435
434436 mod handle_configuration_change {
435- use crate :: {
436- ToolRestartChanges ,
437- formatter:: { server_formatter:: test_watchers:: FAKE_DIR , tester:: Tester } ,
438- } ;
437+ use crate :: lsp:: { server_formatter:: test_watchers:: FAKE_DIR , tester:: Tester } ;
438+ use oxc_language_server:: ToolRestartChanges ;
439439 use serde_json:: json;
440440
441441 #[ test]
@@ -465,7 +465,7 @@ mod tests {
465465 use serde_json:: json;
466466
467467 use super :: compute_minimal_text_edit;
468- use crate :: formatter :: tester:: Tester ;
468+ use crate :: lsp :: tester:: Tester ;
469469
470470 #[ test]
471471 #[ should_panic( expected = "assertion failed" ) ]
@@ -551,7 +551,7 @@ mod tests {
551551 #[ test]
552552 fn test_formatter ( ) {
553553 Tester :: new (
554- "fixtures/formatter /basic" ,
554+ "test/ fixtures/lsp /basic" ,
555555 json ! ( {
556556 "fmt.experimental" : true
557557 } ) ,
@@ -562,7 +562,7 @@ mod tests {
562562 #[ test]
563563 fn test_root_config_detection ( ) {
564564 Tester :: new (
565- "fixtures/formatter /root_config" ,
565+ "test/ fixtures/lsp /root_config" ,
566566 json ! ( {
567567 "fmt.experimental" : true
568568 } ) ,
@@ -573,7 +573,7 @@ mod tests {
573573 #[ test]
574574 fn test_custom_config_path ( ) {
575575 Tester :: new (
576- "fixtures/formatter /custom_config_path" ,
576+ "test/ fixtures/lsp /custom_config_path" ,
577577 json ! ( {
578578 "fmt.experimental" : true ,
579579 "fmt.configPath" : "./format.json" ,
@@ -585,7 +585,7 @@ mod tests {
585585 #[ test]
586586 fn test_ignore_files ( ) {
587587 Tester :: new (
588- "fixtures/formatter /ignore-file" ,
588+ "test/ fixtures/lsp /ignore-file" ,
589589 json ! ( {
590590 "fmt.experimental" : true
591591 } ) ,
@@ -596,7 +596,7 @@ mod tests {
596596 #[ test]
597597 fn test_ignore_pattern ( ) {
598598 Tester :: new (
599- "fixtures/formatter /ignore-pattern" ,
599+ "test/ fixtures/lsp /ignore-pattern" ,
600600 json ! ( {
601601 "fmt.experimental" : true
602602 } ) ,
0 commit comments