Live data from Hacker News

Lite XL: A lightweight text editor written in C and Lua

lite-xl.com

21–30 of 151 posts

Re: Lite XL: A lightweight text editor written in C and Lua

#22
post #19

Is there a lightweight/fast editor that has native support for LSP? Is it even feasible to have a "native LSP editor" that doesn't rely on a plugin system, or is LSP so open-ended that you're always going to need some scripted support in the editor to make a particular language server work well? I'm thinking something akin to nvi or nano with LSP features added on.

You might want to check the helix editor. It has LSP support out of the box.

Re: Lite XL: A lightweight text editor written in C and Lua

#24
post #21

I like it, very fast, but it has some issue with idle CPU usage on my M1. It stays at 70% on idle whereas sublime at 0.0% when not used, opening the same project.

Looks like it's a known issue: https://github.com/lite-xl/lite-xl/issues/1237

Maybe try 2.2 when it comes out?

Re: Lite XL: A lightweight text editor written in C and Lua

#25
Uses SDL for rendering the UI. While it makes it work cross-platform it unfortunately means it won't look like a native application. Then again, I don't think there's a C library which provides cross-platform native UI, only the Lazarus toolkit for Free Pascal and WxWidgets for C++.

Re: Lite XL: A lightweight text editor written in C and Lua

#26
Can someone suggest an editor for macOS with smart text algorithms to allow work on unlimited file size or line length? I need to view unlimited text, switch between encodings (including hex) and I want editor with proper algorithms, so it'll work instantly and without loading entire file in the memory. Should support search with fast regex engine.

Editing would be nice too. I imagine editing as a sequence of actions that editor remembers and can undo/redo (including search/replace) and saving is actually applying that sequence of actions to the original file in some smart way.

Also I want it to start instantly, so I can use it as my general text file editor.

Colours, autocompletions and other nonsense is strictly not needed. Just black text on white background.

All those editors just die when I'm trying to edit a simple file of several hundreds GBs with lines of several GBs.

Re: Lite XL: A lightweight text editor written in C and Lua

#27

What GUI Library does the editor use?

Last time I looked it was simple software rendering on an SDL windows. As simple as it goes. I was impressed by how fast it was given that software rendering should be quite slow, but these days CPU are so powerful that this might not be a problem A simple OpenGL renderer could be added with minimal efforts I think.

But if OpenGL was used, wouldn't that have to go through Zink and MoltenVK for Apple? Or is there a Zink-like OpenGL wrapper for Metal?

Re: Lite XL: A lightweight text editor written in C and Lua

#28
post #18
post #6

The aim of Lite XL compared to lite is to be more user friendly, improve the quality of font rendering, and reduce CPU usage. Plug-ins are not necessarily compatible

The plugin system is a disaster in this project. Basically, each "plugin" is just a Lua script that can (and often does) modify absolutely anything in the editor, including core data structures and other plugins. The original Lite was an exercise in creating a minimal editor, which I think succeeded. This project tries to take that base and expand it to add a ton of features, but doesn't re-architect it to support th…

I'm not sure it's a bad thing that anything can be modified in Lua. One of the main reasons Emacs is so powerful is because almost anything can be customized in elisp. I haven't used Lite XL and this is just an uninformed general opinion.

Re: Lite XL: A lightweight text editor written in C and Lua

#29
post #25

Uses SDL for rendering the UI. While it makes it work cross-platform it unfortunately means it won't look like a native application. Then again, I don't think there's a C library which provides cross-platform native UI, only the Lazarus toolkit for Free Pascal and WxWidgets for C++.

I wonder if people actually remember how native apps are supposed to look like on any of the major platforms… Mac users, maybe. For all other platforms, churn and barely contained web apps are really wreaking havoc on the benefit of a uniform look and – most importantly – feel.

Re: Lite XL: A lightweight text editor written in C and Lua

#30
post #7
post #4

for Windows, Linux and Mac OS Derivative of lite editor Plugins Lightweight: We are currently around 3MB in size and takes about 10MB in RAM (can be lower). The whole thing is just Lua running on a rendering engine.

> What does lightweight mean? It would traditionally mean a program running as little code as possible (dependencies included) for a given task, instead of relying on piles of pre-made libraries and frameworks, which obviously creep way more features than required. However in this day and age, lightweight usually means it's not based on a web engine, although quite often it could still be huge and needlessly complex.…

Sorry for the edit. I found their definition of lightweight and added that
Post reply on HN