@frlan Christmas ;-)
This is a work-in-progress Nix lexer I plan to submit to Lexilla but I'd like some feedback from @frlan as he's the most proficient Nix user around. Things should mostly work, I'm just aware of a problem regarding folding when a block ends and is followed by a multiline string on the same line:
```Nix
{
key = value;
} ''
something
''
```
This is something I have to ask Neil how to handle the best way.
Otherwise I'm not aware of any other issues and I'm interested in any problems that appear. Especially if strings, escaping, and string interpolations work as expected and in general if the highlighting seems correct or something is missing.
Also, for now, the config file doesn't contain correct build commands - @frlan eventually this is something I'll need from you for Geany.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3954
-- Commit Summary --
* WIP: Nix lexer
-- File Changes --
M data/Makefile.am (1)
A data/filedefs/filetypes.nix (89)
M data/filetype_extensions.conf (1)
M meson.build (1)
M scintilla/Makefile.am (1)
M scintilla/lexilla/include/SciLexer.h (18)
A scintilla/lexilla/lexers/LexNix.cxx (527)
M scintilla/lexilla/src/Lexilla.cxx (3)
M scintilla/scintilla_changes.patch (1)
M src/editor.c (1)
M src/filetypes.c (1)
M src/filetypes.h (1)
M src/highlighting.c (10)
M src/highlightingmappings.h (31)
-- Patch Links --
https://github.com/geany/geany/pull/3954.patchhttps://github.com/geany/geany/pull/3954.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3954
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3954(a)github.com>
From having a look at where this function is used, by Geany it's used only to store configuration files in the .config directory and some auxiliary functions like writing the export file by the exporter plugin. In the geany-plugins project this function is used only for saving configuration files.
Before this patch, the fwrite() method was used by default for saving configuration files (because g_file_replace_contents() normally used by Geany wasn't used in this function) which wasn't very safe and could lead to configuration file loss under some extreme conditions.
The documentation of this function was changed to reflect the situation better than now - the previous comment made the impression that file permissions were always preserved with this method but it wasn't the case and depended on the exact configuration.
Replaces #3947.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3950
-- Commit Summary --
* Modify utils_write_file() to always use g_file_replace_contents()
-- File Changes --
M src/utils.c (69)
-- Patch Links --
https://github.com/geany/geany/pull/3950.patchhttps://github.com/geany/geany/pull/3950.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3950
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3950(a)github.com>
This patch unifies the behavior of utils_write_file() with write_data_to_disk() so all 3 methods of file saving are supported.
From having a look at where this function is used, by Geany it's used only to store configuration files in the .config directory and some auxiliary functions like writing the export file by the exporter plugin. In the geany-plugins project this function is used only for saving configuration files.
Before this patch, by ignoring the default GIO file operation settings, the fwrite() method was used by default for saving configuration files which wasn't very safe and could lead to configuration file loss under some extreme conditions.
The documentation of this function was changed to reflect the situation better than now - the previous comment made the impression that file permissions were always preserved with this method but it wasn't the case and depended on the exact configuration. Technically this is an API change but since this function is used for saving configuration files only in practice, it should not be a problem.
See https://github.com/geany/geany/issues/3946 for more context.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3947
-- Commit Summary --
* Also use GIO when using utils_write_file()
-- File Changes --
M src/utils.c (24)
-- Patch Links --
https://github.com/geany/geany/pull/3947.patchhttps://github.com/geany/geany/pull/3947.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3947
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3947(a)github.com>
To change the size of the scrollbar in the editor, one can add for example this code in the document geany.css that is located in .geany:
```
/* size of the scrollbar */
scrollbar slider {
min-width: 10px;
border-right: 10px solid transparent;
}
```
But the code has no influence on the scrollbar of the sidebar.
How can I change the size of the scrollbar in the sidebar?
Thank you in advance for an answer.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/discussions/3953
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/repo-discussions/3953(a)github.com>
Hello
Can command be passed to internal terminal from LUA plugin or C plugin ?
Something like geany.launch ("internal trminal","mc")
Thanks
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/1373
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany-plugins/issues/1373(a)github.com>
Hi.
I've been facing this issue for a couple of weeks now. My system is Manjaro Linux with Xfce 4.18 and I'm using Geany daily. (BTW I also have saved my Xfce user session to find back my windows where I want them to be).
I've noticed when I boot my system, sometimes, on random occasions, Geany's configuration has been overwritten with the defaults. It doesn't occur everytime I shut down my system, only randomly and _I haven't been able to find a pattern_. This is really annoying and the only way I've found so far is to restore my configuration from a backup.
I'm using a single F2FS filesystem on a NVMe drive, except for `/boot/efi`, which as required is located on a VFAT filesystem. I have no idea if this is important though. Geany is version 2.0, built 2023-10-23.
Cheers,
π
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3946
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/3946(a)github.com>
Hi, elextr
Yes, must look for debugger plugin, forgot about it, thanks, but it what concerns plugin, beside this, as you answered here [geany-plugins issue #1373](https://github.com/geany/geany-plugins/issues/1373), plugins don't have access to Geany's internal terminal, so something like geany.launch ("internal terminal","gdb","run") is not possible.
What I meant is to pass breakpoints without plugins only using build menu.
For example there is %e which is replaced by the same filename but without the last extension, so I thought maybe there is something like %marker (array of lines markers) to pass to GDB using only build menu.
For now as I see it is better to use simply ```gcc -g -o "%e" "%f" && gdb --quiet "./%e"```
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/discussions/3952#discussioncomment-10651301
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/repo-discussions/3952/comments/10651301(a)github.com>
Hello
GDB is very useful but rather difficult to use, so there are GUI and TUI interfaces for it to simplify using.
In Geany there are two GUI plugins: Debugger and Scope, as I understand Scope is more feature rich.
For Ncurses TUI we have [CGDB](https://github.com/cgdb/cgdb) and [GDB TUI](https://dev.to/irby/making-gdb-easier-the-tui-interface-15l2). As allways all have its pros and cons. But real revolution maybe :) happened with Python added to GDB version 7.
It allowed to make very useful and pretty TUIs.
I have wanted to share some info about such Python TUI called [GDB dashboard](https://github.com/cyrus-and/gdb-dashboard).
Similar project are [GEF](https://github.com/hugsy/gef) and [PWNBG](https://github.com/pwndbg/pwndbg) but more advanced - for reversed engineering etc. By the way all projects are in official repos of Arch Linux.
So this is the final result of simple integration of GDB dashboard in Geany:
![Geany_GDB-Dashboard](https://github.com/user-attachments/assets/3584c3ee-dde6-472e-a47b-8edf87031cbe)
So how it's done:
**1. GDB Dashboard installation**
**Method 1:**
install it through your package manager, ex. Arch Linux:
```sudo pacman -Sy gdb-dashboard```
and copy .gdbinit file to your home folder
```cp /usr/share/gdb-dashboard/.gdbinit ~/```
**Method 2:**
install it directly from github:
```wget -P ~ https://github.com/cyrus-and/gdb-dashboard/raw/master/.gdbinit```
**2. GDB Dashboard configuration (optional)**
if you want to configure layouts for example, you can do it so:
```mkdir ~/.gdbinit.d/```
```nano ~/.gdbinit.d/init```
and enter the following text for example (choose layouts you need):
```dashboard -layout assembly registers breakpoints stack threads```
**3. Geany build menu configuration (C example)**
create a new Build Debug option with the following string:
```gcc -g -o "%e" "%f" && gdb --quiet "./%e"```
in example on picture it is configured so (only for testing):
```gcc -g -o "%e" "%f" && gdb --quiet "./%e" -ex "break main" -ex "run"```
That's it. I really like GDB Dashboard, but there is a question to make better integration with Geany.
Is it possible to pass to GDB markers of lines (as parameters - array for example) to using those as breakpoints or maybe it is possible with LUA or C plugin ?
I have searched info in Geany API and so on but couldn't find it.
Thanks and thanks for such a great lightweight ide as Geany :)
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3951
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/issues/3951(a)github.com>