Skip to content

Commit

Permalink
fix(lsp_sever): add per-error server file
Browse files Browse the repository at this point in the history
  • Loading branch information
nedpals committed Mar 26, 2024
1 parent 8d1493e commit 3245901
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/lsp_server/lsp_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ func Start() error {
}

errReport := errReports[0]
tempExpFilepath := getTempFilePath(fileUri.Filename())
errSpecificFilename := filepath.Join(fileUri.Filename(), fmt.Sprintf("%d", hash(errReport.Template)))
tempExpFilepath := getTempFilePath(errSpecificFilename)
openErrorRawUri := fmt.Sprintf("vscode://nedpals.bugbuddy/openError?file=%s", url.QueryEscape(tempExpFilepath))
openErrorUri := uri.URI(openErrorRawUri)

Expand All @@ -441,7 +442,7 @@ func Start() error {
})

// save the output into a temporary file
if file, err := getTempFileForFile(fileUri.Filename()); err == nil {
if file, err := getTempFileForFile(errSpecificFilename); err == nil {
file.WriteString(errReport.FullMessage)
file.Close()
}
Expand Down

0 comments on commit 3245901

Please sign in to comment.