Lightning-fast and Powerful Code Editor written in Rust

Related tags

Text editors lapce


Lightning-fast and Powerful Code Editor written in Rust


Lapce is written in pure Rust, with UI in Druid. It's using Xi-Editor's Rope Science for text editing, and using Wgpu for rendering.


  • Modal Editing (Vim like) support as first class citizen (can be turned off as well)
  • Built in LSP support
  • Built in remote development support (inspired by VSCode Remote Development)
  • Plugin can be written in programming languages that can compile to WASI (C, Rust, AssemblyScript)
  • Built in terminal
  • Plugin Support

    Plugin Support

    The next major thing for Lapce is plugin support. The plugin system is a critical part of a good code editor. We'd like Lapce's plugin API to be as flexible as possible.

    To start with, it would be helpful to know, what plugin you desperately need as a user, or what plugin API you would like as a potential Lapce plugin author, so that we can start to implement something that's immediately useful.

    Feel free to leave comments below for plugins(/APIs) you'd like. A link to a plugin in a different code editor would be fine.

    opened by dzhou121 28
  • Lapce is not Opening Macbook Air M1

    Lapce is not Opening Macbook Air M1

    Lapce Version

    V 0.2.0

    The Lapce version you are using, which can be found in "About Lapce" at the top right settings icon.

    System information

    Macbook Air M1

    the operating system used, including its version, e.g. Windows 10, Ubuntu 18.04

    Describe the bug

    i'm using Lapce many hours to in my project after i close and tried to run again it's not opening, i don't know, and system doesn't give any response.

    P-macos A-ui C-crash 💥 
    opened by abdorizak 23
  • DPI/display scaling

    DPI/display scaling

    Seems like Lapce isn't handling a different display scale than 1.0 very well (at least on macOS):

    1. Resizing the window leaves only a small viewport in the corner, the rest of the window does not get redrawn at all.
    2. Line spacing is off, especially noticeable with box drawing characters like what nushell uses to draw its tables.
    C-bug A-ui 
    opened by jansol 22
  • [Linux] Failing to start with

    [Linux] Failing to start with "thread 'main' panicked"

    OS: Arch Linux

    Rust version:

    $ rustc -V
    rustc 1.57.0 (f1edd0429 2021-11-29)


    $ rustup toolchain list
    stable-x86_64-unknown-linux-gnu (default)


    5059101 - (HEAD -> master, tag: v0.0.1, origin/master, origin/HEAD) undo redo jump improvement (2021-12-01 11:43:38) <Dongdong Zhou>


    $ RUST_BACKTRACE=1 target/release/lapce
    start to watch path "/home/<name>/.config/lapce/settings.toml"
    2021-12-14T11:12:57.482224Z DEBUG druid::localization: available locales [], current en-US
    2021-12-14T11:12:57.482276Z DEBUG druid::localization: resolved: [en-US]
    thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NotSupported', /home/<name>/.cargo/git/checkouts/druid-f6980810fb848923/c42de0b/druid/src/
    stack backtrace:
       0: rust_begin_unwind
                 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/
       1: core::panicking::panic_fmt
                 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/
       2: core::result::unwrap_failed
                 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/
       3: druid::window::Window<T>::new
       4: druid::win_handler::AppState<T>::build_native_window
       5: druid::app::AppLauncher<T>::launch
       6: lapce_core::app::lanuch
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    palette update process stopped
    buffer update process stopped
    opened by channelbeta 21
  • Golang Support

    Golang Support

    This is a new version of the Golang support PR, up to date and cleaner than the old #385, as discussed with @dzhou121. Here is a paste of the previous PR message:


    This PR pushes the LSP client to a state where the Golang LSP server (gopls) is usable. While lapce might be missing plenty of capabilities (some of which might already be implemented and wirable), the goal of this PR is not to fill this gap but to make sure the base client is robust enough for any LSP server to run without any primary issues.

    This PR should allow starting proper work on #365 and #374, and any other LSP server support.

    Note: A very basic and hacky gopls plugin can be found here for the time being.

    closes #365


    • [X] Implement response on window/workDoneProgress/create request (Blocking "handshake" for gopls)
    • [X] Fix EditDocument error on gopls edit suggestion following a textDocument/completion request
    • [X] Fix lowercased suggestion on ui
    • [X] Implement env passing for wasi runtime
    • [x] Fix misplaced error marker

    How to test

      # link the plugin folder to lapce plugin directory
      ln -s $PWD ~/.lapce/plugins/lapce-go
      #  build the actual wasm binary
      cargo wasi build && cp target/wasm32-wasi/debug/lapce-go.rustc.wasm lapce-go.wasm 
    • Lapce should be able to launch the plugin without any issue. To confirm, look for the output of lapce. if "Starting lapce-go plugin!" appears, the plugin is working.
    C-feature A-lsp 
    opened by nheuillet 19
  • Drawing text only paints bounding boxes

    Drawing text only paints bounding boxes

    Since this commit 4abb0faf0a0b8eae1919d8f34ac92643f3de35bc that switched to opengl backend.

    Tested the debug build. Didn't have time for release build.

    It compiles but almost all text become "blocks" in the UI, like below:

    Screen Shot 2022-04-22 at 15 23 23

    The machine info:

    Screen Shot 2022-04-22 at 15 26 47 C-bug A-ui 
    opened by zhaojiangbin 19
  • latest Linux release (0.0.10) is just a blank window on Fedora 35

    latest Linux release (0.0.10) is just a blank window on Fedora 35

    Downloaded 0.0.10 from on to my workstation.

    Fedora 35 AMD Ryzen 5 3600 AMD Radeon RX 570

    but when run it's just an empty window:


    I ran it from terminal to see if there was an logging on standard out but nothing there.

    C-bug P-linux A-ui Dependency has workaround 
    opened by SingingBush 19
  • Feature/run code action

    Feature/run code action

    Hey guys! (@MinusGix) This PR is a followup on issue #603

    I created a draft PR in order for us to have some grounds to discuss and make progress - The current work is by all means WIP.

    ~Another important note - since my previous pr (#615) is not yet merged, I started to work from my branch - so it contains the changes from the previous branch as well. I'm really sorry for the inconvenience, but once #615 will be merged I'll re-arrange this PR / open a new one. In the meanwhile - please take a look at the last commit in this PR.~

    Edit (June 20th): I rebased from master so the mess is gone 🙂 (still a wip, no code changed)

    Now that the technical notes are said, let me lay out my current work:

    1. I created a new LSP request to textDocument/codeLens
    2. I added a command with prefix $ to the palette, which queries the LSP for code lens and presents all possible runnable commands for the current file: image The debug prints at this point show the raw command returned from the LSP.

    Note This LSP request works for every runnable entry point in the file, including fn main() for example: image

    1. I created a hook for when a runnable from the above palette is being chosen, which currently does nothing but debugging the command:
    Running command: Command { title: "▶\u{fe0e} Run Tests", command: "rust-analyzer.runSingle", arguments: Some([Object({"args": Object({"cargoArgs": Array([String("test"), String("--package"), String("lapce-core"), String("--lib")]), "cargoExtraArgs": Array([]), "executableArgs": Array([String("syntax::tests"), String("--nocapture")]), "overrideCargo": Null, "workspaceRoot": String("/home/yoni/lapce")}), "kind": String("cargo"), "label": String("test-mod syntax::tests"), "location": Object({"targetRange": Object({"end": Object({"character": Number(1), "line": Number(475)}), "start": Object({"character": Number(0), "line": Number(439)})}), "targetSelectionRange": Object({"end": Object({"character": Number(9), "line": Number(440)}), "start": Object({"character": Number(4), "line": Number(440)})}), "targetUri": String("file:///home/yoni/lapce/lapce-core/src/")})})]) }

    Next steps and open questions

    1. Decide on the UX / DX (developer experience) of this feature - I prefer to have a green arrow near each runnable entry (like JetBrains) i. If we do decide on this UX, It'd be nice if you guys could suggest some relevant code references etc. on how to implement it, because to be frank I kinda got lost a bit there 😅 ii. Another option is to move forward with the palette option, just make it a bit more user friendly (with icons etc.) iii. A third option is to join the party over the CodeActions area ( - the light bulb thingy) - and just add a Run test command there when relevant.
    2. Implement running the command itself - There's an LSP request for this as well, just need to pass the data all the way back through the proxy and all...

    Looking forward to hearing from you guys, please lmk how do you find the current progress and what you think about the next steps!

    opened by yonip23 18
  • App failed on start

    App failed on start


    Running `target/debug/lapce`
    start to watch path "/home/balrog/.config/lapce/settings.toml"
    palette update process stopped
    buffer update process stopped
    thread 'main' panicked at 'launch failed: WindowDropped', core/src/

    OS: ArchLinux WM: Sway Lapce: build from source, commit a61d3b2966f4634ebad6b639692cffd0536d99c0

    C-bug P-linux A-ui Dependency 
    opened by balroggg 17
  • Segmentation fault (core dumped)

    Segmentation fault (core dumped)

    I'm trying to run the executable file but it does not launch so tries lapce -w and it says " Segmentation fault (core dumped)_"

    I'm on Zorin OS 16.1 Intel Pentium(R) Dual-Core CPU E5800 @ 3.20GHz × 2 4gb ram kernel version: 5.15.0-46-generic

    C-bug duplicate 
    opened by Frusasoft-frusadev 16
  • Add support for a Python language server

    Add support for a Python language server

    Is the LSP (and plugin) support at a good point to add additional language servers? I've been looking at lapce-rust, and was wondering if that is the right place to start. I think VSCode is using pylance.

    C-feature A-lsp C-better-as-plugin 
    opened by superlou 15
  • Implement dropdown widget; Use dropdown widget for settings

    Implement dropdown widget; Use dropdown widget for settings

    • [x] Added an entry to if this change could be valuable to users

    This PR adds a mostly-general-purpose dropdown widget. It also uses it within the settings UI for the Color Theme and Icon Theme settings.

    This impl has some problems

    • Rather than floating above widgets under it, like a dropdown does in basically all applications, it just displays the list. So it just expands the containing widget, like in the screenshot above.
    • I have a implementation which uses subwindows instead, but I was facing an issue of the data seemingly not being properly synchronized? Also, on my system, the subwindows (after a recent system update??) started appearing only in the top-left corner - but worked on other systems.
    • They don't close when clicking outside of them.
    • Don't update until you close and reopen settings, but that's a general settings thing and should probably just be handled whenever we do something to make settings update automatically even while still open.

    However, I think this still an improvement on the original case of having to type the theme name manually.

    opened by MinusGix 1
  • Opening multiple files from CLI is broken

    Opening multiple files from CLI is broken

    Lapce Version


    System information

    macOS 13.1

    Describe the bug

    • Open multiple files from CLI with single command
    • Close one of the file tabs
    • Lapce crashes
    C-bug A-editor A-cli 
    opened by panekj 0
  • the Emacs Keybindings?

    the Emacs Keybindings?

    Is your feature request related to a problem? Please describe.

    I've been using emacs for a long time, I'm used to its hotkeys, but in the lapce I can't set up the keys the way I want, because:

    • I can't change Ctrl-N and Ctrl-P to next and previous line
    • I can't change Ctrl-SPC to start selection
    • I can't change Ctrl-k to delete line

    I think these are the main aspects necessary for

    Describe the solution you'd like

    Add support for Emacs-like layouts as for modal editing (vim).

    Describe alternatives you've considered

    Or, just add the ability to change key bindings to commands like next-line or previous-line

    C-feature A-keymap 
    opened by semenInRussia 0
  • Add option to display battery status and clock in status line

    Add option to display battery status and clock in status line

    Is your feature request related to a problem? Please describe.

    I mostly code on a laptop and prefer to spend hours with the code editor being fullscreen. There are therefore no information about battery and clock!

    Describe the solution you'd like

    It would be great to have a very simple info in the status line like "69% 4:20pm". Of course, both battery and time could be independently optional.

    Describe alternatives you've considered

    I do not know if it's best implemented as a plugin or as a core feature.

    Additional context

    On the Mac platform, battery is best implemented using notify as described in Zameer Manji blog.

    opened by malmod 0
TIF is a terminal_image_format. (theres no TIF editor, so i made TIF images through a hex editor lol)

Colors these are the colors you can use when displaying images on the terminal BYTES: 5A = BLUE 5B = BLACK 5C = RED 5D = GREEN 5E = PURPLE 5F = WHITE

buzz 5 Dec 23, 2022
A text editor in ≤1024 lines of code, written in Rust

Kibi: A text editor in ≤1024 lines of code, written in Rust A configurable text editor with UTF-8 support, incremental search, syntax highlighting, li

Ilaï Deutel 881 Dec 29, 2022
Rustpad is an efficient and minimal collaborative code editor, self-hosted, no database required

Rustpad is an efficient and minimal open-source collaborative text editor based on the operational transformation algorithm

Eric Zhang 2.5k Dec 31, 2022
My own personal code editor built with Rust + OpenGL

Glyph This is my personal code editor that I am building for fun and to get more familiar with OpenGL. Glyph currently supports Vim keybinds, syntax h

Zack Radisic 83 Dec 23, 2022
An opinionated modal editor to simplify code editing from the terminal

(I'm currently refactoring the platform layer. So we have to first finish this cleanup before we're able to continue adding features) An opinionated m

Matheus Lessa Rodrigues 284 Jan 5, 2023
A package manager for the Lite-XL code editor

Lite-XL Package Manager (lpm) (Under Development) lpm is an attempt to create a package manager for the Lite-XL code editor. It's primary goal is to p

Debarchito Nath 12 Dec 11, 2022
A pathtracer written in rust - runs in the web and includes an editor

Webtracer A pathtracer written in rust - runs in the web and includes an editor Rendering is parallelized and utilizes all cpu cores You can easily ed

Shapur 5 Oct 7, 2022
A terminal-based text editor written in Rust

Iota Iota is a terminal-based text-editor written in Rust. Here's what it looks like right now, editing itself. Motivation Iota was born out of my fru

Greg Chapple 1.6k Jan 8, 2023
A modern editor with a backend written in Rust.

Xi Editor (pronounced "Zigh") A modern editor with a backend written in Rust. Maintenance status: The xi-editor project is not currently under active

null 19.7k Jan 5, 2023
Web base text editor written in rust

Ultron Ultron is a web based monospace text-editor with syntax highlighting, completely written in rust. I wrote this code editor for my very specific

Jovansonlee Cesar 59 Aug 8, 2022
A collision editor for Guilty Gear -Strive-, written in Rust

ggst_collision_editor_rs A collision editor for Guilty Gear -Strive- and other Team Red Arc System Works games, written in Rust. Uses a customized ver

null 4 May 3, 2022
Helix - A kakoune / neovim inspired editor, written in Rust

A kakoune / neovim inspired editor, written in Rust. The editing model is very heavily based on kakoune; during development I found myself agree

null 17.9k Jan 10, 2023
Borderlands 3 Save/Profile Editor for Windows/MacOS and Linux!

Borderlands 3 Save Editor A tool to help you modify your Borderlands 3 Saves and Profiles. Currently it runs on Windows, Mac OS and Linux. It supports

Zak 195 Jan 4, 2023
An independent Rust text editor that runs in your terminal!

Ox editor Ox is a code editor that runs in your terminal. About The Project Ox is a code editor. It was written in Rust using ANSI escape sequences. I

null 2.9k Jan 2, 2023
Rust-based traffic editor for RMF

Traffic Editor III Welcome to Traffic Editor III. install stuff Unfortunately we need a newer Rust than what comes with Ubuntu 20.04. First make sure

null 2 Oct 20, 2022
A simple terminal-based editor made in rust!

ELuna Editor The terminal-based editor for europa lang. Goals Be as minimal as possible, but retain conveniences found in other editors. Do not add fe

Junhao 3 May 25, 2022
Ginkgo is a text editor built entirely in Rust

Ginkgo is a text editor built entirely in Rust. It supports cursor movements, CTRL commands, select vim commands, insert vs. normal modes, and more. Ginkgo is based on my text editor JED, which itself was based on the popular online editor Kilo.

James Asbury 12 Oct 15, 2022
Aspiring vim-like text editor

Rim Rim is an aspiring Vim-like text editor written in Rust. Current state Rim is in an early prototype stage. This means that you can load, edit and

Mathias Hällman 557 Jan 2, 2023
An experimental next-generation Electron-based text editor

Attention: GitHub has decided not to move forward with any aspect of this project. We'll archive the repository in case anybody finds value here, but

Atom Archive 8.5k Dec 26, 2022