mastodon.gamedev.place is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server focused on game development and related topics.

Server stats:

5.5K
active users

I implemented a language server extension for my programming language. It was quite simple. 🧵

Antonio Caggiano

1. Implement a function 𝚌𝚑𝚎𝚌𝚔(𝚌𝚘𝚍𝚎: &𝚜𝚝𝚛) returning 𝚁𝚎𝚜𝚞𝚕𝚝<(), 𝙹𝚜𝙲𝚊𝚕𝙴𝚛𝚛𝚘𝚛>, where the error contains both a message and a range.
2. Use 𝚠𝚊𝚜𝚖-𝚙𝚊𝚌𝚔 𝚋𝚞𝚒𝚕𝚍 --𝚗𝚘𝚍𝚎𝚓𝚜 and publish to GitHub npm registry.

3. Clone lsp-sample and add the npm package as a dependency. github.com/Microsoft/vscode-ex
4. Improve server.ts 𝚟𝚊𝚕𝚒𝚍𝚊𝚝𝚎𝚃𝚎𝚡𝚝𝙳𝚘𝚌𝚞𝚖𝚎𝚗𝚝() by calling 𝚌𝚑𝚎𝚌𝚔(𝚝𝚎𝚡𝚝) and catch any 𝙹𝚜𝙲𝚊𝚕𝙴𝚛𝚛𝚘𝚛 to generate diagnostics.
5. Enjoy your productivity tool. 🧑‍💻

GitHubvscode-extension-samples/lsp-sample at main · microsoft/vscode-extension-samplesSample code illustrating the VS Code extension API. - vscode-extension-samples/lsp-sample at main · microsoft/vscode-extension-samples