-
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.
-
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?
-
nicoco
msrd0: yes, you need to allow downloading debugpy
-
nicoco
in the LSP settings
-
nicoco
it was downloaded before consent before
-
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 :/
-
nicoco
not annoying, just surprising! we could read the changelogs too :)
-
nicoco
it's in line with gram's "manifest" to not download the world without opting in, isn't it? I like that change :)
-
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
-
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
-
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
-
krig
and yeah before it installed it without asking :(
-
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
-
krig
never ending…
-
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
-
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
-
krig
oh yeah… gah. I tried to figure the markdown stuff out at some point but didn’t manage to sort it out then
-
krig
literally every single feature is implemented at least twice
-
krig
haha
-
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!
-
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
-
zetashift
As a djot user, I remember why I went into liking djot
-
zetashift
but yea that sounds interesting, just deleting code is satisfying at least
-
krig
oh yeah
-
krig
I have written a commonmark parser from scratch before 😅
-
krig
djot is great
-
zetashift
I _attempted_ one, in Unison. I gave up after nested blockquotes and pretty sure I'm not spec compliant
-
zetashift
But parser combinators at least are very cool to know about.
-
koru
zetashift, you can check issues to find some work.
-
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
-
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" ↺
-
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
-
zetashift
thank you! I hope it's not too much effort 😅
-
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 ↺
-
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
-
zetashift
So he'll add it his 2c later
-
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
-
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
-
krig
but I am very open to consider other options and sharing infrastructure with helix would be great
-
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?)
-
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
-
koru
Yeap, Helix still not merged Steel plugin system PR.
-
koru
Sad.
-
krig
ah, too bad
-
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
-
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
-
zetashift
Lua ecosystem of course is just...it just works :tm: can't really hate on that
-
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. ↺
-
zetashift
> some Obsidian extensions also cool!
-
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)
-
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.
-
zetashift
Doesn't really give it an edge either over Lua because is Fennel always✎ -
zetashift
Doesn't really give it an edge either over Lua because there is Fennel ✏
-
krig
I do want better lisp/scheme support in gram, going with steel would certainly make that more urgent
-
krig
it'd be funny if gram merged steel plugins before helix :p
-
zetashift
wouldn't surprise me at this point, that PR was ready for review such a long time ago T_T
-
krig
true..
-
zetashift
OSS do be like that sometimes tho
-
koru
Anyway I think Lua is more stable and complete compare to Steel. Also a lot of people know Lua.
-
zetashift
yup, solid reasons
-
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
-
krig
I guess vim did change (and neovim as well) without too much trouble
-
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
-
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". ↺
-
zetashift
Multiple language servers for example in the end did get merged but iirc that was also a PR that took months
-
zetashift
I theorize that the maintainers just like the editor as-is
-
krig
yeah very possible
-
krig
not having plugins was kind of one of the selling points of helix early on
-
koru
I'm using git Helix without issues. I like idea out-of-box editor. It's just works for me.
-
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
-
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
-
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
-
zetashift
and usually the answer can't do that in Steel, because Helix internals are not exposed
-
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
-
zetashift
might as well do something than that's ergonomic for the maintainers
-
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
-
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
-
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 ↺