IHaveThatPower created an issue (geany/geany#4419)

### Summary:
When working in a JavaScript file that defines a class, and that class uses 
getters, one would expect to see those getters appear somewhere in the Symbols 
list. They do not appear to do so.

<img width="368" height="122" alt="Image" 
src="https://github.com/user-attachments/assets/55d4a6be-b91e-4c9e-97e1-54fe22bf9cf6";
 />

### Investigation
#### Upgrade from Geany 2.0 to Geany 2.1
I had been using my distribution-supplied version of Geany, 2.0. Thinking 
perhaps it might fixed by CTags updates incorporated as part of the 2.1 
release, I updated Geany to 2.1 via the `ubuntuhandbook1` PPA.

```
$ geany --version
geany 2.1 (built on 2025-07-07 with GTK 3.24.41, GLib 2.80.0)
```

Unfortunately, the screenshot above is from that version.

#### Checking Direct CTags Output
##### Updating CTags from Exhuberant 5.9 to Universal 6.2.0
Wondering if it was simply a limitation of CTags, I decided to try checking 
what CTags provided directly. However, my distribution-supplied version of 
CTags was a) exhuberant-ctags and b) a few versions behind, so I installed the 
latest-supplied binary of universal-ctags:

```
$ ctags --version
Universal Ctags 6.2.0(475a7bc), Copyright (C) 2015-2025 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Aug  4 2025, 05:07:21
  URL: https://ctags.io/
  Output version: 1.1
  Optional compiled features: +wildcards, +regex, +gnulib_regex, +iconv, 
+option-directory, +xpath, +json, +interactive, +yaml, +packcc, +optscript
```

If I run ctags directly on the example file above, I see the getter clearly 
listed in the output:
```
$ ctags -x test.js
Foo              class         1 test.js          class Foo {
bar              getter        2 test.js          get bar() {
```

So, CTags _does_ detect the getter.

#### Filedefs Options
Next, I tried trawling through the existing filedefs to see if there were any 
obvious lexer arguments that might need to be supplied to somehow "group" the 
getters in with other class methods. That search didn't turn up anything.

#### Inspecting the Geany Code
Wondering if I might turn up any unused lexer arguments that were nevertheless 
supported, I looked through the code here on GitHub. Files that caught my eye 
included:
* `ctags/parsers/jscript.c`: This seemed like the "main" parser for JavaScript, 
and it does very clearly include `KEYWORD_get` in the list of keywords to 
operate on.
* `scintilla/lexilla/lexers/LexCPP.cxx`: This seemed like the actual lexer in 
use (though I'm not actually sure about), and I didn't see anything in there 
that explicitly mentioned getters

### Expected Behavior (/Feature Request?)

Getters (and Setters) should appear in the Symbols list for JavaScript files.

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

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

Reply via email to