[Github-comments] Re: [geany/geany] TypeScript Parser: Does Not Always Display Complete List of Methods (Issue #3416)

2023-02-26 Thread elextr via Github-comments
@techee (sorry to ping you again, but you are __the__ expert in tags and 
parsers and symbols etc) 

There is a ctags typescript parser being built into Geany.

But the Typescript filetype is a custom filetype that references a 
[typescript](https://github.com/geany/geany/blob/2509e21526d36034f5251381a76555e7300fbfc0/data/filedefs/filetypes.TypeScript.conf#L18)
 parser.

Typescript is not a [built-in 
filetypes](https://github.com/geany/geany/blob/2509e21526d36034f5251381a76555e7300fbfc0/src/filetypes.c#L127)
 so how does it get called, I thought the lexer and parser names in a custom 
filetype had to be existing built-in names?

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

Message ID: 

[Github-comments] [geany/geany] TypeScript Parser: Does Not Always Display Complete List of Methods (Issue #3416)

2023-02-26 Thread Jordan Irwin via Github-comments
I have built Geany from commit 4508f77a1150b37d5e16c3e7fc9c7223bc591e88. I am 
very happy to have a list of members & methods in the symbols pane. And I 
appreciate the work going into Geany.

I have come across a bug in my build's TypeScript parser (ctags?). The parsing 
sometimes is incomplete. The following screenshot is of a class with methods 
`onEnterZone`, `autoWalkEnabled`, & `canInviteToGroup` which do not show up in 
the symbols panel:

![image](https://user-images.githubusercontent.com/3631473/221473587-44b35ed5-fc0f-4388-b6a9-fe6eef12dc04.png)

In another class file there are methods `say` & `getCursor` which *do* show up 
in the symbols panel:

![image](https://user-images.githubusercontent.com/3631473/221474033-eb3fda05-663d-4595-ba5e-677a8b4c8961.png)

I am not sure what the difference is, but it appears there is something in the 
first file that is causing the parser to hiccup. I have not tried building from 
the latest commit to master branch, but browsing through the commits I don't 
see any changes referencing TypeScript.

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

Message ID: 

[Github-comments] Re: [geany/geany] Improve code commenting-out global config files (PR #3413)

2023-02-26 Thread Jiří Techet via Github-comments
I just had a look at a few filetype's configurations and it's really a mixed 
bag of styles. I think it would make most sense to document all the config 
options in `filetypes.common` _only_ and language-specific config files would 
contain only those values they override to some other value than 
`filetypes.common` without any extra comments - apart maybe some introductory
```ini
# For complete documentation of this file, please see Geany's main 
documentation and filetypes.common
```

What do you think?

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

Message ID: 

[Github-comments] Re: [geany/geany] Improve code commenting-out global config files (PR #3413)

2023-02-26 Thread Jiří Techet via Github-comments
> Looks good to me, and its simple, just add # to every line except headings.

And also except empty lines.

> I would not worry about the indented example, after adding a #, it is no 
> longer an accurate example whichever way its done.

I actually don't think this is even a valid conf file syntax - Scintilla at 
least doesn't syntax-highlight the indented line as a comment and I think it 
"works" simply because the parser just discards it as it is no key-value pair.

> [begin rant] In fact the example should not be there, its in the manual, the 
> filetype files should not be turned into documentation surrogates. If it 
> wasn't for the fact that its in every filetype file I would say remove the 
> example, its not like its some horrendously important setting that everyone 
> uses, why should it alone have a copy of the manual above it? It should just 
> say "# false to place comment at start of line, true to place after indent, 
> see manual". Just one line like most other settings!! [end rant] Anyhow its 
> not part of this PR whatever is done with it.

Agree, the conf files would deserve a huge cleanup.

There's another problem (and not talking about the horrible wording of the 
comment below). Some values are already commented-out in the conf files so they 
end up with the double `#` as well:
```ini
## the following characters are these which a "word" can contains, see 
documentation
##wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
```
We could try to do something smart and detect `=` in the line which would 
indicate it's a key-value pair and not to insert the extra `#` in this case, or 
just ignore this problem.

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

Message ID: 

[Github-comments] Re: [geany/geany] Improve code commenting-out global config files (PR #3413)

2023-02-26 Thread Jiří Techet via Github-comments
@techee pushed 1 commit.

94c3e110e1a9b5da60faaa81be42759d95365886  fixup! Improve code commenting-out 
global config files

-- 
View it on GitHub:
https://github.com/geany/geany/pull/3413/files/766f756495e0704e7656773bdbf29f096ef45d16..94c3e110e1a9b5da60faaa81be42759d95365886
You are receiving this because you are subscribed to this thread.

Message ID: 


[Github-comments] Re: [geany/geany] Fix Save As saves CLI opened file instead of new document (PR #3415)

2023-02-26 Thread Nick Treleaven via Github-comments
@ntrel commented on this pull request.



> @@ -628,7 +628,9 @@ static GeanyDocument *document_create(const gchar 
> *utf8_filename)
{
doc = document_get_current();
/* remove the empty document first */
-   if (doc != NULL && doc->file_name == NULL && ! doc->changed)
+   if (doc != NULL && doc->file_name == NULL && ! doc->changed &&
+   // check save as dialog isn't running
+   gtk_window_is_active(GTK_WINDOW(main_widgets.window)))

Unfortunately this is false when the window doesn't have focus, so it won't 
close the empty document any more when using a terminal window to open a file.

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

Message ID: 

[Github-comments] Re: [geany/geany] Open CLI docs only once main window is active again (PR #3395)

2023-02-26 Thread Nick Treleaven via Github-comments
> this affects virtually all CLI openings, as the main window is unlikely to be 
> focused when that happens.

Maybe that could be worked around by checking if the main window has focus, not 
sure.

> can't we "just" fix the offending case(s) not to be buggy in that regard? 
> (using the document ID or document pointer, etc.)

Well the problem is finding where the bugs are ;-)

This fixes the only one I'm aware of:
https://github.com/geany/geany/pull/3415

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

Message ID: 

[Github-comments] [geany/geany] Fix Save As saves CLI opened file instead of new document (PR #3415)

2023-02-26 Thread Nick Treleaven via Github-comments
Fixes #3414.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Fix Save As saves CLI opened file instead of new document

-- File Changes --

M src/document.c (4)

-- Patch Links --

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

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

Message ID: 


[Github-comments] [geany/geany] Save As saves CLI opened file instead of new document (Issue #3414)

2023-02-26 Thread Nick Treleaven via Github-comments
Happens when Save As is used on the only empty new document, and a command line 
file replaces that document while the dialog is still open.

_Originally posted by @ntrel in 
https://github.com/geany/geany/issues/3388#issuecomment-1420621069_


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

Message ID: 

[Github-comments] Re: [geany/geany] Improve code commenting-out global config files (PR #3413)

2023-02-26 Thread elextr via Github-comments
```
## set to false if a comment character/string should start at column 0 of a 
line, true uses any
## indentation of the line, e.g. setting to true causes the following on 
pressing CTRL+d
#   #command_example();
## setting to false would generate this
##  command_example();
## This setting works only for single line comments
#comment_use_indent=true
```

Looks good to me, and its simple, just add `#` to every line except headings.  

I would not worry about the indented example, after adding a `#`, it is no 
longer an accurate example whichever way its done.

[begin rant]  In fact the example should not be there, its in the manual, the 
filetype files should not be turned into documentation surrogates.  If it 
wasn't for the fact that its in every filetype file I would say remove the 
example, its not like its some horrendously important setting that everyone 
uses, why should it alone have a copy of the manual above it? It should just 
say "# false to place comment at start of line, true to place after indent, see 
manual". Just one line like most other settings!!  [end rant]  Anyhow its not 
part of this PR whatever is done with it.


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

Message ID: 

[Github-comments] Re: [geany/geany] Improve code commenting-out global config files (PR #3413)

2023-02-26 Thread Jiří Techet via Github-comments
I wouldn't make the setting variable comments too similar to the actual 
comments - they then become hard to distinguish, see:

```ini
# set to false if a comment character/string should start at column 0 of a 
line, true uses any
# indentation of the line, e.g. setting to true causes the following on 
pressing CTRL+d
#command_example();
# setting to false would generate this
#   command_example();
# This setting works only for single line comments
#comment_use_indent=true
```

where only the last line is the actual settings. Actually I think we should 
distinguish these more. What about adding an extra `#` to the existing 
comments? Things become more clear I think:

```ini
## set to false if a comment character/string should start at column 0 of a 
line, true uses any
## indentation of the line, e.g. setting to true causes the following on 
pressing CTRL+d
#   #command_example();
## setting to false would generate this
##  command_example();
## This setting works only for single line comments
#comment_use_indent=true
```
 Maybe I should put `#` in front of the existing `#` so the `command_example()` 
is consistent with the rest.

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

Message ID: