Sublime Forum

Making LSP-md


I’m thinking of developing a mardown plugin. The idea is to add markdown support for the LSP plugin. I already found zeta-note. Looks like a good language server for the plugin. I’m still in the idea phase. I haven’t done a LSP plugin, much less a Sublime Text plugin before. I can use another existing plugin as reference, but I’m still lost and confused. Any tips to clear some doubts would be helpful.



Well, what exact doubts do you have ? Take a look at something like LSP-css which should be a very simple starting point.



Thanks I used LSP-html as a starting point.


I edited some files. I’m still lost on what to with the sublime-package.json and the LSP.sublime-settings.

so far the only thing I did was replace the LSP-html with LSP-md.

Another part that has me confused is the language server itself. How do I make it work?

Language Server

The ones in LSP-html and LSP-css are in javascript. Meanwhile, zeta-note, which is the one I intend to use for markdown is in Rust. Does this mean I have to convert it? I saw that language servers used in Sublime Text were taken from Vs Code.


#4 is a better starting point as your server is not nodejs-based.



sublime-package.json file is used by LSP-json to provide completions for settings defined by your package. So you can tell describe your settings information and LSP-json takes care of presenting those settings completions to the user (Provided they have LSP-json installed, otherwise it’s meaningless to have this file.

I don’t think you have to worry about LSP.sublime-settings.

so far the only thing I did was replace the LSP-html with LSP-md.

LSP-html settings obviously only apply to LSP-html so there is not point in bringing those over to LSP-md.sublime-settings. You’ll need to find out what settings the MD server can take.

Maybe they publish a binary/executable that can be just invoked from the command line ? You’ll have to check that out. Hopefully, it’s not something like the end users would have to install an entire Rust toolchain to use a markdown LS.



Thanks guys. I switched to using LSP-Textlab for plugin template. Also contacted the dev of the language server so I can get clearer undestanding of the features available. On the Sublime Text side, I’m trying to figure out how to download the binaries. On the LSP-Textlab, the plugin downloads and decompresses the tarballs available in the TextLab github repo release page. Zeta-Notes has binaries, not tarballs in the github release page, so I will use that.