[Github-comments] [geany/geany] Use the official 'libreadtags' library from ctags for parsing ctags files (PR #3049)

Jiří Techet notifications at xxxxx
Tue Dec 14 08:45:55 UTC 2021


> Well, a struct called TMTag, but what it contains might be different :-)

Well, even with LSP the stuff we store there now could be similar (and should be similar to make it compatible with existing code in Geany). But there might (and should) be some extra information stored there for sure.

> Well, the decision to use ctags/tm or LSP should be per document, IIUC not all languages have LSP available. What did you think would be the gain in still ctags parsing documents that are using LSP?

For instance tag manager is exposed to plugins right now and plugins expect tag manager to work. Or there may be some minor features like the scope information in the status bar for which I think there is no counterpart in LSP (but the API is big and I might have missed it).

But most importantly, I think this feature has no chance to be merged if it's introduced as one giant pull request changing thousands of lines across Geany. It has to happen piece by piece. So for instance it could start by changing `tag_manager->get_symbols_for_symbol_tree()` to `LSP->get_symbols_for_symbol_tree()` and making sure this particular feature works and then moving to the next. Basically the API in LSP we are interested in most is
- [completion](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_completion) - getting symbols for autocompletion popup
- [signatureHelp](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_signatureHelp) - calltips
- [declaration](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_declaration) - go to declaration
- [definition](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition) - go to definition
- [documentSymbol](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol) - symbols for symbol tree

If we have similar API in tag manager (and this is really just a matter of moving some code from Geany to tag manager), changes to Geany code would be minimal to start playing with the corresponding LSP counterpart while keeping the rest of Geany unchanged and stable. If in the future we determine we can disable tag manager for files managed by LSP, we can of course do that (but before that we have to introduce corresponding API for plugins and make sure that there really isn't anything we depend on in tag manager).

-- 
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/pull/3049#issuecomment-993308764
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211214/8df859b7/attachment-0001.htm>


More information about the Github-comments mailing list