Commit Graph

205 Commits

Author SHA1 Message Date
Benedikt Peetz 3a65c33b15
feat(trixy-lang_parser): Add first parser pass 2023-12-18 18:04:21 +01:00
Benedikt Peetz 74efd3eda6
chore(flake): Remove `rust-analyzer` from the devshell
Things like language servers should be handled by the developer's
editor.
2023-12-16 11:47:51 +01:00
Benedikt Peetz 5713c90445
test(flake): Add the cargo test to the `nix flake check` tests 2023-12-16 11:47:21 +01:00
Benedikt Peetz 53862a0f65
build(flake): Switch rust version back to stable 2023-12-16 11:47:02 +01:00
Benedikt Peetz 616cb4274f
fix(config/lua): Add a warning, that exiting with <C-c> is not supported 2023-12-16 11:46:10 +01:00
Benedikt Peetz 3da75f6913
feat(trixy-lang_parser): Add a lexer with error handling for trixy code 2023-12-16 11:45:23 +01:00
Benedikt Peetz cd2dbc516a
chore(trixy): Rename `language_macros` to `trixy`
The motivation behind this change is to comply with the naming scheme:
starting crate names with `tri`
2023-12-16 11:45:12 +01:00
Benedikt Peetz 44a1ad77ea
build(treewide): Update 2023-12-14 15:33:56 +01:00
Benedikt Peetz 37a0834aa0
build(flake): Use the minimal rust distribution for builds 2023-11-07 20:48:06 +01:00
Benedikt Peetz ebd3b0d476
build(treewide): Update 2023-11-07 20:47:49 +01:00
Benedikt Peetz 23ec51cec2
build(update.sh): Make adding subcrates easier 2023-11-07 20:46:18 +01:00
Benedikt Peetz 2eb6b12bd7
refactor(core): Use the new `keymaps` crate 2023-11-07 20:27:06 +01:00
Benedikt Peetz 5f69311dfa
fix(keymaps/crossterm): Implement it fully 2023-11-07 20:25:55 +01:00
Benedikt Peetz f3b3cada71
fix(keymaps): Reimplement crossterm integration 2023-11-07 20:11:28 +01:00
Benedikt Peetz 8d3a421e4c
fix(keymaps): Apply `clippy` suggestions 2023-11-07 20:00:20 +01:00
Benedikt Peetz 831831cd1c
refactor(keymaps): Remove dead code and duplicated module name (key) 2023-11-07 19:47:35 +01:00
Benedikt Peetz 2b39608f85
feat(keymaps): Separate the keymapping system into its own crate 2023-11-07 19:37:06 +01:00
Benedikt Peetz 51eed5697a
feat(keymaps): Put keymaps into a separate crate 2023-11-01 17:20:53 +01:00
Benedikt Peetz 196c392f59
build(flake): Switch to nixpkgs's wrapped mold linker
By now a wrapped version of mold exists, which thus works with the
NixOS libraries. This is obviously the same as my self-wrapped version,
but vendoring is just not important here.
2023-10-31 18:55:18 +01:00
Benedikt Peetz 66e3b362c3
build(flake): Remove language-servers from the devshell
These should always be provided by the editor, and not the devshell.
2023-10-31 18:50:46 +01:00
Benedikt Peetz 8413a30090
build(flake): Remove unused crane overrides 2023-10-31 18:50:05 +01:00
Benedikt Peetz df07c3fc24
build(flake): Replace self-packaged cranelift with rustup's
Motivation
==========
The self-packed one sort-of worked, but was rather flaky, while the one
from rustup obviously works, as it's an officially distributed part.

Running it
==========
Instead of the `cargo clif [build, etc.]` you now need to run (on nightly):
```
RUSTFLAGS="-Zcodegen-backend=cranelift" cargo build
```

Performance
===========
On my system I noticed, that a debug build takes around 20 sec *more*
with cranelift, compared to the default LLVM backend.

One possible hypothesis, for that could be, that cranelift does
not link via `mold` but instead still uses GNU's `gold`.

On the other hand, the performance decrease could also be caused
by the fact, that it's an early preview and some optimizations are
still lacking.
2023-10-31 18:47:01 +01:00
Benedikt Peetz c1b426d590
build(treewide): Update 2023-10-31 18:04:18 +01:00
antifallobst a784f96603
feat(config): added plane cycling 2023-10-19 20:04:27 +02:00
antifallobst a538877b5b
refactor: restructured event sources 2023-10-19 18:14:59 +02:00
Benedikt Peetz 4e839d4e2c
fix(config/lua): Add the 'jj' mapping the insert mode
This is just here to prove that the fixes for the KeyInputPending mode
actually work
2023-10-18 23:10:44 +02:00
Benedikt Peetz c024b73625
fix(ui): Display pending keys in KeyInputPending 2023-10-18 23:10:12 +02:00
Benedikt Peetz 18152bdded
fix(key_input): Also input pending keys, when leaving KeyInputPending 2023-10-18 23:09:09 +02:00
Benedikt Peetz 0ed99b6244
fix(config/lua): Generate the 'keymappings' table under 'std' 2023-10-18 23:03:16 +02:00
Benedikt Peetz b54f8e59e8
fix(key_input): Handle shifted characters correctly
This commit fixes multiple bugs introduced in the new keymapping system:

    When we can't find a keymapping for a string, we simply pass it
along, by calling the 'send_input_unprocessed' function with the
inputted key turned into it's string representation. Turning a shifted
key into it's repr. returned a doubly shifted string:
   'A' turned into '<S-A>', which then fails to parse as a valid key
input. Thus, we simply unshifted the value.
    The next bug, becoming apparent now, is caused by this: We never
reshifted the value, when we converted it into a crossterm key input
event.
2023-10-18 22:52:07 +02:00
Benedikt Peetz 66bf5e3b6f
build(update.sh): Include the language_macros dir in the update 2023-10-18 21:14:23 +02:00
Benedikt Peetz 97c7327d54
build(treewide): Update 2023-10-18 21:14:03 +02:00
Benedikt Peetz 9139fa2776
feat(command_interface): Support user specified keymappings 2023-10-16 14:04:03 +02:00
Benedikt Peetz 602eba6a60
build(treewide): Update 2023-10-16 13:56:18 +02:00
Benedikt Peetz 1dd9a0e4de
feat(command_interface): Add support for functions (and thus callbacks) 2023-10-14 18:46:25 +02:00
Benedikt Peetz d7b93178e8
build(treewide): Move back to rust stable 2023-10-14 12:42:36 +02:00
Benedikt Peetz 181af51c08
build(treewide): Update 2023-10-14 12:41:05 +02:00
Benedikt Peetz 6745da4c71
style(treewide): Apply consistent formatting
I just ran `cargo fmt -- --config reorder_imports=true,imports_granularity=Crate,group_imp
orts=StdExternalCrate`
2023-09-20 19:22:56 +02:00
Benedikt Peetz 27d00c564c
feat(command_interface): Add support for namespaces 2023-09-20 19:21:44 +02:00
Benedikt Peetz 29aa6c1d33
build(treewide): Update 2023-09-17 16:41:55 +02:00
Benedikt Peetz 9a9cda535a
fix(commands/print): Add basic support for printing non-string types 2023-09-09 22:51:28 +02:00
Benedikt Peetz 357c42332f
feat(app): Add support for a Lua based configuration file 2023-09-09 21:29:46 +02:00
Benedikt Peetz 7aea23f3b6
fix(handlers/main)!: Change exit key to `q`
`Esc` is bound to exit a deeper mode (like `insert` or `command`) and
return to `normal` mode. This however is rather inconvenient,
when `Esc` also exits Trinitrix in general, as spamming `Esc` then
becomes impossible.
This changes also puts Trinitrix more in line with vim (although vim
does not allow exiting with `q`).

BREAKING CHANGE: To exit press `q` instead of `Esc`.
2023-09-09 19:57:49 +02:00
Benedikt Peetz 74f3b25827
feat(states): Add `command` state for command only keymappings 2023-09-09 19:57:20 +02:00
Benedikt Peetz bc1fc0cc02
refactor(LuaCommandManager): Express the semantics of Lua code explicitly 2023-09-09 19:55:16 +02:00
Benedikt Peetz ed37d1239f
feat(CommandTransferValue): Generalize the API to facilitate multiple languages
The code for the `CommandTransferValue` was deeply entrenched in the
whole Lua execution code, which is obviously not ideal. In trying to
alleviate that, I decided to generalize the API in a way, that makes
adding new languages a lot easier.
2023-09-09 19:49:56 +02:00
Benedikt Peetz 42b8793dd0
Fix(lua): Upgrade to mlua 9.1, which introduced braking changes 2023-09-09 19:44:00 +02:00
Benedikt Peetz eb63cb6247
build(flake): Wrap mold so that it works with the nix supplied libraries 2023-09-03 22:11:41 +02:00
Benedikt Peetz a8112d554e
build(treewide): Update 2023-09-03 22:08:35 +02:00
Benedikt Peetz d93b00484e
Docs(architecture): Add lua code execution to diagram 2023-08-04 12:36:46 +02:00