Lapce Editor 0.3
github.com
github.com
Text manipulation operations are fairly simple to define and can probably be abstracted away into some generic API. Then writing generic text manipulation plugins should be very doable.
The complexity comes with project management, multiple files, build actions, etc. But you could define language specific sub-interfaces and the plugins would implement them. So a C++ plugin would understand CMake files for example.
I mean that's basically the biggest selling-point of plugin-systems today. Not that you can write your own functions to do something, but how well you can integrate it into the interface and deliver your own interface to enhance the app. And another part would be safe interaction with other plugins, and necessary package-managment.
No one understands CMake files
Maybe the neovim-people could get together with other projects, start some group, project, whatever to discuss this further? Of maybe something like this already exists?
Tangential to this I've wondered if it's possible or advisable to have a utility to port VS Code plugins to a plugin that's compatible with the JetBrains IDEs.
https://github.com/lapce/lapce already says,
> Plugins can be written in programming languages that can compile to the WASI format (C, Rust, AssemblyScript)
so it sounds like they did that?
Jokes aside, there are so many cool standards for doing stuff it's a shame we seem to reinvent the wheel over and over again.
The bonus is this should be really fast and it doesn't even require any codec or message copying.
Basically it seems to take the good parts from a few other editors and combines them:
It's like VSCode, but without the bloat of electron or Microsoft's telemetry.
It's like sublime text, but it's open source and has first class LSP support.
It's like Neovim, but it doesn't require downloading and configuring a bunch of mystery meat plugins just to get what have been table stakes editor features for decades.
But isn't the bloat of electron which enables the greatest benefit of VS Code? By which I mean the plugins with their wide range of abilities and UI-integrations.
> It's like sublime text, but it's open source and has first class LSP support.
Sublime has LSP since a while now.
Maybe for some users. I'm sparing with extensions because I find them hard to vet; I checked and I'm only using clangd and prettier right now. But I don't think Electron is required in order to have rich extensions - just see Vim/Neovim, Emacs, or any IDE.
> Sublime has LSP since a while now.
My bad then. I thought sublime's LSP support came from a third party package.
I don't know about IDEs, but I wouldn't put vim & Emacs on the same level as VS Code in terms of interfaces. They go much further than your average text-editor and also grow over time, but at the end they are still text-based interfaces with some fluff. Though, It of course depends strongly on your requirements. For most developers, text with fluff is more than enough.
But in any case, I try to avoid bespoke custom editor setups unless there's a situation that really warrants it.
Depends on your definition of "whole". Those modes work by removing features from the webstack, or by borrowing from external GUIs. Emacs browser w3m for example, is AFAIK unable to handle JavaScript. Electron-apps on the other side offer you whole webstack, including all available components, widgets, libs, frameworks, or whatever. So it's very easy to take some webapp or component and integrate into your workflows. Apps like Emacs are unable of doing this, and thus constantly on a game of fetching up on popular features and services.
It's one of the things I have about "real" IDEs with a vim mode. The one in vscode is pretty good, it's pretty rare I break it when just editing code (mostly '.' not doing what I expect). But everything else doesn't fit the vim model. I have the file manager or something open in the left and I can't reach it with ctrl+h, because it's own weird UI thing not just a split (like it would be in vim).
As a vim user I can reach a sort of uncanny valley where the core editing loop feels "right," but I end up having to fight against all that muscle memory when it comes to using features outside of it.
Every plugin in nvim required to learn some new different bs shortcut to have basic features. Plus, I ran into plenty of crashes and weird error in some plugins - and performance wasn't always great.
The editing is fine, you can get used to buffer editing - it's everything else which is not polished and feels like a pile of half implemented features.
But the principle I'm talking about applies without any plugins at all. If just do :terminal it'll make a split, you can now switch between whatever you were doing and that terminal the same way you would switch between a regular split.
None of the proper IDEs do that. I can't just look at what's on my screen and do "move focus to the thing below where I am". You need to memorize shortcuts for each bloody tab rather than them being context aware, and I hate it.
At the cost of difficulty. Recently I wrote a VSCode extension myself with zero prior knowledge (shameless plug: https://github.com/CrendKing/universal-format-on-type/), in probably one day. All I needed to study is their extension API that I cared about. No need for learning a whole new language or DSL. Also easy to debug since there is no compilation and little environment setup.
There is a good reason even though everyone acknowledge about Electron's performance cost, everyone is still using it.
Plugins are overrated and I try not to use them as much as I can.
Just did a quick comparison on Windows 11 and vscode with hello world uses 400MB but lapce used 900MB :)
The "killer feature" will be the plugin/extension support. Vscode got where its now mostly because of how extendable it is imo.
Every IDE or "code" editor has had some sort of extensions since decades. _Not_ being extensible is a reason to not being successful.
What made VS Code was the LSP and that you can use JS (that "everybody" already knows) to write extensions. The need of Lapce to use a language with manual memory management (to compile to (non GC) WASM) is a problem for general adoption.
Personally, I just find such “long” lines too difficult to navigate.
> Personally, I just find such “long” lines too difficult to navigate.
This is where line wrapping helps me. It wraps the lines to my preferred column size preventing the horizontal scroll.
Technically, like the person said in the thread "What prevents you from doing it yourself?"
I feel like not having line wrapping is like not having a save function. Yeah technically it's open source but it's a little irritating not to have "NO WRAPPING" in big letters.
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)
Just had a look at this. It's one of the few that doesn't use jsx-like macros, an major anti-feature in my opinion. The jsx stuff looks fancy, but it completely breaks Rust Analyzer. You might not care about code completion, but good luck resolving the complex type+lifetime issues (that UIs in Rust often have) without hover type.
Kudos for showing scope discipline, that's one I will be keeping an eye on.
That's not inherent of macros, but how the parser of the macro body is written. Ideally, the jsx code would be transformed to correct Rust code even on broken input, then Rust Analyzer would map the tokens from the expansion to the tokens from the source code to have context for IDE features (rename, autocompletion, go to definition, etc).
I wrote some stuff [1]. It's a bit all over the place since I'm very bad at writing. Here's also a thread with Rust Analyzer's developers [2]
[1]: https://blog.emi0x7d1.dev/improving-autocompletion-in-your-r... [2]: https://www.reddit.com/r/rust/comments/16x2kzi/improving_aut...
I'd give it a try, but I am very happy using Helix, which is pretty novel in its own right.
> You can write a plugin for Lapce with any programing language that compiles to WASI
though faster and slicker than Electron would also be nice. A helix-like as opposed to vim-like mode as well
Discussed here: https://github.com/lapce/lapce/issues/281
Nor vim nor emacs for that matter.
By that logic wasn't the "killer feature" of VSCode just "something like Atom but in Typescript and faster and slicker"?
I've tried Lite XL and CudeText and they are both hard to set up and fall far short of Kate and Lapce in terms of UI.
Is it just because it's not free? I bought it, and it has been my most used piece of software by far.
The first code editor I ever got any real use out of was vscode. Which until recently was perfect (some feature regressions and issues with crashing.) At this point the last thing I want to do is depend on a proprietary editor.
Also I can't jump to my jumped-from point when pressing "go to definition" via Ctrl+T when using vim bindings.
Oh, does it means that it's moving back to wgpu after its earlier switch to OpenGL? Does it means that the problems that were encountered earlier with wgpu has been resolved?
> Lapce (IPA: /læps/) is written in pure Rust with a UI in Floem. It is designed with Rope Science from the Xi-Editor which makes for lightning-fast computation, and leverages Wgpu for rendering.
So I think it's reasonable to conclude that they did move back.
https://github.com/lapce/lapce/issues/2244
https://github.com/lapce/lapce/issues/1094
So while it isn't claiming to be ready, their content does not tell otherwise. Yes, the version is 0.3, but Neovim is at 0.9.
I would argue that that's a fault on neovim's side; I'm sure there's a reason, but I would call it 1.x software.
duck and run
That would be nice but in reality it's such a tricky and subtle problem that nobody does it perfectly. All the operating systems and browsers are buggy in different ways, nevermind anything with smaller budgets. The deeper you get into proper text handling, the more you will realize that nobody has solved it.
It's certainly an issue, especially for non-English users, but it doesn't "disqualify the whole project"; it just means that's not what they're prioritising at this time.
It's unusable, because it distracts on almost every keypress with popups, type hints, and additional characters inserted. Sometimes, these popups even block the CODE I working on. It similar to browsing without an ad-blocker.
I want a helpful and predictable editor, not a kaleidoscope. I don't want to think "hey, what happened?" after a key press.
I realise this is tangential to the subject but I think it bears repeating: respect the user.
Edit: I just looked at the project's main website and the auto help provided half way through typing "self" which they are obviously very proud of looks like my worst nightmare. A few weekends back I did some "unplugged" C programming just with Notepad++ rather than Visual Studio and honestly I felt it was a key step to overcoming the migraine issues I've been having lately.