Sublime Forum

How can I create a "linter binary" for a custom language for Sublime Linter 3?

#1

Hi. I just discovered Sublime Linter 3 and I’d like to build a linter for a custom language of my own. From the documentation I understand that I need to reference an external “binary” that would be executed alongside Sublime and handle all the language parsing logic. So my question is, what kind of “binary” is that? A native code app created with a compiled language such as c++? Or does it need to be a python program? Can it be an Jitted language like c#? And what is the API to make that “binary” interact with Sublime?

As you can see, I’m pretty mu h lost in this topic, so I apologise in advance for the basicness of the question.

0 Likes

Random posts showing up in my notifications
#2

A linter binary is a parser which analyses the code and return whether is it valid or not. For example, the Eclise IDE implemented for Java a linter which analyzes the input code and return whether it is valid or not.

Writhing linters for each language on several different editors is would not be nice, this is why to use an external linter which does all the parsing logic. There is the proposal called Language Server Protocol, perhaps you could look into it:

  1. https://www.youtube.com/watch?v=2GqpdfIAhz8
  2. https://github.com/Microsoft/language-server-protocol
  3. https://github.com/tomv564/LSP
0 Likes