AI prompts
base on A modern editor with a backend written in Rust. # Xi editor
***Maintenance status:*** *The xi-editor project is currently discontinued. Although we will happily accept bug fixes, no new features are currently planned. You may be interested in [the Lapce editor](https://github.com/lapce/lapce), which can be considered a spiritual successor to the xi-editor.
— The Editors
***Note:*** *This repo contains only the editor core, which is not usable on its own. For editors based on it, check out the list in [Frontends](#frontends).*
The xi-editor project is an attempt to build a high quality text editor,
using modern software engineering techniques. It is initially built for
macOS, using Cocoa for the user interface. There are also frontends for
other operating systems available from third-party developers.
Goals include:
* ***Incredibly high performance***. All editing operations should commit and paint
in under 16ms. The editor should never make you wait for anything.
* ***Beauty***. The editor should fit well on a modern desktop, and not look like a
throwback from the ’80s or ’90s. Text drawing should be done with the best
technology available (Core Text on Mac, DirectWrite on Windows, etc.), and
support Unicode fully.
* ***Reliability***. Crashing, hanging, or losing work should never happen.
* ***Developer friendliness***. It should be easy to customize xi editor, whether
by adding plug-ins or hacking on the core.
**Learn more** with the creator of Xi, Raph Levien, in this [Recurse Center Localhost talk](https://www.recurse.com/events/localhost-raph-levien
).
Screenshot:
![xi-mac screenshot](/docs/docs/img/xi-mac-screenshot.png?raw=true)
## Getting started
This repository is the core only. You'll also need a front-end, from the list
below.
### Building the core
Xi-editor targets 'recent stable Rust'. We recommend installing via [rustup](https://www.rustup.rs).
The current minimum supported version is 1.40.
To build the xi-editor core from the root directory of this repo:
```
> cd rust
> cargo build
```
## Frontends
Here are some front-ends in various stages of development:
* [xi-mac](https://github.com/xi-editor/xi-mac), the official macOS front-end.
* [xi-gtk](https://github.com/eyelash/xi-gtk), a GTK+ front-end.
* [xi-term](https://github.com/xi-frontend/xi-term), a text UI.
* [xi-electron](https://github.com/acheronfail/xi-electron), a cross-platform front-end based on web-technologies.
* [Tau](https://gitlab.gnome.org/World/Tau), a GTK+ front-end written in Rust. Forked from https://github.com/bvinc/gxi, which was abandoned.
* [xi-win](https://github.com/xi-editor/xi-win), an experimental Windows front-end written in Rust.
* [kod](https://github.com/linde12/kod), a terminal frontend written in Golang.
* [xi-qt](https://github.com/sw5cc/xi-qt), a Qt front-end.
* [vixi](https://github.com/Peltoche/vixi), a Vim like front-end in Rust.
The following are currently inactive, based on earlier versions of the front-end
protocol, but perhaps could be revitalized:
* [xi_glium](https://github.com/potocpav/xi_glium), an
experimental GL-based front-end in Rust.
* [XiEditorVS2015](https://github.com/Sineaggi/XiEditorVS2015), C#.
* [xi-android](https://github.com/adrientetar/xi-android), an Android frontend.
There are notes (I wouldn’t call it
documentation at this point) on the protocol at
[frontend.md](https://xi-editor.github.io/xi-editor/docs/frontend-protocol.html). If you're working on a front-end, feel free to
send a PR to add it to the above list.
## Design decisions
Here are some of the design decisions, and motivation why they should
contribute to the above goals:
* ***Separation into front-end and back-end modules***. The front-end is responsible for presenting the user interface and
drawing a screen full of text. The back-end (also known as “core”) holds the file buffers and is
responsible for all potentially expensive editing operations.
* ***Native UI***. Cross-platform UI toolkits never look and feel quite right. The
best technology for building a UI is the native framework of the platform.
On Mac, that’s Cocoa.
* ***Rust***. The back-end needs to be extremely performant. In particular, it
should use little more memory than the buffers being edited. That level of
performance is possible in C++, but Rust offers a much more reliable, and
in many ways, higher level programming platform.
* ***A persistent rope data structure***. Persistent ropes are efficient even for
very large files. In addition, they present a simple interface to their
clients - conceptually, they're a sequence of characters just like a string,
and the client need not be aware of any internal structure.
* ***Asynchronous operations***. The editor should never, ever block and prevent the
user from getting their work done. For example, autosave will spawn a
thread with a snapshot of the current editor buffer (the persistent rope
data structure is copy-on-write so this operation is nearly free), which can
then proceed to write out to disk at its leisure, while the buffer is still
fully editable.
* ***Plug-ins over scripting***. Most text editors have an associated scripting
language for extending functionality. However, these languages are usually
both more arcane and less powerful than “real” languages. The xi editor will
communicate with plugins through pipes, letting them be written in any
language, and making it easier to integrate with other systems such as
version control, deeper static analyzers of code, etc.
* ***JSON***. The protocol for front-end / back-end communication, as well as
between the back-end and plug-ins, is based on simple JSON messages. I
considered binary formats, but the actual improvement in performance would
be completely in the noise. Using JSON considerably lowers friction for
developing plug-ins, as it’s available out of the box for most modern
languages, and there are plenty of the libraries available for the other
ones.
## Current status
This is still a project in its early stages. The Mac build has basic editing
functionality (it was used to write this README), but looks very spare and
is still missing essentials such as auto-indent. At the moment, it’s expected
that its main community will be developers interested in hacking on a text
editor.
## Authors
The xi-editor project was started by Raph Levien but has since received
contributions from a number of other people. See the [AUTHORS](AUTHORS)
file for details.
## License
This project is licensed under the Apache 2 [license](LICENSE).
## Contributions
We gladly accept contributions via GitHub pull requests. Please see
[CONTRIBUTING.md](.github/CONTRIBUTING.md) for more details.
If you are interested in contributing but not sure where to start, there is an
active Zulip channel at #xi-editor on https://xi.zulipchat.com. There is also
a #xi channel on irc.mozilla.org. Finally, there is a subreddit at
[/r/xi_editor](https://www.reddit.com/r/xi_editor/).
", Assign "at most 3 tags" to the expected json: {"id":"4082","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"