geany / geany-plugins

The combined Geany Plugins collection
http://plugins.geany.org/
594 stars 267 forks source link

Plugin Request: Language server protocol #1012

Open fightthepower opened 4 years ago

fightthepower commented 4 years ago

There is already a thread in main geany issues but I am starting a new thread here. LSP is a protocol used for providing programming language-specific features such as syntax highlighting, symbol's definition, code completion etc. For many popular IDE's LSP is already available or in development. A LSP plugin in geany will enhance its capability and productivity.

elextr commented 4 years ago

Indeed LSP should be a plugin, but Geany itself needs some modification to allow LSP data to be used instead of Scintilla lexers, ctags parsers and other places.

IIUC thats where the last attempt to make such a thing failed.

fightthepower commented 4 years ago

Is there any plan on implementing it? This could be one of the most important plugin for a code writer and 100s of languages already provides LSP support. Can I ask when the new version is going to release? current version is an year old.

elextr commented 4 years ago

Next release is likely 25th October 2020, if all goes well.

As to LSP or other external language mechanisms (eg libclang), well if somebody plans it it will be planned. Geany being a totally volunteer project it depends on people doing stuff, there are no paid or permanent workers or contributors.

elextr commented 4 years ago

And I should add, this being the plugins issues that plugins are individually contributed.

I would expect that first there needs to be some discussion about how Geany would get and use data from LSP/libclang type plugins in cooperation with the plugin development, and that would mostly happen on the Geany issues, not here. Then plugins can be developed.

sagarchalise commented 4 years ago

Well, I am giving this a try in current architecture of geany plugin along with what scintilla offers. I have some workflow in mind but it is currently quite buggy. Most of LSP interation is taken from gnome-builder https://github.com/sagarchalise/geany-lsp

KhazAkar commented 4 years ago

For LSP-related plugins for geany, there's some: https://github.com/notetau/geany-jedi-complete - for Python https://github.com/notetau/geany-clang-complete - for C/C++/ObjC using libclang https://github.com/notetau/geany-complete-core - core for above two https://github.com/jakeanq/gycm - YouCompleteMe plugin for Geany utilizing ycmd server. I hope that at least some of them will be in this repository :)

fightthepower commented 3 years ago

@KhazAkar Thank you for the links but all of those projects are not updated for the past 5 years. I am using the latest version of geany with gtk3 and I am not sure whether they will work well with the new version of geany. are you using these plugins, particularly, gycm with the latest version of geany?

KhazAkar commented 3 years ago

@fightthepower I'm using GYCM and works okay, but you need to do 2 fixes:

  1. Add missing #include
  2. do try (); catch () for every function body inside gycm, beacuse when opening big files C++ exception is leaking to geany-plugins core C code and it crashes geany. With those 2, GYCM is closest to have properly working LSP implementation for geany as I'm aware of. You can find me and others on IRC, I highly encourage to join us there :)
kenneth-Q commented 3 years ago

I think this project might help.

KhazAkar commented 3 years ago

@KhazAkar Thank you for the links but all of those projects are not updated for the past 5 years. I am using the latest version of geany with gtk3 and I am not sure whether they will work well with the new version of geany. are you using these plugins, particularly, gycm with the latest version of geany?

For gycm I've created a fork with those fixes I've mentioned in my comment :)

techee commented 3 months ago

If anyone is interested, I've created the LSP plugin here (eventually I'd like this plugin to become part of geany-plugins):

https://github.com/techee/geany-lsp

It requires the latest Geany from git master as some things had to be modified in Geany itself to support this kind of plugins. As far as I can tell, the plugin should be reasonably stable and bug-free (at least I'm not aware of any major issues).

I'm definitely interested in any feedback so if you run into some problems or have some suggestions, please let me know (by creating a new issue in the above repository).