Total Pageviews

Monday, 29 May 2023

代码编辑器-Lapce



Lapce是一款开源的轻量级代码编辑器:支持 Windows、Linux、macOS 等主流桌面系统。拥有类似 Vim 的模态编辑功能,支持代码自动补全、诊断,并内置了远程开发模式、命令行终端等功能。基于Rust 构建,遵守Apache 2.0开源协议。

功能特色:
    命令面板(快速操作)。
    自定义用户界面字体、标题高度、字体阴影、滚动宽度等。
    内置终端。
    类似 Vim 的模态编辑。
    支持连接到远程服务器。
    代码语法高亮,代码补全。
    插件系统(可使用C, Rust, AssemblyScript 编写插件)。
    深色/浅色模式。

源代码:https://github.com/lapce/lapce

https://github.com/lapce/lapce/releases/download/nightly/Lapce-windows-portable.zip

-----------------------------------------------

Lightning-fast and Powerful Code Editor written in Rust

lapce.dev

Lapce

Lightning-fast And Powerful Code Editor

Lapce (IPA: /læps/) is written in pure Rust with a UI in Druid (which is also written in Rust). It is designed with Rope Science from the Xi-Editor which makes for lightning-fast computation, and leverages OpenGL for rendering. More information about the features of Lapce can be found on the main website and user documentation can be found on GitBook.

Features

  • Built-in LSP (Language Server Protocol) support to give you intelligent code features such as: completion, diagnostics and code actions
  • Modal editing support as first class citizen (Vim-like, and toggleable)
  • Built-in remote development support inspired by VSCode Remote Development. Enjoy the benefits of a "local" experience, and seamlessly gain the full power of a remote system.
  • Plugins can be written in programming languages that can compile to the WASI format (C, Rust, AssemblyScript)
  • Built-in terminal, so you can execute commands in your workspace, without leaving Lapce.

Installation

You can find pre-built releases for Windows, Linux and macOS here, or installing with a package manager. If you'd like to compile from source, you can find the guide.

from https://github.com/lapce/lapce

----------------------------------------------

Building from source

It is easy to build Lapce from source on a GNU/Linux distribution. Cargo handles the build process, all you need to do, is ensure the correct dependencies are installed.

  1. Install the Rust compiler and Cargo using rustup.rs. If you already have the toolchain, ensure you are using version 1.64 or higher.

  2. Install dependencies for your operating system:

Ubuntu

sudo apt install cmake pkg-config libfontconfig-dev libgtk-3-dev g++

Fedora

sudo dnf install gcc-c++ perl-FindBin perl-File-Compare gtk3-devel
  1. Clone this repository (this command will clone to your home directory):
git clone https://github.com/lapce/lapce.git ~/lapce
  1. cd into the repository, and run the build command with the release flag
cd ~/lapce
cargo build --release

If you use a different distribution, and are having trouble finding appropriate dependencies, let us know in an issue!

Once Lapce is compiled, the executable will be available in target/release/lapce.

from https://github.com/lapce/lapce/blob/master/docs/building-from-source.md

-------------------------------------------------------------------------------------------

Installation With Package Manager

Arch Linux

There is an community package that can be installed with pacman:

sudo pacman -Syu lapce

Fedora

sudo dnf copr enable titaniumtown/lapce
sudo dnf install lapce

Flatpak

Lapce is available as a flatpak here

flatpak install flathub dev.lapce.lapce

Gentoo

Lapce is available in Gentoos user repository GURU. If the GURU is not activated, it can be with:

emerge --ask app-eselect/eselect-repository # install eselect repository
eselect repository enable guru 
emaint sync -r guru

After activating and syncing the GURU repository, lapce can be installed with

emerge app-editors/lapce

Homebrew

brew install lapce

nixpkgs

You can find the packages here:

# try with nix-shell
nix-shell -p lapce

# on NixOS
nix-env -iA nixos.lapce

# on non-NixOS installs, including macOS
nix-env -iA nixpkgs.lapce

# only if nix.settings.experimental-features is set to both "nix-command" and "flakes"
# WARNING: THIS BREAKS nix-env, PROCEED AT YOUR OWN RISK. THIS ALSO INSTALLS FROM UNSTABLE BRANCH.
nix profile install nixpkgs#hello

Scoop

scoop install lapce

winget

You can find the packages here:

winget install lapce
from https://github.com/lapce/lapce/blob/master/docs/installing-with-package-manager.md 

 

 

 

 

 

 

 

No comments:

Post a Comment