Re: Adding new language support using LSP
Hi, If you want to create a new plugin/module that would add a new language support using LSP, these are the things to consider I believe: -create a new NB module -create a new "File Type" (i.e. something that will recognize extensions and provide icon and actions for files with the extension). This will also include a "DataObject". There is a wizard for it, and a tutorial: https://platform.netbeans.org/tutorials/nbm-filetype.html -if syntax highlighting should be done using a TextMate grammar, add a dependency on "TextMate Lexer" module, and inside your DataObject do GrammarRegistration, see e.g. here: https://github.com/apache/netbeans/blob/2b9979d61e58b57083994617eb19618f7e66f617/webcommon/typescript.editor/src/org/netbeans/modules/typescript/editor/TypeScriptDataObjectDataObject.java#L107 -to start a LSP Server, add a dependency on "LSP Client" module, and implement LanguageServerProvider, see e.g. here: https://github.com/apache/netbeans/blob/master/webcommon/typescript.editor/src/org/netbeans/modules/typescript/editor/TypeScriptLSP.java this may be very simple, like basically: Process p = ... //start your server here return LanguageServerDescription.create(p.getInputStream(), p. getOutputStream(), p); Or more complex, depending on how much set-up is needed for the server. -the real tricky part is if a new project type is needed. If the files written in the new language appear in some existing project (like TypeScript may appear in the "HTML5 Application" project), then things are simple. Note there is also Tools/Options/Editor/Language Servers, and it is possible to register a server there manually, for your current IDE. Jan On Thu, Dec 3, 2020 at 6:03 AM Rahul Khandelwal wrote: > Hi All, > > I am trying to add a new language support for netbeans using LSP. > Are there any resources for that? > > Regards, > Rahul Khandelwal >
Re: Adding new language support using LSP
"Question on LSP client" https://lists.apache.org/list.html?dev@netbeans.apache.org:lte=1M:Question%20on%20LSP %20client Pullrequest: https://github.com/apache/netbeans/pull/2564 This step seems not to be completed. I do not understand what the problem with the automated test is. Maybe somebody is familiar with this and can help? It will be great if a api api can be established to make it easiert to implement support of new languages. > I'm working on the same thing, I suggest you take a look at the recent > thread "Question on LSP client". > > I'm open to working together to improve the necessary bits in the core > modules to get this going. > > Cheers. > > On Thu, Dec 3, 2020 at 5:32 AM Christian Lenz > > wrote: > > Hey all, > > > > please have a look here: > > https://blogs.apache.org/netbeans/entry/lsp-client-demo-ba-sh hope it > > helps :) > > > > > > Cheers > > > > Chris > > > > > > > > Von: Mario Schroeder > > Gesendet: Donnerstag, 3. Dezember 2020 09:07 > > An: dev@netbeans.apache.org > > Betreff: Re: Adding new language support using LSP > > > > H
Re: Adding new language support using LSP
> @Oliver I had a glimpse at the students project. Then NetBeans Plugin seems > to use ANTLR. Just out of curiosity: Do you know from where the student got > the inspiration for the source code? Yes, it is antlr-based and has its origin in the first for the sequence of student projects: https://github.com/MobMonRob/DL4JDSLStudien maybe inspired by a course about Compiler, antlr ... and maybe some thread in the netbeans mailing list. > Kind regards, > Mario > > Am Do., 3. Dez. 2020 um 07:44 Uhr schrieb Oliver Rettig < > > oliver.ret...@orat.de>: > > Hi all, > > we are also very interested in implementing new language support for our > > GraalVM based > > DSL prepro https://github.com/MobMonRob/DL4JDSLStudien3. > > We have a group of students at the DHBW which just started working on > > this. Maybe we can > > learn together. > > > > best regards > > Oliver > > > > > Hi All, > > > > > > I am trying to add a new language support for netbeans using LSP. > > > Are there any resources for that? > > > > > > Regards, > > > Rahul Khandelwal
Re: Adding new language support using LSP
I'm working on the same thing, I suggest you take a look at the recent thread "Question on LSP client". I'm open to working together to improve the necessary bits in the core modules to get this going. Cheers. On Thu, Dec 3, 2020 at 5:32 AM Christian Lenz wrote: > Hey all, > > please have a look here: > https://blogs.apache.org/netbeans/entry/lsp-client-demo-ba-sh hope it > helps :) > > > Cheers > > Chris > > > > Von: Mario Schroeder > Gesendet: Donnerstag, 3. Dezember 2020 09:07 > An: dev@netbeans.apache.org > Betreff: Re: Adding new language support using LSP > > H > >
AW: Adding new language support using LSP
Hey all, please have a look here: https://blogs.apache.org/netbeans/entry/lsp-client-demo-ba-sh hope it helps :) Cheers Chris Von: Mario Schroeder Gesendet: Donnerstag, 3. Dezember 2020 09:07 An: dev@netbeans.apache.org Betreff: Re: Adding new language support using LSP H
Re: Adding new language support using LSP
Hi, I'm also very interested. If there is no tutorial yet, then this is the best time to create one. @Oliver I had a glimpse at the students project. Then NetBeans Plugin seems to use ANTLR. Just out of curiosity: Do you know from where the student got the inspiration for the source code? Kind regards, Mario Am Do., 3. Dez. 2020 um 07:44 Uhr schrieb Oliver Rettig < oliver.ret...@orat.de>: > Hi all, > we are also very interested in implementing new language support for our > GraalVM based > DSL prepro https://github.com/MobMonRob/DL4JDSLStudien3. > We have a group of students at the DHBW which just started working on > this. Maybe we can > learn together. > > best regards > Oliver > > > Hi All, > > > > I am trying to add a new language support for netbeans using LSP. > > Are there any resources for that? > > > > Regards, > > Rahul Khandelwal > > >
Re: Adding new language support using LSP
Hi all, we are also very interested in implementing new language support for our GraalVM based DSL prepro https://github.com/MobMonRob/DL4JDSLStudien3. We have a group of students at the DHBW which just started working on this. Maybe we can learn together. best regards Oliver > Hi All, > > I am trying to add a new language support for netbeans using LSP. > Are there any resources for that? > > Regards, > Rahul Khandelwal
Adding new language support using LSP
Hi All, I am trying to add a new language support for netbeans using LSP. Are there any resources for that? Regards, Rahul Khandelwal