Any C#/Typescript frameworks for language editors

Howdy!

Does someone know a framework for creating language editors in C#/Typescript? I need to create one at work.
I could also create an editor based on ANTLR but I am surely not the first guy with this problem.
“Intellisense”, Codecompletion, typechecks…

Are there any?

Greetings!

1 Like

use microsoft vs code https://code.visualstudio.com and tabnine https://www.tabnine.com/ for autocomplete and that is all.

1 Like

I created ts-pegjs as a plugin on top of PEG.js. This gives you a PEG composable parser for your grammar in TypeScript.

Regards,
Pedro J.

2 Likes

We’ve used Microsoft Visual Studio Code with success. Extensions are written in TypeScript. A language server based on an ANTLR grammar can provide semantic checks, code completion, etc.
We may write an article about it in the future, actually.

1 Like

Thanks. I do not know exactly about the complexity of VSCode. It sounds a bit overkill, but I also think it is a good direction.
My company uses a language to bind values from different data sources into template document. Think of “Dear {{UserProfile.DisplayName}}, …” at the beginning of a letter. The language is small. But if it develops good for the customer it becomes bigger.
I will search for VSCode examples. Any links for that are welcome.

This sounds a lot like a problem you could solve with Language Server Protocol - i know Microsoft is pretty big in supporting it in the past few years, so you might have success to look into specific example implementations from MS themselves.

1 Like

seems that on the shelf solution is one path to explore
https://www.windwardstudios.com

1 Like

I had a little chat with my product owner. It should not appear like coding, it should be a point and click toolbox. Blockly or projectional editing in general comes into my mind.

If you are looking for a projectional editor, you can take a look at ProjectIt (www.projectit.org). I give a demo next Thursday.

2 Likes

I hope I can find time for that meeting…

I suspect this answer may not be useful to you at this point, but I would recommend the FastColoredTextBox component in combination with an ANTLR parser if you want something free. If you want a paid component, AlterNET makes an editor component that supports C# out of the box and perhaps Typescript (I’m not sure). There is a licensing option for the source as well. I use The FastColoredTextBox control in my Grun.Net application for debugging C# ANTLR parser projects. It is a very solid free editor choice for embedding in projects.

Meanwhile I changed my job, they decided to use a point and click experience for the user.

But Langium is a good Typescript tool for creating languages with all the nice LSP features it helps to implement.