Open
Description
I propose not to generate diagnostics for the newly created, empty file.
Assume this user workflow:
- mkdir hello; cd hello
- run
go mod init example.com/hello
- open the folder from an editor (e.g. vscode with gopls enabled by default)
- create a new file
hello.go
, using the editor's feature
The first thing the user will notice is a diagnostic error message.
[Trace - 17:35:12.131 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///Users/hakim/hello/hello.go","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"severity":1,"source":"syntax","message":"expected ';', found 'EOF'"}]}
It's not a critical, major issue, but it's not nice nor useful to present an error message before the user starts typing anything.