This patch adds a simple API allowing LSP plugins to take control of certain Geany built-in features and disabling their implementation in Geany. Currently, autocompletion, calltips, and going to definition/declaration is supported.
Plugins should define the Lsp struct, fill the pointers to the functions implementing the features they override, and register themselves using the lsp_register() call. Similarly, they should unregister themselves using lsp_unregister() when they don't want to provide the Lsp features any more, or, latest, when the plugin gets unloaded.
Each of the currently supported features is implemented using two functions - one checking whether Lsp plugin will override Geany's behavior of this feature, and the other function implementing the feature. For instance for autocompletion:
- autocomplete_available(doc) should return TRUE if the plugin performs autocompletion for the doc's filetype. This function is used to deactivate Geany's autocompletion when the Lsp plugin supports it.
- autocomplete_perform(doc) calls the corresponding interface of the LSP server (which responds asynchronously so when autocomplete_perform() is executed, the results won't be available yet)
The Lsp struct is padded with an array large enough to allow additions of many more functions to the struct and allowing binary compatibility with older LSP plugin versions not implementing all the functions. It's just mandatory that all plugins zero-initialize the allocated Lsp struct (either by creating it on the heap or by allocating it using g_new0() or similar function). NULL pointers in this struct are handled gracefully.
The current implementation supports only a single LSP plugin. However, if in the future arises the need for more LSP plugins running in parallel (e.g. a specialized LSP plugin for certain language together with the current "generic" LSP plugin), the implementation could be extended to support a list of Lsp structs and trying to call the functions defined by them one by one. The current interface should already be sufficient to support such an implementation.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3571
-- Commit Summary --
* Add API for LSP plugins
-- File Changes --
M meson.build (3)
M src/Makefile.am (2)
M src/editor.c (32)
M src/keybindings.c (11)
A src/lsp.c (107)
A src/lsp.h (59)
M src/symbols.c (9)
-- Patch Links --
https://github.com/geany/geany/pull/3571.patchhttps://github.com/geany/geany/pull/3571.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3571
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3571(a)github.com>
Why PHP files doesn't have code folding available only for curly braces ? If I inherit direct C style rendering into custom/user filetypes.php, it works, but than, I need to add all the keywords manually, which is not a problem. It works. But than, again, `^$` (variables) are not painted ... unless I put that as well into `primary` keywords line ... but, then - again - I cannot change the color of the `$variable`, the same as other words/keywords and language constructs. In C style, no other keywords than `primary` is taken into account. Is there any workaround for this instead of using/importing C style filedef ?
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3561
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/3561(a)github.com>
After using Geany for almost a day using the Solarized Dark theme, I felt that the text in Geany was slightly harder to read than in Notepad++, an editor I've been using for the past couple years. At first I thought I was imagining things, but after taking screenshots from each editor and comparing them side-by-side with a magnifying glass, I finally figured out why: the font rendering in Geany is ever so slightly darker (or thinner?) than the font rendering in other code editors like Notepad++. Here is the comparison:
![image](https://cloud.githubusercontent.com/assets/4110567/15953393/0537111c-2efd-11e6-93d5-92b7fdc33853.png)
Notepad++ is on top and Geany is on the bottom. It is barely noticeable in the image above, but if you zoom in and use the eyedropper tool you will find that the colors in Geany are darker than the ones in Notepad++:
![image](https://cloud.githubusercontent.com/assets/4110567/15953590/2826f2a8-2eff-11e6-9d51-5e6f1e852653.png)
Maybe I'm just more sensitive to this than others, but after spending a day editing code containing lots of strings using the Solarized Dark theme, I find that the code in Geany is slightly harder to read.
I'm not sure how to categorize this because I suspect it is related to the native font rendering engine that is used in Geany.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1066
With Geany 2.0 there is a new question for **Search and Replace** dialog:
**Are you sure to replace in the whole session?**
![image](https://github.com/geany/geany/assets/31816829/6121a941-0a21-4dd3-866b-7caa1861b71b)
I'm against, this is unacceptable for me.
Is there, or can you add an option to disable it?
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3702
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/3702(a)github.com>
Currently, if a link is clicked in the markdown preview, said link is opened in the preview tab itself, instead of calling my main browser.
This might be the desired outcome for relative links, but in my case opening youtube in the embedded browser led to audio glitches and then a nice crash.
Maybe a configurable option? Or absolute links in browser, relative in preview?
Thanks for your work, guys.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/544
I have been using geany with the vimode plugin. Just wanted to share a few places where I found bugs.
1. I am not able to enter normal mode whenever the number lock is on.
2. when I delete a line using the command `dd` the page shifts down till the point the cursor is at the top. Whereas it should have gone the line below and not shifted the page, And when I undo after deleting the line (I have seen this behavior in this particular case only) the cursor goes to the bottom of the document.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/1136
I turn on `vimode` in Geany, had it on before but have toggled it off/on, after upgrading to Ubuntu 22.04 and there is no Visual Mode anymore even though the cursor changes it still is in Insert Mode with no way to go to Visual Mode.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/1174
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany-plugins/issues/1174(a)github.com>
When session opening starts, this signal is emitted with parameter TRUE, when it stops, with FALSE.
This gives plugins information e.g. whether document opening happens as a result of user action or whether it's part of initial session opening.
For the LSP plugin this is used to detect the finally displayed document for which the server is started, otherwise if "document-open" is used, it would start servers for all open document filetypes immediately on Geany start which is unnecessary and could slow start time.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3707
-- Commit Summary --
* Add "session-opening" signal emitted when session opening starts/stops
-- File Changes --
M doc/pluginsignals.c (12)
M src/geanyobject.c (7)
M src/geanyobject.h (1)
M src/keyfile.c (4)
M src/libmain.c (16)
M src/main.h (2)
-- Patch Links --
https://github.com/geany/geany/pull/3707.patchhttps://github.com/geany/geany/pull/3707.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3707
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3707(a)github.com>
Anyone had a try to see how much work it would be to adjust geany to gtk4?
Or optionally have it?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2713