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

 
 

bug #57106: Implement Language Server Protocol

Submitter:  Anton Kochkov <xvilka>
Submitted:  Wed 23 Oct 2019 09:08:10 AM UTC
   
 
Category:  Interpreter Severity:  1 - Wish
Priority:  1 - Later Item Group:  Feature Request
Status:  Postponed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

  Spam posted by anonymous
Thu 16 Nov 2023 12:38:03 PM UTC, comment #7: 

Octave LSP server sounds like a cool idea!

There is a Matlab LSP server in Github:
https://github.com/mathworks/MATLAB-language-server

Unfortunately, in order to work, it needs an existing Matlab installation to be running.

But maybe this could be used as a template project? (MIT license.)

Anonymous
Fri 07 Jan 2022 09:36:33 PM UTC, comment #6: 

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.


Is your BTC offer still valid?

Achmad Fathoni <achmadfathoni>
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>
Group 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>
Group 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 achmadfathoni (Posted a comment)
  • -email is unavailable- added by doronbehar
  • -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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-03-06 doronbehar Carbon-Copy- Added doronbehar
    2020-03-05 mtmiller StatusNeed Info Postponed
    2020-02-27 mtmiller CategoryNone Interpreter
    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.13-f8d8.
    Corresponding source code