[Geany] How to add symbols to the Symbol tab - docbook & tagmanager

Lex Trotman elextr at xxxxx
Sat Apr 14 00:29:02 UTC 2012


Hi Nick,

On 14 April 2012 02:35, Nick Treleaven <nick.treleaven at btinternet.com> wrote:
> On 11/04/2012 01:50, Lex Trotman wrote:
>>
>> I notice that docbook isn't highlighted, should we make it use the
>> Scintilla XML lexer? (since all the docbook I have is machine
>> generated it has the extension xml any way so I had to set it to
>> docbook)
>
>
> It was highlighted before, looks like it got broken in the
> highlightingmappings.h change. One problem is the filetype file uses
> [styling=XML], which is recursive so should be =HTML. Another is that the
> style strings in the header don't match. I've fixed these locally but I'm
> not yet sure if docbook styling needs to be separate.

You lost me there, maybe Colomban would know better.

[...]
>
> Sounds like CTags/Tagmanager could just store a character number field
> rather than actually *replacing* tagmanager.

I think I answered your specific question, rather than the real one,
"why replace tagmanager" for which these things are only part of the
problem.

IIUC two main reasons:

1. its inefficient, it sorts the symbol list each time it adds one.
That was ok when tag lists were small and loaded once in a blue moon,
but now loading tags for some of the big libraries around today is
causing startup delays (see various ML/IRC complaints) and with
real-time(ish) parsing it causes interrupts to the UI for big files,
and if we were to fix it to parse the insides of functions (which we
really need to do to take proper advantage of your scope
autocompletion) then it will be worse.

2. it is difficult to maintain and to fix the above and the other
little problems.  Nobody with the project properly understands
tagmanager and is willing/has time to make the changes.  So (putting
words in his mouth which he might spit out :) I guess Colomban chose
to spend his time re-implementing it so he knows he can make the
changes needed (or make them during design rather than retrofitting
them) rather than spend his time hacking on code he really didn't
understand and might not be able to fix.


>
> But I'm not sure it's really worth it - can you show a usual code sample
> where we actually want to show things in the symbol list that are on the
> same line number which have the same name?

Humans probably don't, but I was talking about XML and machine
generated XML often puts multiple tags on the same line (if not the
whole file :)  and thats just when you *need* assistance from the
symbols for structure identification.  This is not to be taken as
saying it is worth the effort though, as I believe that humans should
neither read nor write XML as it is a tool of the devil, but
occasionally it is required.

Cheers
Lex

>
> Nick
> _______________________________________________
> Geany mailing list
> Geany at uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany



More information about the Users mailing list