Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jazzpirate committed Jul 5, 2023
1 parent 8dc74e5 commit 0776165
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/mmt-lsp/src/info/kwarc/mmt/lsp/Server.scala
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ object LSPServer {
def URItoVSCode(s : String) : String = URLEncoder.encode(s.replace("+","%2B"),"UTF-8")
def VSCodeToURI(s: String): String = {
val dec = URLDecoder.decode(s,"UTF-8")
if (dec.startsWith("file:///")) {
if (dec.startsWith("file:///") && dec(9) == ':') {
dec.take(8) + dec(8).toUpper + dec.drop(9)
} else {
dec
Expand Down
9 changes: 4 additions & 5 deletions src/mmt-stex/src/info/kwarc/mmt/stex/lsp/Server.scala
Original file line number Diff line number Diff line change
Expand Up @@ -596,11 +596,10 @@ class STeXLSPServer(style:RunStyle) extends LSPServer(classOf[STeXClient]) with
result.getCapabilities.setWorkspace(wsc)
result.getCapabilities.setWorkspaceSymbolProvider(true)
if (params.getWorkspaceFolders != null) {
params.getWorkspaceFolders.asScala
.flatMap(workspaceFolder => LSPServer.VSCodeToFile(workspaceFolder.getUri))
.foreach {
case f if f.exists() => workspacefolders ::= f
}
params.getWorkspaceFolders.asScala.foreach {w =>
val file = LSPServer.VSCodeToFile(w.getUri)
if (file.exists(_.exists())) workspacefolders ::= file.get
}
}
}

Expand Down

0 comments on commit 0776165

Please sign in to comment.