Lapce
lapce.dev
lapce.dev
Just a bit of context here to explain the status of the project. The first line of code was started around 2018 as a personal project. And as of today, we still don't have anyone who works on it full time. We don't want to defend ourselves too much here, because there are very good quality code editors out there such as Helix, which is also community developed. But still, GUI is just such a beast of complexity, which consumes lots of time and energy which we already lack. That said, we had developed our own cross platform GUI toolkit called Floem, because as you may know there aren't any good ones that exist.
The journey was fun and challenging, but the aim of the project isn't a toy, and we believe by taking slow but firm steps, we'll reach production quality, one day. Before that, please do bear with us, and help us if you can (as in code).
Honestly this is about what I'd expect from pre-alpha software, though I do agree with other commenters that that label should be more prominent on the website to manage expectations.
Taking on something like VS Code as a competitor is ambitious, as is building a native UI library from scratch. Personally I applaud your effort and I hope this project succeeds.
https://github.com/lapce/floem
because IMO it's as interesting as Lapce in it's own right.
On the side of the GUI, what made you make Floem instead of using egui or other similar library? As far as I looked, looks like a non-native reactive GUI using some 2D graphics library like the other ones. Does the granularity in that reactivity have a big importance in that?
Apart from that, if Floem is easier to use than other graphical libraries for complex designs, or if you make a GUI designer like you have in Visual Studio, Qt, and similar, it can help a lot of people developing apps in Rust
From Servo's site:
> These pre-built nightly snapshots allow developers to try Servo and report issues without building Servo locally. Please don’t log into your bank with Servo just yet!
Though I'll say even Servo's site is lacking too.
I am using Qt Creator, and it is absolutely amazing for C++/CMake based development, but I will have to give Lapce a try and see how it stacks up.
- Exiting insertion mode with ctrl+c or ctrl+[
- Shift+U to undo all changes done to the current line
- `di[` to delete the contents inside the current [
- `dta` to delete everything until the next `a`
- Shift+[ and shift+] to jump paragraphs
- Shift+D to remove everything until the end of the line
- `.` to repeat the last action
It's a good start, and I'll definitely check it again in the future, but I'd hold on advertising "Vim-like" editing until the support gets better.
The rest of the editor is awesome, no complaints so far.
Been using Vim for over 15 years and didn't know this one.
Me too. Both extension for VS Code have too many quirks for me, and I left the Jetbrains world and intend not to go back (due to too many disappointing support issues).
People suggest this over Zed very frequently. In my experience Zed is way more mature and stable. That being said, it's no one near as usable as neovim with a good plugin setup, let alone a mature ide like Jetbrains products.
Jetbrains IDEs might be slow, but I'll get a hell of a lot more done in 8 hours with it. Once you learn to use the features well, it's incredibly powerful. I love vim, but generally use jetbrains.
If Jetbrains took 500ms to load a file vs 1ms to load, my productivity isn't going to change dramatically. It's fast enough. Yes initial indexing is slow, but it's easily worth it.
All this being said, I think Lapce is very informative as a resource to anyone trying to build an editor in rust.
It's not the speed, or even the phoning home that make me rage-quit VSCode on the regular. It's the RAM. EVERYTHING slows down if you only have 24GB and try to use VSCode.
But I was 100% vim for years and over time, slowly started using intellij and friends. I hated how slow it felt. But as I learned the features, it became a no-brainer.
If I didn't try new stuff I wouldn't have used it.
I did the same thing with terminals for a while, and settled on Kitty. (I'd never use fig / warp). Speaking of which, IntelliJ 2024 EAP terminal is horrific. I had to downgrade.
Now, we have Spacemacs, Doom Emacs and Neovim with Lazy, Packer etc., so I really can have a 1st class "IDE" without needing to learn LISP or Vimscript (or Lua). So you do need a little bit of that to be able to edit the package.el or init.lua, but it's pretty much uncomment or cut & paste.
If you're looking for a (Neo)vi(m) tutorial, try this:
https://www.barbarianmeetscoding.com/boost-your-coding-fu-wi...
Helix has been looking for a GUI solution for a while now. ( https://github.com/helix-editor/helix/issues/39 ) I wonder if Lapce's UI toolkit would be a good fit.
In a "batteries included" edit a service like copilot that expose all data to a third party is a terrible anti-feature.
As for script-oriented plugins vs wasm - I see a tradeoff - and don't think neither are right or wrong.
Cross editor plugins via a common wasm api might be fun, but perhaps not very practical.
Edit: link to relevant issues and discussion:
https://github.com/helix-editor/helix/discussions/3806#discu...
Regarding plugins, I'm with Helix from the beginning, i have read everything, and I understand the motivation well and can accept it. Perhaps this is what the ideal editor looks like for creators, but it definitely doesn't look like the ideal editor for me. I respect their decision, but I'm sticking with Neovim and might switch to ZED when Linux support becomes available.
> [Helix]'s quite hostile towards its own community.
(I'm still using VS Code to get my stuff done, but in a couple of weeks I got some time to spent to re-evaluate Helix and Neovim.)
I guess both have issues. But still, the power of VSCode with vim keybindings is still my best setup.
There are plenty of out of the box configs that do most of the work for the user in terms of configuration that begs the question: why demand vim in other code editors?
Lapce is also cross-platform whereas Zed is currently macOS only. But they seem to be making rapid progress on linux support so this may not be relevant soon.
but for me, the big issue is I run phoenix framework and the older version I'm running my project on can't run the tests on the arm version of docker os I had to create a x86 machine on hetzner.
It would be much more impressive to explore a novel approach for editors more extensible than Emacs, or with a more innovative editing model than vim's.
If we are reinventing the wheel, why not at least try to make a better wheel that's never been done before?
And a better wheel is much harder (but there is a feature request for helix mode, that's more innovative than vim, maybe they'll add that)
I think Helix tries to do that
If implemented inside Emacs, then it composes with the rest of its package ecosystem. Kakoune, Helix, etc. are somewhat set back by having to reproduce functionality equivalent to Magit, Org, LSP mode, and so on in order to be on equal footing for many users.
Evil, Meow, and God mode seem to show that Emacs is a good platform for such experimentation.
I've had similar issues with VscodeVim being weird in VSC. Ultimately the text editor is so core to a text editor (duh) that deeply modifying it is bound to give a worse experience than implementing it from scratch, even if it does give you a lot of nice stuff 'for free'.
Honestly that was my experience with all of Emacs, not just evil. I tried Doom Emacs a while ago, and while Doom does a great job at abstracting a lot of that hackiness away, whenever I tried to configure something myself it just felt like the entire Emacs ecosystem is based on random hacked-together 10000 line elisp scripts with 3 GitHub stars which abuse some weird undocumented legacy parts of Emacs. Basically everything except a few famous big packages (eg. Org, Magit, etc.) felt very weird to use.
Kinda surprising considering how comprehensive the Neovim ecosystem feels compared to Emacs', despite it also being a very niche editor
Will try again next year.
It's an exciting product pitch but isn't working for me. I see now that there's a "pre-alpha stage" disclaimer on the download page and wish that were in larger font.
Having said that, there doesn't seem to be very much "there" there, right now. I managed to open a C# project using the 'csharp-ls' language server, but, other than suggesting some refactorings that I couldn't successfully apply, there wasn't much that indicated that this actually worked. Debugging certainly didn't.
It did load very fast, though, so that might make it worth checking out again in, oh, a year or so...
But like you said, it's pre-alpha, and I hope this project succeeds. I'm sure these issues are solvable. It's exciting to see Rust-based non-web UI libraries finally starting to become usable for reasonably complex apps.
Edit: I just disabled RA in both editors and restarted them. VSCode is now at 320MB and Lapce is at 770MB.
Edit 2: To be clear, my above comments are meant in the spirit of an informal bug report/feedback. I get that Lapce is a labor of love for its core developers, and I'm not shitting on it. In fact I think it's pretty impressive. I'm keeping an eye on it as something to potentially switch to once it matures a bit.
None of the features advertised beat neovim nor does it have the crazy plugin ecosystem.
Plenty of reasons why someone would choose Lapce over VS Code.
https://github.com/lapce/lapce/issues/945#issuecomment-12853...
There's no menu or anything to open a folder either. This seems lacking some _basic_ UX principles that should never be overlooked.
I did eventually figure it out and the TS integration doesn't work at all. The file browser icons constantly and consistently do not render correctly.
Guess this is something to check back in on in a year or three. It's a long way away from being complete, let alone usable.
That sounds like it could be Lapce failing to handle macOS full disk/folder security permissions (which you can grant in the System Preferences app)
Here's some issues that were filed for this same problem:
- https://github.com/lapce/lapce/issues/2732
- https://github.com/lapce/lapce/issues/2773
- https://github.com/lapce/lapce/issues/2737
[^1]: https://github.com/lapce/floemLapce Editor 0.3 - https://news.ycombinator.com/item?id=38262775 - Nov 2023 (98 comments)
Lapce – A code editor with LSP and DAP support - https://news.ycombinator.com/item?id=38100570 - Nov 2023 (2 comments)
Lapce Editor, Release v0.2.0 - https://news.ycombinator.com/item?id=32714191 - Sept 2022 (40 comments)
Lapce – Fast open-source code editor - https://news.ycombinator.com/item?id=30708505 - March 2022 (224 comments)
Show HN: Lapce – open-source code editor inspired by Xi-editor - https://news.ycombinator.com/item?id=30526693 - March 2022 (2 comments)
Lapce – Fast and Powerful Code Editor written in Rust - https://news.ycombinator.com/item?id=29549173 - Dec 2021 (145 comments)
[2] https://github.com/lapce-community
[3] https://plugins.lapce.dev/plugins/panekj/lapce-go
[4] https://github.com/lapce-community/lapce-go/blob/volt/src/ma...
[0]: https://code.visualstudio.com/blogs/2023/06/05/vscode-wasm-w...
"You can write a plugin for Lapce with any programing language that compiles to WASI."
There would be no sane individuals to try to siege it if this was evident for everyone though!
Which editor that is doesn't really matter. VSCode is probably easiest, but Neovim, Kate, LiteXL, Lapce, Emacs, kakoune, helix, really pretty much all of them should work decently well.
By "wrap long lines", I mean that I will never see a horizontal scroll bar even if there is a very long line of text in the buffer.
Can it wrap at column 80 or does it only wrap at the right border of the window?
I like the idea of natively compiled editors - fast!
For two days, I have been using the Lem editor written in Common Lisp, super fast and responsive.
Might not be worth to expert coders out here but definitely saves a lot of time for me debugging or onboarding into a new framework
Wish Lapce had that. Also Zed does not have the quite depth for AI compared to Cursor
I am forced to use VSCode for extension-based reasons, but have Sublime Text installed as well that I can very occasionally use. The difference each time is staggering, like a slap in the face. Scrolling smoothness, input latency, snappyiness to jump between files, or search workspaces. Each time it's so obvious. It's just so much more pleasant. Like going from being hunched over a tiny laptop screen to sitting in front of an all encompassing ultrawide, or going from an old laptop to a new desktop.
It doesn't mean that VSCode is an unusable pile of garbage, just as a tiny laptop screen isn't unusable. But the difference, at least to me, is undeniable.
Take my example with an ounce of saltt as I've never coded a VSCode extension. It is very well possible that the extension API prevents this particular example. I guess normally things like parsing source files have to follow guardrails that prevent this kind of bug, or at least discourage coding this way. And ASTs are exposed by VSCode's core for the natively supported languages.
Still, it's probably safe to assume that there is a lot of badly written code out there that does not pay attention to performance, or follows an "optimize-later" mindset.
Features surely often seem tempting to implement in a slow and unoptimized way, and anyone can contribute to VSCode extensions.
I think a lot of people don’t notice the difference but I can’t un-notice it.
Huge generated files and whatnot, VSCode just spins but Sublime opens them instantly.
Not to knock VSCode: it’s amazing what they’ve done especially comparing it to other web-stack apps (like what is Slack doing that it’s slower than VSCode with 6 extensions running?!).
Even when things are running smoothly, the just-perceptible delay in switching files or a slight stutter scrolling feels like the digital equivalent of working with a cheap tool.
The cheap ratchet is a little sloppy and occasionally the pawl doesn’t catch but it still does all the same stuff. Yet Snap-On still has customers.
It’s not VSCode’s fault ;)
JS-based apps happen to interact terribly with nannyware for some reason. I see it every time I run one of our node services, everything just grinds to a halt while the antivirus freaks out about how dare I run a piece of uncompiled code.
Slack and friends have the same problem. Discord actually runs better in a browser than as a standalone app.
A half-wild guess here is that because viruses uses various ways to hide themselves the anti-virus software probably scans W^X codepages on changes, so anything JIT compiled (all modern JS engines) will trigger a lot of spurious scans (kinda like how compiling and writing .exe files can grind turnaround times to a halt).
I mean, yeah.. because they're slow and resource intensive. Your comment directly contradicts itself: It IS VSCodes fault.
And BTW, it doesn't have anything to do with "nannyware". They slow down on any computer that is under the tiniest load.
I'm working on a large Dart project and a long time ago someone thought that having the project split up into 100 packages would be a great idea (it's not).
My previous editor was IntelliJ as I am used to its keyboard shortcuts, but it struggled with our setup: constant freezes and even if it didn't freeze, it would take seconds until the suggestions came up (or when I wanted to rename a local variable, smh).
I was so frustrated by it, that I installed helix, it was fast so I'm now learning to use it as my daily driver.
I have now both open, doing my editing on helix, and if I feel like I can go something faster in IntelliJ (which now happens less and less often), I do that little thing in IntelliJ and come back to helix.
Why helix: it's "great by default" and I didn't have much success with setting up and customizing NeoVim (it didn't feel good, the plugin were annoying to learn, and it started to slow down). I'm sure it a skill issue, but helix just works for me, and I can live without plugins for now.
Despite all my tweaking, VSCode sometimes just feels like it’s a beat behind, and keyboard commands get dropped in the transition between panes and such. Even just scrolling with nvim keybinds feels a bit off. My key repeat rate is fairly high, and I’ll hold down ^D to skim through a source file. VSCode’s renderer struggles to keep up smoothly sometimes.
This is all nitpicky stuff, not enough for me to swear off VSCode or anything. But it’s just annoying enough that every once in a while I end up in some rabbit hole of VSCode internals and css tweaks, instead of doing actual work. Most coding does not require a ton of bouncing around, but it does feel very liberating to have confidence in my inputs as I navigate around.
For avoidance of any doubt, I care deeply about my editor latency and agree that those terminals who claim to be "fast" and yet only care about average--not even common--throughout instead of latency misunderstand the problem space... and yet, I still can't say that it is reasonable to lose "confidence in your inputs" if a system is merely slow to process without losing any of your events. If an editor drops any of my inputs at all ever I 100% lose all confidence in what I'm doing; but if it always works then I can close my eyes and still use it without issue!
Terminal emulators with GPU-accelerated rendering became popular, but I often found the latency to be quite bad. (I eventually settled on Kitty and foot.)
With VS Code in particular, it’s just not designed to be operated via keyboard. With enough effort, you can map/script everything, but many actions translate to opening a pane and then focusing it. It’s an implicit modality switch that often ignores input during the transition. Also, opening a new terminal is oddly slow, I think due to VS Code injecting things into zsh init.
With tmux+nvim, it’s much more predictable. For example, if I think “I want to copy three lines out of this file and paste it into a new shell”, it’s just: `3yy alt+enter ctrl+shift+v`, and I know it’s going to work every time. Not to mention the composability of keybinds in different scenarios.
(Also, hi saurik! Cydia on my OG iPod Touch is a big part of what got me into coding in the first place :)
Unfortunately, for this use-case, neither Zed or Laplace will likely to fill the gap, as they rely only on LSP as Neovim. That's also my issue with both: They should focus more on providing features to support coding, not just speed.
(Though I like the attempt at an analogy and I see how it works for you at least)
I am a high-action player —- I know I know, a monster! (but also a brass and heavy glass slide player)
Better showcase on how ridiculous the tech stack is would be to open a 500 line file with a code and scroll. Startup isn't great either, though it isn't comically bad as it used to be.
So yeah, I want to see the authors of any desktop software to address this modern problem of writing slow UI. Otherwise I might assume they don't care.
Last time I've tried Idea/etc was quite a few years ago. It didn't feel great. But maybe I should force myself into it. Might be better on M1.
I also open regular Visual Studio every few months for C# on Windows, and while it's slow to start, the editor feels really solid, quick, and responsive.
I get mad at this attitude from some companies. It’s like telling a carpenter that they have to build a house, but are not allowed power tools. It makes no sense.
Edit: typo
This in turn puts departments at odds, as their argument for speed is turned into an argument against security, which is a very hard position to be in if your department is a few layers down the corp stack.
Ideally, most programmers should be in IT or have some kind of alignment with IT and able to give some pushback about this during CAB for instance, and/or get some exceptions but that is increasingly difficult the more 'agile' an organization becomes and the more it seeks to silo infrastructure people from application people. A good IT department imo is one that doesn't do this and retains a more traditional culture where programmers are part of IT and able to actually influence the technical direction of the company, not just be treated like a product factory for business units.
Just from personal experience working as a programmer on the infrastructure side...complaining about windows sysadmins was the favorite past time of probably the majority of higher tier IT employees. It makes our jobs incredibly difficult for the same reason it makes application developers jobs difficult.
On the other hand, you'd be surprised by just how many career programmers are completely inept at sysadmin work and have no sense for security (nothing like CI pipelines using personal credentials and committing keys into public repos), so just letting all programmers do whatever isn't a great policy either...
I'm not saying it isn't valid criticism but I guess the way I work with an editor just isn't the same as others who experience this.
Would you consider something like emacsclient's approach - a daemon running in the background that a window connects to?
I navigate with the trackpad on a Mac and seem not to ever feel it, but I know others do not like this way of working, which is fair enough.
Lapce is interesting to me for other reasons: it is one of the few[0] GUI text editors with a remote dev option that matches what VSCode can do. And it might have a smaller footprint on the remote machine/in the container while doing it.
VSC’s remote dev support is very nearly non-negotiable for me now, so I say more power to them; I intend to try it again properly soon.
[0] there is another editor that was mentioned here recently that can achieve this with a plugin, but I forget the name
Update: Zed is that editor.
Absolutely. How new/fast is your developer machine? A lot of developers are working on computers that are several years old and may not have been that high-spec to begin with. It's generally not basic editing that's slow on it's own. It's trying to run several editor windows at once (say a frontend and several backend services) along with all the other things required for work: the project itself, compilers, video calls, etc.
As a reference point my 2015 MacBook Pro struggled with VS Code + Google Meet at the same time.
If programming in Rust on a medium-to-large project, you might be waiting minutes for your editor to finish checks to highlight compilation errors every time you save. That was me on a Rust project last year when I was trying to program on a 2019 macbook air with 16GB of RAM and 1.1 GHZ quad-core intel processor. Typical wait times to check what I'd written would be 30 seconds to just over a minute. It was excruciating.
I finally demanded the employer set me up with a cloud VM that I could use when working with that codebase, as the network lag with VS code opening the project remotely was so much more tolerable
A bunch of my friends tried it, and it was really interesting to see that many of them were not bothered in the slightest by even quite high latency numbers.
Personally, I was mildly bothered by the "single frame of latency" example and _intensely_ bothered by all the higher numbers. It just felt really yuck to use; I would hate to be doing that all day.
I can't tell you what exactly it is, but yes: the world contains many developers going crazy with frustration - not because of a 30 second wait, but because of a 30ms render delay.
You don't know you need it but once you have it it's hard to go back.
This extensibility is probably what made VSCode popular though, especially for web devs since the extension mechanism is JavaScript-based.
Makes me wonder if those Rust-based tools (Lapce, Zed) will have as much success with Rust-based extensions authoring.
a good example is magit on emacs, magit seems great, and i really want to learn it and use it, but its very slow (at least on windows its slow enough to make you unable to practically use it)
in short, speed changes everything
"Speed" is probably the wrong word, it's latency that matters.
Several times I have been on the brink of trying out spacevim for java development , out of pure frustration but the amount of config and tweaking needed scares me. I don't need much, lightning fast auto complete, auto import and Google code formatter integration. One of these weekends I'll bite the bullet I think and set it all up.
So yes. These two are THE editors for me.
I only deviate from these when I need to do Delphi / Freepascal development.
Notepad++ / Notepadqq are being used as in place hotkey invoked text editors.
I still try new ones out of curiosity but I have hard time understanding why any would succeed. How they're going to get the same amount of extensions / plugins in order to match functionality?
Yes, it breaks workflow and is incredibly slow.
Just like refreshing elements in UI shouldn't take multiple seconds, or a webpage shouldn't take multiple seconds to load on a good connection.
But also 10k line file should be nothing for a modern PC.
there is no convenient way for me to 'plug-in' the responsiveness of something like vim or emacs into vs code.
to be clear : responsiveness is things like opening a context menu of any kind, switching contexts, text drawing and blanking ; just things that add up to create a quick feeling piece of software. vs code/atom/whatever and other 'larger' graphic-heavy text editors feel slow.
A few ms of noticeable latency here and there, a few hundred ms freeze every once in a while, it's maybe an extra minute per day in clock time. If it was just a 1 minute startup penalty, that would be different. But this 60,000 ms is split up throughout the working day into hundreds of small pauses, making the system feel laggy and unpredictable. If you're lucky, it's merely a subconscious drag on your attention. If you're unlucky it will, have you constantly breaking concentration to wonder "is my editor frozen? Oh wait, never mind." Hundreds of times a day.
Now contrast that to a text editor with literally zero instances of noticeable lag. It's not that it has zero latency, it's that the I/O latency on modern hardware is faster than our fingers and eyes can work. So we don't experience it.
Hundreds of noticeable pauses versus zero pauses. Once you cross the threshold below which our fingers type and brain can read, you're lag free. Getting a faster text editor doesn't just slightly improve the lagginess, it completely solves it.
I'm a Rust fanboy, so not dunking on Rust. Just an observation.
its also kind of hilarious to watch people be like "why would we need another editor" and then turn around and POG at Zed lmao
Some fake open-source software that are actually in it for the money:
- Langchain (and most "open-source" LLM software)
- Zed
> actually in it for the money
Neither "open source" nor "free software" have anything to do with being non-profit and not trying to make money
In fact, GNU directly says this: "Actually, we encourage people who redistribute free software to charge as much as they wish or can." [1]
And that's GNU. Which is FSF - the most obnoxious open-source absolutists you'll ever find. And even they don't discourage for-profit open-source.