Open ComFreek opened 1 year ago
I assume that means the current solution does not work? As far as I can tell, it does (for mmt-stex)...
Workarounds are spread all over the place in mmt-lsp
and mmt-stex
as far as I can tell.
I'd like to extract every such workaround into a single combined method.
I built something:
object Utils {
def vscodeURIToFile(uri: URI): File = {
if (uri.scheme.contains("file")) {
val filePath = (uri.path match {
case driveLetter :: xs if driveLetter.matches("[a-zA-Z](:|%3A)") =>
(driveLetter.charAt(0).toUpper + ":") :: xs
case x => x
}).mkString(java.io.File.separator)
File(filePath)
} else { // fallback
File(uri.toString)
}
}
}
Any thoughts?
I think this should go into the existent methods for converting URIs - they are already used all over the place and it's probably a good thing if the URI used to identify documents is a valid file URI (if it is one)...?
The VSCode Extension is giving me error messages like this every time I save a file:
Internal error: file `d:\<path_to_my_project_folder>\UFrameIT-Install\archives\MathHub\FrameIT\frameworld\source\Scrolls\TriangleScrolls.mmt` requested to build was not communicated to be open to LSP server.
Open documents known to LSP server are: file:///D:/<path_to_my_project_folder>/UFrameIT-Install/archives/MathHub/FrameIT/frameworld/source/Scrolls/TriangleScrolls.mmt.
Is there a workaround to be able to use the extension in its current version?
@Jazzpirate Have you so far encountered an ultimately satisfying solution (e.g., for mmt-stex)?