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

elextr notifications at xxxxx
Wed Dec 15 11:40:51 UTC 2021


> Depends what we use the language server for.

Well, apart from the autocomplete which I agree is just so wrong (for C++) that I turn it off in Geany, the other big reason I moved away (for C++) is the styling of a name the same wherever it appears, so if something ever appears as a type its gonna be coloured a type even when used for a function, or a variable no matter if its in a totally different scope.  So I would say that replacing the Scintilla lexer would be a good thing to aspire to ... longer term maybe.

> It took just about 15 years to recover from tag manager integration and we are almost there. We should start thinking about what to do in another 15 years :-)

Good idea!!!!! [runs screaming]

But synchronous operation is going to be slow, even for autocomplete.  Think of how long it takes to compile one of the big Scintilla C++ files, especially on a RPi, would you wait that long to get the autocomplete list?

Why does autocomplete need a full compile? Doesn't need code generation, but needs everything before it and type inference is why, rust and go and others already do static inference, and C++ is starting to (which is why I keep using C++ as an example, it manages to incorporate every problem other static languages could give us, plus some of its own, ahh bless :-) and in theory an LSP server could do dynamic typing of Julia and maybe even Python and similar.  To autocomplete a name with inferred type the "compile" has to happen to find its type, then the member list can be offered.  

So we want the "compile" to happen while the user is typing so the lookup is fast when they type the `->`.

>  there will have to be some JSON parser/serializer (json-glib seems to be a natural choice) in its core that will have to be either bundled or an external dependency - not sure if it's fine or not for Geany, for plugin it would be a easier decision.

JSON is one thing where there are a plethora of libraries, and JSON RPC libraries even.  But yes putting such in a plugin would be "easier" if only Geany would let a plugin replace parts of its functionality.  Maybe a core plugin could keep in sync with Geany during a progressive development, maybe.

> The rosy world of LSP autocompletion for me is just an excuse why not improve the scary tag-manager-based scope completion much :-).

Good, keeps the number of PRs labelled `tag-manager` down. ;-P

I havn't tried this PR because I'm not sure how to test it, do you have any solid examples of ctags files, especially one that the existing parser fails on?

-- 
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-994709343
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211215/c929abfb/attachment.htm>


More information about the Github-comments mailing list