Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin extensions (aka LSP API) #3849

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Plugin extensions (aka LSP API) #3849

wants to merge 6 commits into from

Conversation

techee
Copy link
Member

@techee techee commented Apr 21, 2024

This is my second attempt on the LSP API as originally proposed by #3571.

I changed several things:

  1. I renamed the struct Lsp to PluginExtension - there's nothing LSP-specific in this interface and it could be used by other plugins too (or possibly extended in the future if some plugins wanted to provide another functionality, we could extend this API).
  2. I reduced the number of functions in the API to the absolute minimum and tried to do as much as possible in the plugin itself.
  3. For this PR I removed the API related to the sidebar symbol tree - this one requires most changes on the Geany side and possibly more discussion and I don't want to block this PR by it. One possible alternative is also just keep using TM for the symbol tree, ignoring the symbols provided by LSP (the symbol tree is the least problematic part of TM IMO and could stay the way it is). I'll post the extra patches to allow sidebar symbols in a separate PR.

I also updated the combined Geany+LSP plugin at https://github.com/techee/geany-lsp to use the new API and also to work even when compiled against unmodified Geany. This is quite clumsy, however - to avoid conflicts between Geany's TM implementation and the plugin, it requires disabling TM by adding

[settings]
tag_parser=

to the filetype config file of the affected filetypes, basically disabling all TM features. It also requires separate keybindings for e.g. tag goto or autocompletion instead of re-using the Geany ones.

@techee techee added the lsp Related to LSP API and plugins label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lsp Related to LSP API and plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant