Commit Graph

97 Commits (e04b0964aed02b639f969234e35bab5b1a74a73f)

Author SHA1 Message Date
Arijit Basu e04b0964ae Use 89 chars line length 2 years ago
Arijit Basu 02b631bf83 Strict NO_COLOR compliance and some cleanups 2 years ago
Arijit Basu d9465f1a57 Display in the table 2 years ago
Arijit Basu 8e1d16b751 Remove merge conflicts 2 years ago
Arijit Basu 37e660e0a6 Improve timestamp support 2 years ago
Shunsuke Mie 57c29d47c5 Support a column shows time of modification 2 years ago
Arijit Basu 5f598648a8 Make the prompt not null 2 years ago
Arijit Basu 1de737cefa Add regex support and dynamic input prompt
- Add new regex filters
  - `RelativePathDoesMatchRegex`
  - `RelativePathDoesNotMatchRegex`
  - `IRelativePathDoesMatchRegex`
  - `IRelativePathDoesNotMatchRegex`
  - `AbsolutePathDoesMatchRegex`
  - `AbsolutePathDoesNotMatchRegex`
  - `IAbsolutePathDoesMatchRegex`
  - `IAbsolutePathDoesNotMatchRegex`
- Search mode now defaults to regex
- Added new message `SetInputPrompt` to set the input prompt
  dynamically.
2 years ago
Arijit Basu 171c93dbb1 Fix ansi colors
Also upgrade deps and do some cleanup.
2 years ago
Arijit Basu dfb4854f01
Set cursor position based on prompt 2 years ago
Arijit Basu 721ffd0216 Support custom `border_type` and `border_style`
This adds support for defining custom border types and border styles.

Example:

```
xplr.config.general.panel_ui.default.border_type = "Thick"
xplr.config.general.panel_ui.default.border_style.fg = "Black"
xplr.config.general.panel_ui.default.border_style.bg = "Gray"
```

Closes: https://github.com/sayanarijit/xplr/issues/448
2 years ago
Arijit Basu 8f5e5491f2 Optimize change directory performance
This PR breaks the custom layout renderer API by deprecating the
following heavyweight fields in the Lua Context passed to the renderer
functions.

The following fields are being deprecated:

- app.directory_buffer
- app.history
- app.last_modes

However, there's no change in the Lua Context passed to the functions
called via `CallLua*` messages.

Closes: https://github.com/sayanarijit/xplr/issues/418
2 years ago
Arijit Basu b7d86ae1ec Serialize None to nil
Fixes: https://github.com/sayanarijit/xplr/issues/417
3 years ago
Tom van Dijk b1ac4944ab `help_hide_remaps` -> `hide_remaps_in_help_menu` 3 years ago
Tom van Dijk 263eb5943a Introduce `general.help_hide_remaps` config entry. 3 years ago
Arijit Basu 5b710070a3 Optimize more 3 years ago
Arijit Basu 5211e4fa40 Fix Lua API performance by caching
Fixes: https://github.com/sayanarijit/xplr/issues/412
3 years ago
Arijit Basu 8e00b3e658
Add scroll for the input buffer 3 years ago
Arijit Basu 165d992b75 Fix logs UI
Fixes: https://github.com/sayanarijit/xplr/issues/396
3 years ago
Arijit Basu ca6cefb1c1 Use tui-input to handle input buffer
New message: `UpdateInputBufferFromKey` to replace most
`BufferInputFromKey` usage.

This adds more functionalities to the input buffer and reduces
boilerplate code.

This commit also deprecates `config.general.cursor` as the cursor will
be set by the terminal from now.

Repo: https://github.com/sayanarijit/tui-input
3 years ago
Arijit Basu a797d7b1c7 Format & lint code 3 years ago
Shunsuke Mie 1947d77a33 Change mods name for tests
There are two mod names for test, `test` and `tests`. This commit unites
the name to `tests`. It is commonly used.
3 years ago
Arijit Basu 0328eb63c7 Fix selection count
Fixes https://github.com/sayanarijit/xplr/issues/363
3 years ago
Arijit Basu 347b9625aa Add padding to custom content titles 3 years ago
Gilad Woloch 402715cdcd Remove trivial `ResolvedNode` methods 3 years ago
Gilad Woloch 95b580203f Introduce `xor` helper 3 years ago
Gilad Woloch 18b784f054 Correct typo 3 years ago
Gilad Woloch 2ef7523bb0 Derive `PartialEq` 3 years ago
Gilad Woloch 46287f6373 Use `Result::is_ok` 3 years ago
Gilad Woloch cc022e85ff Fix `cargo clippy` warnings and reformat 3 years ago
Gilad Woloch c399236fd3 Reformat 3 years ago
Gilad Woloch 3f0e479f56 Remove trivial methods 3 years ago
Arijit Basu ac1476bc08
Cleanup 3 years ago
Arijit Basu aee49dad78 Support terminal colors in custom layout
Example:

```lua
xplr.config.layouts.builtin.default = {
  CustomContent = {
    title = "custom title",
    body = {
      StaticParagraph = { render = "\x1b[31mcustom body\x1b[0m" },
    },
  },
}
```
3 years ago
Arijit Basu 5eab3c6033 Support defining custom layout for different modes
Closes: https://github.com/sayanarijit/xplr/issues/335
3 years ago
Arijit Basu 69d3b3af46 Add focus selection UI
Closes: https://github.com/sayanarijit/xplr/issues/322
3 years ago
Arijit Basu 7d0605479e Allow dynamic linking to load Lua modules using C
Also upgrade packages.

Closes: https://github.com/sayanarijit/xplr/issues/309
3 years ago
Arijit Basu 9070cd9e17 Add more docs 3 years ago
Arijit Basu f5aceb1e66 Make the number of visible logs dynamic
It helps to see all the logs when switching to a bigger InputAndLogs
layout.
3 years ago
Arijit Basu 7496f5bf8f Disable mouse by default and bind `:m` to toggle
- Make mouse disabled by default.
- Add key binding `:m` to toggle mouse.

Closes: https://github.com/sayanarijit/xplr/issues/206
3 years ago
Arijit Basu b284124022 Optimize rendering speed by serializing less
Serializing to and from Lua value is expensive. Hence, once serialized,
we should reuse the value.
3 years ago
Arijit Basu 695acf5c1e Inherit node types config
Inherit `node_types` config instead of overwriting it.

Closes: https://github.com/sayanarijit/xplr/issues/200
3 years ago
Arijit Basu 88aedddf53 Fix rustc 1.50 compatibility 3 years ago
Arijit Basu b4247a7d03 Improve CallLua, mime_essence, permissions
Refs:
- https://github.com/sayanarijit/xplr/issues/187
- https://github.com/sayanarijit/xplr/issues/194
- https://github.com/sayanarijit/xplr/issues/195
3 years ago
Arijit Basu aa7a441751 Make mode visible in input/logs panel
Also, map ":q" to "quit" action.

Ref: https://github.com/sayanarijit/xplr/issues/158
3 years ago
Arijit Basu db669cdcbf Remove "remaps:"
Remaps has been removed to simplify key bindings. With Lua, it's now
possible to remap using basic assignments.

For e.g.

```Lua
xplr.config.modes.builtin.default.key_bindings.on_key["v"] = xplr.config.modes.builtin.default.key_bindings.on_key.space
```

Help menu will auto detect remapped keys and display after removing the
redundant mappings.

Ref: https://github.com/sayanarijit/xplr/discussions/183#discussioncomment-774159
3 years ago
Arijit Basu cb695fcaa7 Add colorful permissions
Ref: https://github.com/sayanarijit/xplr/issues/187
3 years ago
Arijit Basu b86be16ee3 Make structs public
Public structs enable automatec documentation.
xplr is not (yet) a library. Even it want to become one, making fields
private is probably not the right way.
3 years ago
Arijit Basu a80bf2d683 Final touches for v0.10.0 3 years ago
Arijit Basu 4da481bf5c Cleanup all the YAML overwriting logics 3 years ago