Skip to content

Commit 164a797

Browse files
committed
Support LSP types in build-readme
1 parent 8652041 commit 164a797

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/build-readme.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ exports.buildReadme = function(pkg) {
1616
if (/\blezer\/lr\b/.test(type.typeSource)) return `https://lezer.codemirror.net/docs/ref/#lr.${type.type}`
1717
if (/\blezer\/markdown\b/.test(type.typeSource)) return `https://github.com/lezer-parser/markdown#user-content-${type.type.toLowerCase()}`
1818
if (/\bstyle-mod\b/.test(type.typeSource)) return "https://github.com/marijnh/style-mod#documentation"
19+
if (/\bvscode-languageserver-/.test(type.typeSource))
20+
return `https://microsoft.github.io/language-server-protocol/specifications/specification-current#` +
21+
type.type[0].toLowerCase() + type.type.slice(1)
22+
if (type.type == "TextEdit") console.log(type.typeSource, type.type)
1923
}, browserImports]
2024

2125
let template = fs.readFileSync(join(pkg.dir, pkg.name == "legacy-modes" ? "mode" : "src", "README.md"), "utf8")

0 commit comments

Comments
 (0)