Coder Social home page Coder Social logo

VSCode Integration about oberon HOT 4 CLOSED

rochus-keller avatar rochus-keller commented on July 29, 2024
VSCode Integration

from oberon.

Comments (4)

rochus-keller avatar rochus-keller commented on July 29, 2024

I'm not using VSCode; just had a look at how they do syntax highlighting; apparently they expect a description in JSON format, see https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide and https://macromates.com/manual/en/language_grammars. There seem to be different ways how to implement language support though; another way seem to be to implement a language server using a JSON based protocol (https://code.visualstudio.com/api/language-extensions/language-server-extension-guide); both ways will cause additional work. My parser produces an AST which is suited for use in an IDE, but it's C++ using Qt; when I'm ready with the QtNetwork stuff in LeanQt it should be possible to implement such a server; but it's currently not on my agenda; syntax highlighting, code completion etc. is not the whole story; eventually you certainly also need to run the debugger, so yet another protocol which has to be implemented.

from oberon.

tenko avatar tenko commented on July 29, 2024

The language server does not need to be implemented as this is done in JavaScript by
utilizing the API for this part in VSCode. The JavaScript code simply calls the ObxMC binary
with parser a temporary .obx code file and the compiler then spews out some JSON data which can be
read in to the JavaScript side and further processed to create the language server reply.

An example of this can be found:
vscode
cli compiler

I was thinking this should be fairly low impact to support in the ObxMC compiler.
The above example language server seems easy enough to simply reuse most of.

from oberon.

rochus-keller avatar rochus-keller commented on July 29, 2024

Ok, I see; but the OBXMC is not suited to do this; it would need another generator which would create a JSON file compatible with the format required by VSCode; seems like quite some work given that it is also supposed to work with wrong code, and the implementor needs pretty good knowledge of VSCode, the highlighting protocol and the implicit and explicit expectations to the AST and error reporting; and if I understand it right OBXMC would then essentially be called potentially for every edit done in VSCode, which looks quite expensive.

Can you make a list what the most important features are, which VSCode has and the Oberon IDE is missing?

from oberon.

tenko avatar tenko commented on July 29, 2024

Fair enough. I was hoping this was possible to hack together easily, as I already have started using VSCode due to the plugins for PostgreSQL, FreePascal etc. Great solutions, even if the whole system is huge bloat with Electron in the background.
Not any particular things missing from the IDE. We can close this.

from oberon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.