From 3b9d676070c25ad4d0c26f51ae34309756beee54 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 9 Feb 2021 00:19:05 +0100 Subject: [PATCH 1/2] Use canonical path in sketchRoot --- handler/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler/handler.go b/handler/handler.go index 679432a..74c0b10 100644 --- a/handler/handler.go +++ b/handler/handler.go @@ -500,7 +500,7 @@ func (handler *InoHandler) initializeWorkbench(ctx context.Context, params *lsp. if buildPath, err := handler.generateBuildEnvironment(); err == nil { handler.buildPath = buildPath - handler.buildSketchRoot = buildPath.Join("sketch") + handler.buildSketchRoot = buildPath.Join("sketch").Canonical() } else { return err } From 32fcf1762289d3bd045ee94c882dd83cb4302908 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 9 Feb 2021 00:19:27 +0100 Subject: [PATCH 2/2] Slightly verbose logging --- handler/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler/handler.go b/handler/handler.go index 74c0b10..fa38dca 100644 --- a/handler/handler.go +++ b/handler/handler.go @@ -977,7 +977,7 @@ func (handler *InoHandler) ino2cppDocumentURI(inoURI lsp.DocumentURI) (lsp.Docum return lsp.NilURI, unknownURI(inoURI) } if !inside { - log.Printf(" passing doc identifier to '%s' as-is", inoPath) + log.Printf(" '%s' not inside sketchroot '%s', passing doc identifier to as-is", handler.sketchRoot, inoPath) return inoURI, nil }