AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing AhoyISki/duat in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewduat Duat is a text editor with sane defaults, while still having an incredible amount of modularity, to the point where you can replace pretty much anything. It is written *and configured* in Rust, through the use of a config crate. The configuration can then be reloaded without closing Duat, by being recompiled as requested. I know that Rust isn’t *really* a scripting language, but I’ve worked really hard to make this API intuitive to use, whilst still maintaining all the safety and expressiveness that Rust is known for. Rust is also known for long compile times, but for Duat, I’ve managed to reduce the vast majority of reloads to under ~1.3 seconds, with a large chunk taking less than 800 ms (on my relatively old mid range laptop). Do keep in mind that this is a work in progress, so there might be bugs. Any feedback on features, bugs or requests is highly appreciated 🥰. Installation To install Duat, I am assuming that you have installed on your system, if you don’t, [install it][__link0]. If you are installing it on Windows, you should additionlly follow the instructions that they give you for installing C/C++ libraries through Visual Studio. Note On this section, I will be referring to duat’s configuration by , but you should replace it with your operating system’s config path. The same also applies to . Next, in order to run duat, you should add to your variable. Alternatively, you can just add , if you want to add just to the . Now, you can install duat: That is the recommended version, however, if you wish to install the *bleeding edge* version, you can call this instead: Configuration When you first run , you will be prompted for the creation of a new configuration crate in (unless it already exists). In the configuration’s , there should be a macro, which takes in a function with no parameters. This function is the setup for duat, and it can be empty, which is the equivalent of the default configuration for Duat. Here’s an example configuration buffer, which makes use of the crate, which is a plugin for Duat. This plugin, like all others, is included without the prefix, so in the config it is just . This configuration does the following things: • [Maps][__link1] jk to esc in the mode; • Sets [options][__link2] for the , and • [Adds][__link3] hooks for [mode changes][__link4] in Duat, which change the shape of the cursor; • [Changes][__link5] the [style][__link6] of the mode printed on the status line; These are only some of the options available to configure Duat, you can also add [custom commands][__link7], place widgets around other [ ][__link8]s and [windows][__link9], create [parser][__link10]s that can track every change on a [ ][__link11], and many other things. Duat also comes with a fully fledged [text creation system][__link12], which significantly eases the creation of highly formatted text: In the example above, will change the style of the text to the [ ][__link13], while will place a [spacer][__link14] in between the two parts of the text (See the status line in the GIF, it uses spacers). This macro works very similarly to the [ ][__link15] family of macros, so you also have inlining, as you can see with the part. All of this is, of course, checked at compile time. Troubleshooting These issues asume that you are working with the version of The configuration fails to compile/recompile Try running the following: This will update all dependencies of the config, potentially solving compatibility issues. The problem may also be with some plugin you installed. It’s segfaulting as I reopen! This is an indication that your installed version of duat became incompatible with that of your config. Rerun the installation process and call . Builtin plugins Duat comes with the following built-in plugins, which I will later on add the ability to disable: • [ ][__link16] is the default mode for editing in Duat. It is heavily inspired by the Kakoune text editor in its design, with some light differences. • [ ][__link17] brings [tree-sitter][__link18] to Duat in the form of syntax highlighting and indentation calculation, which can be used by Modes (such as those from ) in order to give better feedback when editing buffers. • [ ][__link19] adds matched parentheses highlighting to duat. Has some ntegration with . • [ ][__link20] adds all of the default plugins that you see, like the line numbers, status line, prompt line, etc. Features Duat provides a lot of features, trying to be as configurable as possible, here are some of the things that Duat is capable of: • Completely custom modes, with full Vim style remapping; • Completely custom widgets, with user created modes; • Arbitrary concealment of text, and arbitrary ghost text; • Custom hooks, whose activation is up to the creator; • Custom commands, with customizable parameters supported by; Rust’s robust type system; • Multi UI adaptability, although for now, only a terminal UI has been made; • And many others still being planned; Additionally, by choosing Rust as its configuration language, Duat also gains the following features: • Complete type safety; • A very functional programming language, with lots of native features; • Cargo is the plugin manager; Roadmap These are the goals that have been accomplished or are on their way: • [x] Implement basic visual functionality (printing, scrolling, etc); • [x] Implement wrapping; • [x] Implement editing; • [x] Create a kak mode; • [x] Implement the use of multiple cursors; • [x] Implement a history system; • [x] Implement colors; • [x] Implement widgets and designated areas; • [x] Make all of these things easy to use on a public interface; • [x] Create a number line and a separator line; • [x] Create a status line; • [x] Buffer switching; • [x] Create a command creation interface and a command line; • [x] Add the ability to frame areas; • [x] Implement concealment; • [x] Implement hot reloading of configuration; • [x] Create a “nor…