Skip to content

Commit

Permalink
Warn and skip invalid root module paths (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko authored Jul 28, 2020
1 parent 9e70a62 commit 3ce9c88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion langserver/handlers/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ func (lh *logHandler) Initialize(ctx context.Context, params lsp.InitializeParam
for _, rawPath := range cfgOpts.RootModulePaths {
rmPath, err := resolvePath(rootDir, rawPath)
if err != nil {
return serverCaps, err
jrpc2.ServerPush(ctx, "window/showMessage", &lsp.ShowMessageParams{
Type: lsp.MTWarning,
Message: fmt.Sprintf("Ignoring root module path %s: %s", rawPath, err),
})
continue
}
rm, err := addAndLoadRootModule(rmPath)
if err != nil {
Expand Down

0 comments on commit 3ce9c88

Please sign in to comment.