We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d2249c commit 98e3e94Copy full SHA for 98e3e94
server/src/server.ts
@@ -617,7 +617,8 @@ function format(msg: p.RequestMessage): Array<p.Message> {
617
} else {
618
// code will always be defined here, even though technically it can be undefined
619
let code = getOpenedFileContent(params.textDocument.uri);
620
- let bscBinaryPath = findBscBinary(filePath);
+ let projectRootPath = utils.findProjectRootOfFile(filePath);
621
+ let bscBinaryPath = projectRootPath === null ? null : findBscBinary(projectRootPath);
622
let formattedResult = utils.formatCode(bscBinaryPath, filePath, code);
623
if (formattedResult.kind === "success") {
624
let max = code.length;
0 commit comments