The Gram Code Editor - 2026-10-27


  1. krig

    @Savoita if we can figure out a way to make the changes without breaking things that would be good. For the FLATPAK_ variables though I’m not too worried, those are clearly for the flatpak to use only. But I don’t want to break any other paths if we can avoid it, especially not things like config or state.

  2. msrd0

    Hi. Today I tried to debug a pytest and got "error: No debugpy adapter found and allow_binary_download not set". This used to work a few weeks ago. I have two debugpy binaries available, one in the .venv and one in /usr/bin. What is the problem? Does gram require another binary now?

  3. nicoco

    msrd0: yes, you need to allow downloading debugpy

  4. nicoco

    in the LSP settings

  5. nicoco

    it was downloaded before consent before

  6. krig

    Yeah before, the editor would just download debugpy without asking. It’s not downloading more than it used to though, at least not unless there’s a bug. But the permission gate is very annoying now I know :/

  7. nicoco

    not annoying, just surprising! we could read the changelogs too :)

  8. nicoco

    it's in line with gram's "manifest" to not download the world without opting in, isn't it? I like that change :)

  9. krig

    Yeah I just want a less annoying user experience around it! I have an idea I’m working on that should be easier to use and much clearer about what it is doing and why.. but it’s far from done

  10. msrd0

    I understand that it does not automatically download a binary, which is good. What I don't understand is why doesn't it use the available binary on my system? This works for all other LSP's I'm using (rust-analyzer, ruff, basedpyright) - gram has never been allowed to download lsp binaries

  11. krig

    I think debugpy is a python/pip package, and I suspect it creates its own venv for it. I’m not at a computer to check though

  12. krig

    and yeah before it installed it without asking :(

  13. krig

    the thing I am discovering over and over is that there are multiple duplicates of everything in the code base. I have tried to get smooth scrolling working and have had to implement it twice so far, with at least one more to go.. same thing with the lsp download code. I thought I had found and gotten it working with the permission check in 1.0, but that didn’t cover lsps installed by extensions or debug adapters or the node runtime or prettier etc etc

  14. krig

    never ending…

  15. mort

    reminds me of when I was looking into fixing the rendering of that error message with the command to install a server to the remote, and found out that there are two markdown renderers

  16. mort

    or when I was moving from protobuf to postcard, and found that there are two remote server communication implementations, one based on websockets (the "rpc" thing) and one based on that SSH/WSL transport system

  17. krig

    oh yeah… gah. I tried to figure the markdown stuff out at some point but didn’t manage to sort it out then

  18. krig

    literally every single feature is implemented at least twice

  19. krig

    haha

  20. zetashift

    Anything in there in the area of "good first beginner issue"? I have done a lil bit of Rust and got some spare time this weekend!

  21. krig

    hmm good question.. sorting out the markdown renderer might be too hairy, but it’s fairly clear what’s wrong: there are two crates, one called markdown and one called markdown_preview, and both implement different commonmark renderers that each render different subsets of markdown

  22. zetashift

    As a djot user, I remember why I went into liking djot

  23. zetashift

    but yea that sounds interesting, just deleting code is satisfying at least

  24. krig

    oh yeah

  25. krig

    I have written a commonmark parser from scratch before 😅

  26. krig

    djot is great

  27. zetashift

    I _attempted_ one, in Unison. I gave up after nested blockquotes and pretty sure I'm not spec compliant

  28. zetashift

    But parser combinators at least are very cool to know about.

  29. koru

    zetashift, you can check issues to find some work.

  30. krig

    I think with markdown you need a custom recursive descent parser and at least two passes... at least that's where I ended up. But yeah fortunately there's a crate that does the core parsing, it's "just" turning it into a gpui component that's needed. And I think together the renderers have all the features, just that there's two of them and they implement different subsets in very different ways

  31. zetashift

    > zetashift, you can check issues to find some work. I did check some out (first 2 pages), but it's unclear to me which one of them are "beginner" and which ones are basically "extensions shouldn't be like this" ↺

  32. krig

    yeah finding something that's beginner friendly is tough.. let me go through and label any that I think would be a good thing to begin with

  33. zetashift

    thank you! I hope it's not too much effort 😅

  34. zetashift

    > I think with markdown you need a custom recursive descent parser and at least two passes... at least that's where I ended up. But yeah fortunately there's a crate that does the core parsing, it's "just" turning it into a gpui component that's needed. And I think together the renderers have all the features, just that there's two of them and they implement different subsets in very different ways When I got stuck I tried to look at other libraries and I found them all to be very complicated or just a bunch of regex thingy. Unison does not have an easy way to do regex ↺

  35. zetashift

    Err krig you mentioned Steel being unstable, since I did some helix work I actually do know the maintainer of Steel and messaged him how stable it is, and he mentioned shortly: > I haven't made a breaking change in steel or the api in years that hasn't been an explicit bug fix > And for those I think the number is single digit occurrences And sending it here, because he wanted to join codeberg anyway because he's getting sick of Github

  36. zetashift

    So he'll add it his 2c later

  37. zetashift

    (there is also https://scheme.rs/ and https://raviqqe.com/stak/ btw), but I used the helix/Steel integration without breaking stuff for 1,5 years now without a hassle, so I thought I'd mention that

  38. krig

    Awesome! I didn't mean to say that I thought it was unstable, just that I don't know how much it would change going forward or the status of it in helix (unstable as in changing, not as in crashing, haha). With lua I know it's not going to change or go away

  39. krig

    but I am very open to consider other options and sharing infrastructure with helix would be great

  40. krig

    I didn't know people were using steel helix for that long, all I knew is that the PR wasn't merged for a long time (I think it is now though?)

  41. krig

    @zetashift my parser doesn't use regexes much (they are slow in gleam) so it might be interesting. But it's basically written in one go until spec compliant with very little optimization https://mork.hexdocs.pm

  42. koru

    Yeap, Helix still not merged Steel plugin system PR.

  43. koru

    Sad.

  44. krig

    ah, too bad

  45. zetashift

    Ah I can share some more about that as well, that PR is stalled on review time, which is completely understandable :P. Not necessarily because Steel is unstable

  46. zetashift

    In fact since that PR got created (it's been _years_) I have had no real breaking change in the small plugins I wrote, but it also got a rudimentary package manager and pretty okay-ish language server

  47. zetashift

    Lua ecosystem of course is just...it just works :tm: can't really hate on that

  48. zetashift

    > @zetashift my parser doesn't use regexes much (they are slow in gleam) so it might be interesting. But it's basically written in one go until spec compliant with very little optimization https://mork.hexdocs.pm Nice! Always great to see Gleam code. ↺

  49. zetashift

    > some Obsidian extensions also cool!

  50. zetashift

    > I didn't know people were using steel helix for that long, all I knew is that the PR wasn't merged for a long time (I think it is now though?) it's not, still, but the fork is of mattwparas is really easy to get running (just a cargo build, it's not an invasive code change)

  51. zetashift

    I can't really tell what the maintenance burden will be, but I do like writing Steel, because of the reloading stuff, evaluating code inline etc in helix, that it is a lot more fun.

  52. zetashift

    Doesn't really give it an edge either over Lua because is Fennel always ✎

  53. zetashift

    Doesn't really give it an edge either over Lua because there is Fennel ✏

  54. krig

    I do want better lisp/scheme support in gram, going with steel would certainly make that more urgent

  55. krig

    it'd be funny if gram merged steel plugins before helix :p

  56. zetashift

    wouldn't surprise me at this point, that PR was ready for review such a long time ago T_T

  57. krig

    true..

  58. zetashift

    OSS do be like that sometimes tho

  59. koru

    Anyway I think Lua is more stable and complete compare to Steel. Also a lot of people know Lua.

  60. zetashift

    yup, solid reasons

  61. krig

    there's also already a working POC with lua so yeah, I mean.. some choice will have to be made. And once it's made it'll be a pain to change. Maybe also a reason why helix has been holding off? I don't know. But yeah once there is an eco system, you are kind of stuck with whatever decision you made. Although

  62. krig

    I guess vim did change (and neovim as well) without too much trouble

  63. krig

    I'd be happy to drop zed extension support at some point though.. it's just a matter of time before extensions start requiring api 0.8 which I haven't backported support for

  64. zetashift

    > there's also already a working POC with lua so yeah, I mean.. some choice will have to be made. And once it's made it'll be a pain to change. Maybe also a reason why helix has been holding off? I don't know. But yeah once there is an eco system, you are kind of stuck with whatever decision you made. Although > Maybe also a reason why helix has been holding off I think the reviewing culture in helix is just really ugh...peculiar. There are some highly requested issues that have a PR, they'll get reviewed and then...a few just end up being like "actually this is too bloated, and should be done differently". ↺

  65. zetashift

    Multiple language servers for example in the end did get merged but iirc that was also a PR that took months

  66. zetashift

    I theorize that the maintainers just like the editor as-is

  67. krig

    yeah very possible

  68. krig

    not having plugins was kind of one of the selling points of helix early on

  69. koru

    I'm using git Helix without issues. I like idea out-of-box editor. It's just works for me.

  70. krig

    it's one of the concerns I have with gram too, teaching using VS Code I saw students start out by just installing every extension they could find and ending up with a mess. My vague plan to avoid that with Gram is to ship the editor without any pre-installed registry, and to have an "official" extension registry to suggest to users which is very curated but allow adding other registries in addition to that one. Just enough friction :p

  71. zetashift

    the way plugins develop in helix is also very interesting imho, I have Steel+Helix config, but the Steel plugins don't do much except call external tools

  72. zetashift

    You don't need much because helix already has it, so things like "can I add random language server extensions to support $weird thing in language server X" or "can I ergonomically edit the text in a buffer so I can emacs UI-as-a-buffer" thingy

  73. zetashift

    and usually the answer can't do that in Steel, because Helix internals are not exposed

  74. zetashift

    I don't mind Lua as a plugin system because probably my Gram config will look the same, some fancy `config-thing = value` because I already have like 95% of what I need

  75. zetashift

    might as well do something than that's ergonomic for the maintainers

  76. zetashift

    What might be interesting in all this, and why the helix maintainers did like the driveby Steel PR, is the way the plugin system is setup. I found it a very readable PR for somebody that knows like entry level Rust back then, it's basically this + some Steel VM calls, but it might as well be easily replaced with Lua: https://github.com/mattwparas/helix/blob/424add100eac9ca258d969b985a8ac370469ec05/helix-term/src/commands/engine.rs#L257

  77. zetashift

    > and usually the answer can't do that in Steel, because Helix internals are not exposed this is because the PR wants to stay small to be reviewable

  78. zetashift

    > it's one of the concerns I have with gram too, teaching using VS Code I saw students start out by just installing every extension they could find and ending up with a mess. My vague plan to avoid that with Gram is to ship the editor without any pre-installed registry, and to have an "official" extension registry to suggest to users which is very curated but allow adding other registries in addition to that one. Just enough friction :p Yea this sounds good alright, it is sometimes a nice rabbithole, but I don't think it should be the default ↺