fix: 实时诊断波浪线不显示——零长 range 扩展 1 字节后画线
根因:gopls 对语法错误常推零长 range(start==end,插入点), 且常落在行尾,编辑器按零长画线=画不出,用户看不到任何提示。 修复:诊断入编辑器前把零长 range 扩展为 1 字节(行首且列>0 向左扩,否则向右扩), 与 VS Code 显示行为一致。e2e 截图验证波浪线+悬浮提示正常。 附带: - internal/lsp/syntax_diag_probe_test.go 真 gopls 语法错误诊断推送探针 - internal/godoc CommonPkgs 清单修正(hash/md5 -> crypto/md5 等不存在的包路径) - .gitignore 增加 *.sock / e2e_shot*.png(Windows 上 socket 文件删不掉导致 add 失败)
This commit is contained in:
1 parent
e7de0bd93a
commit
5a87a61e29
5 files changed
+159
-1
No files matched your search
@@ -24,7 +24,7 @@ var CommonPkgs = []string{
|
||||
"path/filepath", "unicode", "unicode/utf8", "sync", "context",
|
||||
"log", "regexp", "encoding/json", "encoding/base64", "encoding/hex",
|
||||
"net/url", "net/http", "flag", "os/exec", "reflect", "hash/crc32",
|
||||
"hash/md5", "hash/sha1", "hash/sha256", "compress/gzip", "archive/zip",
|
||||
"crypto/md5", "crypto/sha1", "crypto/sha256", "compress/gzip", "archive/zip",
|
||||
}
|
||||
|
||||
// Docs 提取一个标准库包所有导出符号的文档正文,返回去重后的清单。
|
||||
|
||||
Reference in new issue
Block a user