Skip to content

Commit 37c89ad

Browse files
committed
Merge commit 'd350f1d3249a10ed36a12cfa98fa27d04f667395' into perf
2 parents 9e1f0ab + d350f1d commit 37c89ad

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/Main/Program.fs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -737,8 +737,8 @@ type Server(client: ILanguageClient) =
737737

738738
// Check if client supports InsertReplaceEdit
739739
clientSupportsInsertReplaceEdit <-
740-
p.capabilitiesMap.ContainsKey("textDocument.completion.completionItem.insertReplaceSupport") &&
741-
p.capabilitiesMap.["textDocument.completion.completionItem.insertReplaceSupport"]
740+
p.capabilitiesMap.ContainsKey("textDocument.completion.completionItem.insertReplaceSupport")
741+
&& p.capabilitiesMap.["textDocument.completion.completionItem.insertReplaceSupport"]
742742

743743
match p.initializationOptions with
744744
| Some opt ->
@@ -932,7 +932,7 @@ type Server(client: ILanguageClient) =
932932
|> (fun l -> if Array.isEmpty l then [| CK3Lang.English |] else l)
933933
|> Array.map Lang.CK3
934934
| _, CK3 -> [| Lang.CK3 CK3Lang.English |]
935-
| JsonValue.Array o, VIC3 ->
935+
| JsonValue.Arrayo, VIC3 ->
936936
o
937937
|> Array.choose (function
938938
| JsonValue.String s ->
@@ -943,7 +943,7 @@ type Server(client: ILanguageClient) =
943943
|> (fun l -> if Array.isEmpty l then [| VIC3Lang.English |] else l)
944944
|> Array.map Lang.VIC3
945945
| _, VIC3 -> [| Lang.VIC3 VIC3Lang.English |]
946-
| JsonValue.Array (o: JsonValue array), EU5 ->
946+
| JsonValue.Array(o: JsonValue array), EU5 ->
947947
o
948948
|> Array.choose (function
949949
| JsonValue.String s ->
@@ -1204,7 +1204,8 @@ type Server(client: ILanguageClient) =
12041204
}
12051205

12061206
member this.Completion(p: CompletionParams) =
1207-
async { return completion gameObj p docs debugMode clientSupportsInsertReplaceEdit } |> catchError None
1207+
async { return completion gameObj p docs debugMode clientSupportsInsertReplaceEdit }
1208+
|> catchError None
12081209

12091210
member this.Hover(p: TextDocumentPositionParams) =
12101211
async {
@@ -1309,6 +1310,7 @@ type Server(client: ILanguageClient) =
13091310
member this.DocumentSymbols(p: DocumentSymbolParams) =
13101311
let createDocumentSymbol name detail range =
13111312
let range = convRangeToLSPRange range
1313+
let name = if String.IsNullOrWhiteSpace name then "unnamed" else name
13121314

13131315
{ name = name
13141316
detail = detail

0 commit comments

Comments
 (0)