22
22
import java .util .List ;
23
23
import java .util .Map ;
24
24
25
- import org .eclipse .core .runtime .CoreException ;
26
25
import org .eclipse .core .runtime .FileLocator ;
27
- import org .eclipse .core .runtime .IConfigurationElement ;
28
- import org .eclipse .core .runtime .IExecutableExtension ;
29
26
import org .eclipse .core .runtime .ILog ;
30
27
import org .eclipse .lsp4e .server .ProcessStreamConnectionProvider ;
31
28
import org .eclipse .wildwebdeveloper .embedder .node .NodeJSManager ;
32
29
33
- public class VueLanguageServer extends ProcessStreamConnectionProvider implements IExecutableExtension {
30
+ public class VueLanguageServer extends ProcessStreamConnectionProvider {
34
31
private static String tsserverPath = null ;
35
32
private static String vuePath = null ;
36
- private int mode = 1 ;
37
33
38
34
public VueLanguageServer () {
39
35
@@ -74,16 +70,19 @@ public Object getInitializationOptions(URI rootUri) {
74
70
setWorkingDirectory (rootUri .getRawPath ());
75
71
76
72
options .put ("typescript" , Collections .singletonMap ("tsdk" , tsserverPath ));
77
- options .put ("fullCompletionList" , false );
78
- options .put ("serverMode" , mode );
79
- options .put ("diagnosticModel" , 1 );
73
+ options .put ("diagnosticModel" , 0 );
80
74
options .put ("additionalExtensions" , new String [] {});
81
75
82
76
Map <String , Object > legend = new HashMap <>();
83
- legend .put ("tokenTypes" , new String [] {"compontent " } );
77
+ legend .put ("tokenTypes" , new String [] {"component " } );
84
78
legend .put ("tokenModifiers" , new String [] {} );
85
79
options .put ("semanticTokensLegend" , legend );
86
80
81
+ Map <String , Object > vue = new HashMap <>();
82
+ vue .put ("hybridMode" , false );
83
+
84
+ options .put ("vue" , vue );
85
+
87
86
return options ;
88
87
}
89
88
@@ -92,12 +91,5 @@ public String toString() {
92
91
return "VUE Language Server: " + super .toString ();
93
92
}
94
93
95
- @ Override
96
- public void setInitializationData (IConfigurationElement config , String propertyName , Object data )
97
- throws CoreException {
98
- if (config .getAttribute ("id" ).contains ("syntax" )) {
99
- mode = 2 ;
100
- }
101
-
102
- }
94
+
103
95
}
0 commit comments