@@ -185,28 +185,26 @@ struct ServerInitializationOptions {
185
185
}
186
186
pub fn get_main_language_feature ( ) -> LanguageFeatures {
187
187
LanguageFeatures {
188
- references : Some ( true ) ,
188
+ references : None ,
189
189
// 不存在
190
- implementation : Some ( true ) ,
191
- definition : Some ( true ) ,
192
- typeDefinition : Some ( true ) ,
193
- callHierarchy : Some ( true ) ,
194
- hover : Some ( true ) ,
195
- rename : Some ( true ) ,
196
- renameFileRefactoring : Some ( true ) ,
197
- signatureHelp : Some ( true ) ,
198
- codeAction : Some ( true ) ,
199
- workspaceSymbol : Some ( true ) ,
190
+ implementation : None ,
191
+ definition : None ,
192
+ typeDefinition : None ,
193
+ callHierarchy : None ,
194
+ hover : None ,
195
+ rename : None ,
196
+ renameFileRefactoring : None ,
197
+ signatureHelp : None ,
198
+ codeAction : None ,
199
+ workspaceSymbol : None ,
200
200
completion : Some ( Completion {
201
201
defaultTagNameCase : DefaultTagNameCase :: both,
202
202
defaultAttrNameCase : DefaultAttrNameCase :: kebabCase,
203
203
getDocumentNameCasesRequest : Some ( false ) ,
204
204
getDocumentSelectionRequest : Some ( false ) ,
205
205
ignoreTriggerCharacters : None ,
206
206
} ) ,
207
- schemaRequestService : Some ( SchemaRequestService {
208
- getDocumentContentRequest : Some ( true ) ,
209
- } ) ,
207
+ schemaRequestService : None ,
210
208
documentHighlight : None ,
211
209
documentLink : None ,
212
210
codeLens : None ,
@@ -218,18 +216,14 @@ pub fn get_main_language_feature() -> LanguageFeatures {
218
216
219
217
pub fn get_second_language_feature ( ) -> LanguageFeatures {
220
218
LanguageFeatures {
221
- documentHighlight : Some ( true ) ,
222
- documentLink : Some ( true ) ,
223
- codeLens : Some ( CodeLens {
224
- showReferencesNotification : Some ( true ) ,
225
- } ) ,
226
- semanticTokens : Some ( false ) ,
219
+ documentHighlight : None ,
220
+ documentLink : None ,
221
+ codeLens : None ,
222
+ semanticTokens : None ,
227
223
// 不存在
228
224
inlayHints : None ,
229
- diagnostics : Some ( true ) ,
230
- schemaRequestService : Some ( SchemaRequestService {
231
- getDocumentContentRequest : Some ( true ) ,
232
- } ) ,
225
+ diagnostics : None ,
226
+ schemaRequestService : None ,
233
227
references : None ,
234
228
implementation : None ,
235
229
definition : None ,
@@ -255,11 +249,11 @@ pub fn get_doc_feature() -> DocumentFeatures {
255
249
// "typescriptreact".to_owned(),
256
250
// ],
257
251
allowedLanguageIds : None ,
258
- selectionRange : Some ( true ) ,
259
- foldingRange : Some ( true ) ,
260
- linkedEditingRange : Some ( true ) ,
261
- documentSymbol : Some ( true ) ,
262
- documentColor : Some ( true ) ,
252
+ selectionRange : None ,
253
+ foldingRange : None ,
254
+ linkedEditingRange : None ,
255
+ documentSymbol : None ,
256
+ documentColor : None ,
263
257
// 没有格式胡
264
258
documentFormatting : None ,
265
259
}
@@ -286,7 +280,8 @@ pub fn get_initialization_options(name: LanguageOptionEnum) -> Option<Value> {
286
280
let initialization_options = ServerInitializationOptions {
287
281
// textDocumentSync: TextDocumentSyncKind::Incremental,
288
282
typescript : TypescriptPath {
289
- serverPath : "/Users/skymac/node_modules/typescript/lib/tsserverlibrary.js" . to_owned ( ) ,
283
+ // serverPath: "/Users/skymac/node_modules/typescript/lib/tsserverlibrary.js".to_owned(),
284
+ serverPath : "/Users/xiaoxin/Library/pnpm/global/5/.pnpm/typescript@4.7.4/node_modules/typescript/lib/tsserverlibrary.js" . to_owned ( ) ,
290
285
localizedPath : None , // localizedPath: Some(
291
286
// "/Users/skymac/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json"
292
287
// .to_owned(),
0 commit comments