On Fri, 30 Jun 2023 at 00:10, Andreas Schöller via Devel
<devel@lists.geany.org> wrote:
>
>
> Hello Lex,
>
> thx for your quick reply.
>
> Am 29.06.2023 um 02:02 schrieb Lex Trotman via Devel <devel@lists.geany.org>:
>
> On Thu, 29 Jun 2023 at 07:58, Andreas Schöller via Devel
> <devel@lists.geany.org> wrote:
>
> Perhaps you should have checked, Lexilla already has a Nim lexer.  It
> hasn't had a substantive change in 4 years, so either its really good,
> or nobody is maintaining it.  But you can add a language to Geany that
> only has a lexer, IIRC there are several.  Of course that doesn't
> solve symbols.
>
>
> I even found two Nim-parsers at the Lexilla-repo. I have added a issue-3520 
> to the Geany-repo and asked for inclusion of one or both of them.

I don't know how likely it is that anyone other than a Nim user will
contribute it. but it certainly doesn't hurt to ask.

>
>
> s possible to build Geany on Mac, see the geany/geany_OSX repo, but
>
> yeah the process is Linux centric, thats where the contributors are.
>
>
> If it is just for a Excumberant-Tag-Parser - that i would try on a Mac.

Its now uctags https://github.com/universal-ctags/ctags

>
> There has been discussion about adding the capability for Geany to
> talk to LSPs, and there was an initial attempt, but that showed the
> the size of the changes, so nobody has offered to do it.
>
> LSP-support could help for the symbol-outline, though 80-percent of what is 
> possible with LSP - i don’t want plus other consequences/risks see below.
>
> Writing a cmd-line tool that populates the symbol-view with struct-infos, 
> procedures and Enums to get a sorted overview would take me an afternoon 
> using the compiler-tools that are already part of my setup. I can also 
> provide CTag-compatible tags - but right now i need to smuggle them into a 
> geany-project and they only provide completion-support - they don’t show up 
> in the symbol-view.
>
>
> With the osx-geany comes a plugin, that allows to import tags. And that fails 
> cos' of the missing Nim-support. But i used a external tool to generate the 
> tags and then put them where the plug-in expected them to be. I think after i 
> converted via `geany -g ` from CTags to Geany-tags. Thats what 
> ‚smuggeling-in‘ means.

Sounds like a perfectly valid workaround, although if you were happy
having them loaded for every Nim file you could make them into global
tags files and they would be autoloaded.  The Git version of Geany
reads ctags files, so would reduce one step in the generation too.

>
> I am not sure what you mean by "smuggle", you can have tag files
> loaded automatically or Tools->Load Tags File if you don't want it
> automatic.
>
> This is the definition of an LSP, but "somebody" has to add the
> capability to Geany, as noted above.
>
> ah yes and no - LSP is much more than triggering a script/binary to deliver 
> some structured list-of-smth. The way i see it after reading your discussion 
> is that the „big"-solution (LSP and overhaul of the TagMgmt-system ) brings 
> considerable risks with it. Eg. the Nim-LSP-support for VS-Code spawns a 
> process for every document and doing so drives the resource-usage up - and in 
> Nims case might even overload the system. But i’m asking for a very limited 
> „small“-solution. A little defined path to update the symbol-outline - 
> without LSP - by using a tool of my choice. I mean C-Tag and Exuberant-Tags 
> were thought to be shell-system-tools - but geany comes with its own version 
> of it baked in ? and sadly offers no alternative to that. Or is it possible 
> to use the CTags-binary  from my system somehow ?

LSP is just another process, like your script, except IIUC the LSP
isn't restarted every time something changes.

I suspect most of the processes generated by Vscode are from electron,
which is effectively the chromium browser which creates lots of
processes.  At least for C++ it creates only one cpptools-srv per
concurrently visible file (number of screen splits).  Not sure why Nim
would be worse than C++, but then I don't know Nim.

The "small" solution likely has almost as much work for Geany as the
LSP, but would only benefit one self confessed "small" community, but
LSP support would benefit many languages.

Geany includes code from the uctags project, but AFAICT it does not
have a Nim parser, so "somebody" needs to contribute that first.

>
>  The LSP could of course be used
> with other editor/IDEs until its added to geany, and could use the
> actual Nim parser internals, a good Nim community project??
>
> well, nim-language-server and nim-suggest are part of the language.

Perhaps you could write a "tag parser" for Nim that uses those under the hood.

But the single biggest issue with that and LSP and your script
suggestion is how to handle the asynchronism in Geany which waits for
its symbols to be parsed then processes the results, so delays in
parsing would interrupt typing.

Cheers
Lex

>
> Anyhow, even without the tag-support Geany feels much more alike TextMate-1 
> and provides almost everything i expect from a decent editor.
>
> Greets Amdreas,
>
>
> _______________________________________________
> Devel mailing list -- devel@lists.geany.org
> To unsubscribe send an email to devel-le...@lists.geany.org
_______________________________________________
Devel mailing list -- devel@lists.geany.org
To unsubscribe send an email to devel-le...@lists.geany.org

Reply via email to