latex-lsp / texlab

An implementation of the Language Server Protocol for LaTeX
GNU General Public License v3.0
1.54k stars 52 forks source link

ConTeXt support #166

Open flying-sheep opened 4 years ago

flying-sheep commented 4 years ago

ConTeXt is a macro package on top of TeX like LaTeX. It depends on LuaTeX and uses a different macro set than LaTeX (e.g. \start<thing> instead of \begin{<thing>} and most commands use [] instead of {}, e.g. \cite[Foo19]).

Would it be in scope to possibly support it? How much LaTeX-specifics are currently hardcoded?

I feel like there wouldn’t be too much missing

pfoerster commented 4 years ago

ConTeXt support is definitely in scope of this project. Our LaTeX parser does not rely on LaTeX specifics but a lot of the features like code completion rely on LaTeX specifics. Nevertheless, supporting ConTeXt is a lot of effort at the moment as I have never used ConTeXt before. Supporting the project structure of ConTeXt would probably be the first step.

timjs commented 4 years ago

Would be awesome to have this!

gour commented 4 years ago

Hello,

I'm also interested to see ConTeXt supported by LSP...

ConTeXt support is definitely in scope of this project. Our LaTeX parser does not rely on LaTeX specifics but a lot of the features like code completion rely on LaTeX specifics.

I did mention TeXLab on the ConTeXt mailing list and I was told to take a look at lua-lsp as possible start, but wonder if that would make it easier to bring ConTeXt into the game considering that you probably already have to take care about LuaTeX, right?

Nevertheless, supporting ConTeXt is a lot of effort at the moment as I have never used ConTeXt before.

Please, try it! It is actively developed by the same people working on LuaTex implementation and, imho, ConTeXt's mkiv provides what is supposed to become LaTeX3 one day...

flying-sheep commented 4 years ago

check out astoff/digestif#12 for another LSP that supports ConTeXt already to a degree.