OK, so here's my take on #3542. I realized that I actually liked most of 
the stuff, it was just a matter of different presentation and some 
implementation details.

I think from the discussion in #3542 it was clear that most people wanted to 
see the path and line number and to to be able to distinguish it from the 
signature easily - the core thing was to use a different font for the file name 
(italics) and for the signature (small monospaced font). For the tooltip, I 
just separated these two by a newline.

In more details, this is what I did:

1. Show signature for all tag types using get_symbol_name() when 
get_symbol_tooltip() returns NULL. Modify get_symbol_name() to drop line number 
when needed. (More or less taken over the complete implementation from Colomban)

2. Add scope information to the signature both when using get_symbol_name() and 
get_symbol_tooltip(). (Based on Nick's idea)

3. Truncate the length of the popup to at most 80 characters (More or less 
taken over the complete implementation from Nick)

4. Improve formatting of entries in the popup so individual pieces of 
information are easier to distinguish:
- file name and line number are always in italics
- the following signature is in small monospaced font

5. Add tooltip to every entry (based on Nick's implementation).
- split the tooltip into two lines - the first line shows the file and the line 
number, the second line the signature
- both of the lines are formatted in the same way as described in (4)

(Thanks to Nick Treleaven and Colomban Wendling for the original 
implementation.)

@b4n @ntrel @elextr @kugel- What do you think? (Pinging about everyone, this 
will be one of those features where we'll all have a different opinion and 
hate each other with passion ;-)

The result looks something like this:

<img width="995" alt="Screenshot 2023-08-23 at 22 40 37" 
src="https://github.com/geany/geany/assets/713965/7ddc4946-06fa-4424-8969-e7ef8801c300">

You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/3547

-- Commit Summary --

  * Improve tag-goto popup

-- File Changes --

    M src/symbols.c (42)
    M src/tagmanager/tm_parser.c (20)
    M src/tagmanager/tm_parser.h (3)

-- Patch Links --

https://github.com/geany/geany/pull/3547.patch
https://github.com/geany/geany/pull/3547.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3547
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/[email protected]>

Reply via email to