The Gram Code Editor - 2026-10-26


  1. Savoita

    > mort: > When I quote like that, does XMPP send info about who was quoted? Does the quote… It shows it quoted in Conversejs, which is what I'm using. And you're correctly about Rust compilation, I just hate how the project is organized into so many different crates. It's very annoying to navigate. I understand it's a limitation of the language, however. ↺

  2. Savoita

    > krig: > @Savoita no, that’s not normal. Could be a memory issue perhaps? I have plenty of free RAM (32GB machine), but r-a seems to be crashing when it hits 4GiB of usage (around when it's indexing lsp_types, just about every single time). That makes me think of 32-bit memory limits, but that wouldn't make much sense... ↺

  3. Savoita

    Oh, right, I forgot to mention that *is* to do with memory, in that an allocation is failing. It's just that the allocations fail at 4GiB every time. Here's a little excerpt from r-a's server log inside Gram: ``` memory allocation of 160 bytes failed stack backtrace: memory allocation of 262144 bytes failed skipping backtrace printing to avoid potential recursion ```

  4. Savoita

    pretty annoying that the backtrace is omitted.

  5. Savoita

    I've also tried it with the nightly version of r-a (1.101, I think?), and it has the same issue.

  6. Savoita

    Interesting. It seems to be an issue with the hardened malloc that secureblue uses. Not a Gram issue, then. ✎

  7. Savoita

    Interesting. It seems to be an issue with the hardened malloc that secureblue uses. Not a Gram issue, then. Sorry for spamming here. ✏

  8. Savoita

    Interesting. It seems to be an issue with the hardened malloc that secureblue uses, as the problem goes away when running Gram with the standard malloc. Not a Gram issue, then. Sorry for spamming here. ✏

  9. Savoita

    Currently, Gram uses the custom data dir provided by the user (via the cli option `--user-data-dir`) to also set the config directory path, as an antecedent of the user-provided data path. Is that behaviour something we want to keep? It would make more sense to me for there to be separate options for setting each of the requisite kinds of paths, e.g. `--user-data-dir`, `--user-config-dir`, `--user-cache-dir`, etc. ✎

  10. Savoita

    Currently, Gram uses the custom data dir provided by the user (via the cli option `--user-data-dir`) to also set the config directory path, as an antecedent of the user-provided data path. Is that behaviour something we want to keep? It would make more sense to me for there to be separate options for setting each of the requisite kinds of paths, e.g. `--user-data-dir`, `--user-config-dir`, `--user-cache-dir`, etc. ✏

  11. Savoita

    Is `FLATPAK_XDG_HOME/CONFIG/CACHE_HOME` supposed to be a special set of env vars for Zed when it runs in a Flatpak? Because I literally cannot find mention of them anywhere *except* Zed source code, but the data, config, and cache paths check those env vars first. If they don't exist and aren' ✎

  12. Savoita

    Is `FLATPAK_XDG_HOME/CONFIG/CACHE_HOME` supposed to be a special set of env vars for Zed when it runs in a Flatpak? Because I literally cannot find mention of them anywhere *except* Zed source code, but the data, config, and cache paths check those env vars first. If they don't exist outside of Zed and aren't standard, I think they should be removed in favor of simply deferring to the FreeDesktop `XDG_XXXXX_HOME` env vars (which is already handled by the `dirs` crate). ✏

  13. Savoita

    Is `FLATPAK_XDG_HOME/CONFIG/CACHE_HOME` supposed to be a special set of env vars for Zed when it runs in a Flatpak? Because I literally cannot find mention of them anywhere *except* Zed source code, but the data, config, and cache paths check those env vars first. If they don't exist outside of Zed and aren't standard, I think they should be removed/ignored in favor of simply deferring to the FreeDesktop `XDG_XXXXX_HOME` env vars (which is already handled by the `dirs` crate). ✏

  14. nicoco

    mort: > When I quote like that, does XMPP send info about who was quoted? Depends on which client you use. Conversations and Monal just do plain-text-quote (support for XEP-0461, aka "rich quotes", is planned but development is slow), while Gajim, Dino or Cheogram support it already. They send plain-text-quotes as a fallback too, if you're curious this is the relevant part of the spec <https://xmpp.org/extensions/xep-0461.html#compat> > Does the quoted person get a ping? This is very client specific, but as general rule, IRC-style pings by just mentioning the nick of the person you want to ping is the de facto norm and is supported by most (all?) clients. > On my client it looks a lot like I just sent a message with literally a message copy/pasted in but that would be weird wouldn't it? I wouldn't say weird, but basic indeed.

  15. Savoita

    This code is insane.

  16. Savoita

    > Savoita: > Currently, Gram uses the custom data dir provided by the user (via the cli optio… Would it be better to raise an issue in the repository itself, rather than trying to discuss how to handle this kind of stuff in the chat? ↺

  17. Savoita

    They have, confusingly, set it up so that the data directory is stored in `dirs::data_local_dir`, but the config is stored in `dirs::config_dir` (and not `dirs::config_local_dir`). This doesn't matter for any platform except Windows, where the data will be in `AppData/Local`, but the config will be in `AppData/Roaming`. Very odd.

  18. Hannah

    Hiya

  19. Hannah

    I'm having a problem where an extension and lsp (wakatime/hackatime (not intended for AI use)) doesn't show up in the LSP menu.

  20. Hannah

    It worked for a long time but it stopped working yesterday. Also, I deleted the .local/share/gram and .config/gram folder and reinstalled the extension(s), but it still didn't show up

  21. Hannah

    (it is a zed extension)

  22. yilmazer

    Does it work on Zed? I installed the extension but it didn't download the binary. Nothing happens.

  23. krig

    > It worked for a long time but it stopped working yesterday

  24. Hannah

    yeahh

  25. krig

    did you upgrade yesterday perhaps? I wonder what may have broken it

  26. Hannah

    no, I checked if there was an update, but it didn't find any

  27. Hannah

    It works in zed, which is weird

  28. krig

    don't see any obvious reason why it shouldn't work.. any hints in the gram logs?

  29. Hannah

    no, it doesn't even show up as an LSP

  30. krig

    I tried installing it myself and building and installing the extension seems to work as expected, but I don't have a hackatime account so haven't actually tried it

  31. Hannah

    Does it show up as a language server?

  32. krig

    yeah.. but yeah I think I may have broken something around capabilities.. will need to investigate

  33. Hannah

    Well, it doesn't even show up as a language server for me

  34. krig

    Yeah that's really weird. Which OS are you on?

  35. Hannah

    arch linux (btw)

  36. krig

    Please open an issue on Codeberg if you can, I don't think I can work it out immediately but maybe someone else has a clue

  37. Hannah

    is there a way to reset gram? Maybe that would resolve the issue. I don't know if there's gram data outside of .config and .local, but maybe it's worth a try

  38. zetashift

    Hiya, I've been looking at Gram for a while now and the amp jump was the only missing feature for me, and through lobste.rs I saw that there was this room as well, so joining in here! I like the philosophy of Gram very much.

  39. zetashift

    Not sure if I can contribute meaningfully soon-ish, my low powered handheld device takes ages to compile the code, so I might try spelunking on the work laptop until then

  40. krig

    @Hannah There's a sqlite database which I think should be in .local/share/gram or at least somewhere under ~/.local, though there are so many distributions and variations that I never know for sure :D

  41. krig

    @zetashift hi and welcome :)

  42. Hannah

    Yeah, already deleted that

  43. krig

    that should be it yeah

  44. Hannah

    btw, should there be a node.js language server by default?

  45. krig

    hmm not exactly, there is a typescript lsp adapter (it uses the VS Code adapter), there is also vtsls.. so there are two that will get pulled in both for javascript and typescript. But neither are node.js specific afaik

  46. krig

    and both want to install node.js and a bunch of npm packages so they are blocked by default and need permission to do anything

  47. Hannah

    I'm doing rust development and there's many language servers preinstalles even after a reset

  48. krig

    so any files that are open will try to load language servers for that file, if you have reset and only have a rs file open, only rust-analyzer should be running

  49. krig

    if you're on an older (< 3.4.0) version, extensions would install things without permission too.. so when the extension loaded it could install stuff. In general the extension system is a bit underloved in gram, I don't really use extensions and hadn't noticed just how broken it is

  50. Hannah

    well, I have reset and the only code I opened was rs. When I go to the language server conf, there's node.js, javascript and other stuff

  51. krig

    ah yeah so the node runtime settings will always be there, that's built in

  52. Hannah

    I'm on 3.4.1

  53. krig

    but in the list of running language servers you should only see rust-analyzer

  54. Hannah

    yeah

  55. krig

    ok now my hackatime extension is giving me "wasm trap: cannot enter component instance" which is something I haven't seen before.. it's definitely doing stuff that isn't working properly

  56. Hannah

    Yeah, that's what I got yesterday

  57. krig

    I mean it's probably/certainly a bug in gram, I just haven't seen it before

  58. krig

    aah ok so maybe if I can figure that out, that would get it working for you.. I'll look into it

  59. Hannah

    Thanks <3

  60. krig

    @Hannah I think I got it working :o it WAS a bug in gram but an old one inherited from zed

  61. Hannah

    oo

  62. Hannah

    @krig that's great

  63. Hannah

    What was it

  64. krig

    there's this capability system for extensions that was never working in zed where you are supposed to be able to configure limits like "hackatime is only allowed to execute this particular process with these arguments", and I have done stuff to make that work and also cover a bunch of things that extensions could do that wasn't covered. Like extensions could be limited to only execute a particular executable, but they could also write to files and make things executable, so then they can just... write their evil executable to the one file they are allowed to execute and make it executable

  65. krig

    so then I applied limits to making things executable as well.. but I missed that there was a whole separate set of capabilities for executing that extensions can self-declare, and the logic for combining those with the other capabilities was messed up

  66. krig

    ...sigh. Anyway.. I think I can get it working

  67. Hannah

    Thank you so much!

  68. krig

    no problem!

  69. Hannah

    Soo, I'm gonna shower now and I'll be back after that

  70. krig

    @Hannah pushed a workaround now https://codeberg.org/GramEditor/gram/commit/b1c170e3e9f101b560a618ed5681234380bff0f9

  71. Hannah

    Cloning it right now

  72. krig

    @Hannah great, let me know if it works for you

  73. Hannah

    @krig it worked perfectly :D

  74. krig

    awesome!

  75. Hannah

    thank you so much!

  76. Savoita

    krig I am trying to clean up the `paths` crate, and make the implementation more uniform and standard. However, it would likely involve a few breaking changes w.r.t. where the program stores data on the filesystem, and not checking the (seemingly randomly decided on, as they are not standard) `FLATPAK_XDG_` env vars. How should I proceed with this? I can just do the work and shove it in a PR with a list of the changes, but I don't want to intercede here if the work will not be likely to be merged.