diff --git a/handler/builder.go b/handler/builder.go index 8bda9b1..170bbd2 100644 --- a/handler/builder.go +++ b/handler/builder.go @@ -53,8 +53,8 @@ func generateCpp(inoCode []byte, sourcePath, fqbn string) (cppPath string, cppCo } // Generate compile_flags.txt - cppPath = filepath.Join(rootTempDir, sketchFileName+".cpp") - flagsPath, err := generateCompileFlags(rootTempDir, inoPath, sourcePath, fqbn) + cppPath = filepath.Join(sketchTempPath, sketchFileName+".cpp") + flagsPath, err := generateCompileFlags(sketchTempPath, inoPath, sourcePath, fqbn) if err != nil { return } @@ -63,7 +63,7 @@ func generateCpp(inoCode []byte, sourcePath, fqbn string) (cppPath string, cppCo } // Generate target file - cppCode, err = generateTargetFile(rootTempDir, inoPath, cppPath, fqbn) + cppCode, err = generateTargetFile(sketchTempPath, inoPath, cppPath, fqbn) return } diff --git a/handler/handler.go b/handler/handler.go index 43e6161..f6c4c98 100644 --- a/handler/handler.go +++ b/handler/handler.go @@ -840,7 +840,7 @@ func (handler *InoHandler) parseCommandArgument(rawArg interface{}) interface{} func (handler *InoHandler) showMessage(ctx context.Context, msgType lsp.MessageType, message string) { params := lsp.ShowMessageParams{ Type: msgType, - Message: strings.ReplaceAll(message, "\n", "<br>"), + Message: message, } handler.StdioConn.Notify(ctx, "window/showMessage", ¶ms) }