bugGNU Octave - Bugs: bug #57106, Implement Language Server Protocol

 
 

bug #57106: Implement Language Server Protocol

Submitted by:  Anton Kochkov <xvilka>
Submitted on:  Wed 23 Oct 2019 09:08:10 AM UTC  
 
Category:  None Severity:  1 - Wish
Priority:  1 - Later Item Group:  Feature Request
Status:  Need Info Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 24 Oct 2019 04:58:03 AM UTC, comment #5: 

I am a simple guy, and have already a lot of open source projects to care about. But I can donate 0.1 BTC (bitcoin) to anyone who will implement this feature. I know, it's not a lot, well, I am not rich either.

Anton Kochkov <xvilka>
Thu 24 Oct 2019 02:52:56 AM UTC, comment #4: 

I think we already get the idea, but like all feature requests, someone has to do the work.  You do understand that Octave development is mostly done by volunteers?  If this feature is important to you, can you help implement it?  Or contract with someone to implement it?

John W. Eaton <jwe>
Project Administrator
Thu 24 Oct 2019 01:54:42 AM UTC, comment #3: 

Sorry for the second post, but to give more mathematical related examples of Language Server Protocol implementations here are a few:

LaTeX LSP:

- https://texlab.netlify.com/

- https://github.com/latex-lsp/texlab

Coq proof system currently works on LSP support too:

- https://github.com/coq/coq/issues/9012

- https://github.com/coq/coq/projects/30

- https://github.com/ejgallego/coq-serapi/issues/26

Lean prover LSP:

- https://github.com/leanprover/lean-client-js/tree/master/lean-language-server

- https://observablehq.com/@bryangingechen/hello-lean-prover - an article describing how it works

Wolfram Mathematica LSP:

- https://github.com/kenkangxgwe/lsp-wl

I hope that will help you to get the idea.

Anton Kochkov <xvilka>
Wed 23 Oct 2019 04:45:21 PM UTC, comment #2: 

Yes, in fact, it is very popular lately. Developers that use Vim, Emacs, SublimeText, Visual Studio Code, Atom, QtCreator - all of them use LSP for many languages.

I am a Vim user, so to date the best available LSP integration is coc.nvim:

https://github.com/neoclide/coc.nvim

And it's very easy to make a custom extension of it https://medium.com/@chemzqm/create-coc-nvim-extension-to-improve-vim-experience-4461df269173

Note, that editors implement the "client" part of LSP, but for this you don't need anything normally, adding a new language for a client part usually is very simple. On the other hand, the more important part of the logic is the "server" itself, which I suggest Octave provides.

Regarding the integrating LSP client part with QScintilla, I know none. The most relevant part is the implementation of LSP client for Kate editor https://cullmann.io/posts/kate-language-server-protocol-client/

Anton Kochkov <xvilka>
Wed 23 Oct 2019 03:28:39 PM UTC, comment #1: 

Is that Language Server Protocol actually used by some editors or IDEs?  I guess the protocol might be used by VisualStudioCode, as it is defined by Microsoft.

My impression from the website is, that there are several private GitHub repositories providing those language definitions, and others providing 3rd party modules for several editors/IDEs.

You seem to have insight in LSP.  Can you provide an example implementation and point out, what is the real benefit for Octave and the internal Octave editor?

How to use this protocol with qscintilla, for example, with one of the existing language definitions?

Kai Torben Ohlhus <siko1056>
Project Member
Wed 23 Oct 2019 09:08:10 AM UTC, original submission:  

Language Server Protocol is the universal standard for better integration of the various IDEs and editors with the language parsing features. Basically, it outsources core "IDE logic" in the separate implementation, providing a way to get the same features in all supported IDEs and editors.

https://langserver.org/

There exist an LSP implementation for MATLAB https://github.com/tokoro10g/matlab-langserver

The biggest problem it's for well, MATLAB, moreover it's in Java. It is possible to make LSP server a part of Octave, and implement it in C++.

See these links for more information:
- https://microsoft.github.io/language-server-protocol/implementors/servers/

There are some examples on how to implement LSP servers with C++:
- https://github.com/MaskRay/ccls (more complete implementation)
- https://github.com/svenstaro/glsl-language-server (very basic implementation)

Anton Kochkov <xvilka>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by xvilka (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-23 siko1056 Severity3 - Normal => 1 - Wish
        Priority5 - Normal => 1 - Later
        Item GroupNone => Feature Request
        StatusNone => Need Info

    Back to the top


    Powered by Savane 3.5