feat(yazi): plugins

This commit is contained in:
js0ny 2025-02-09 14:58:06 +00:00
parent 382064dc29
commit db94167c59
6 changed files with 62 additions and 32 deletions

1
.gitignore vendored
View file

@ -37,3 +37,4 @@ spacemacs/
lazy-lock.json lazy-lock.json
tools/doom/custom.el tools/doom/custom.el
tools/doom/custom.el

View file

@ -1,31 +1,31 @@
# dotfiles * dotfiles
This repository contains dotfiles for multiple platforms, with /colemak/
This repository contains dotfiles for multiple platforms, with _colemak_ as the default keyboard layout. as the default keyboard layout.
No rice, no Unixporn/NTporn, just a simple setup that works for me. No rice, no Unixporn/NTporn, just a simple setup that works for me.
Works for Windows, Linux and MacOS. Works for Windows, Linux and MacOS.
## Structure ** Structure
```shell #+begin_src shell
 .  .
├──  .editorconfig # Editor configuration, for LF/CRLF correction ├──  .editorconfig # Editor configuration, for LF/CRLF correction
├──  .gitattributes # Git attributes, for LF/CRLF correction ├──  .gitattributes # Git attributes, for LF/CRLF correction
├──  bootstrap # Setup scripts for new machines ├──  bootstrap # Setup scripts for new machines
├──  common # Single-file configurations (lesskey, vimrc etc`) ├──  common # Single-file configurations (lesskey, vimrc etc)
├──  platforms # Platform-specific configurations ├──  platforms # Platform-specific configurations
├──  readme.md # This file ├──  readme.md # This file
├──  scripts # Scripts for various tasks ├──  scripts # Scripts for various tasks
└──  tools # Multi-file configurations (shell, neovim etc) └──  tools # Multi-file configurations (shell, neovim etc)
``` #+end_src
## Keybindings ** Keybindings
``` #+begin_example
^ ^
e e
< h i > < h i >
n n
v v
``` #+end_example

2
tools/yazi/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
flavors/
plugins/

18
tools/yazi/init.lua Normal file
View file

@ -0,0 +1,18 @@
-- ~/.config/yazi/init.lua
function Linemode:size_and_mtime()
local time = math.floor(self._file.cha.mtime or 0)
if time == 0 then
time = ""
elseif os.date("%Y", time) == os.date("%Y") then
time = os.date("%b %d %H:%M", time)
else
time = os.date("%b %d %Y", time)
end
local size = self._file:size()
return string.format("%s %s", size and ya.readable_size(size) or "-", time)
end
-- require("dual-pane"):setup({ enabled = true })
require("starship"):setup()
require("yaziline"):setup()

5
tools/yazi/package.toml Normal file
View file

@ -0,0 +1,5 @@
[plugin]
deps = [{ use = "dawsers/dual-pane", rev = "c2fed12" }, { use = "Rolv-Apneseth/starship", rev = "d1cd0a3" }, { use = "llanosrocas/yaziline", rev = "864572c" }]
[flavor]
deps = [{ use = "yazi-rs/flavors:catppuccin-mocha", rev = "fd85060" }, { use = "yazi-rs/flavors:catppuccin-latte", rev = "fd85060" }, { use = "dangooddd/kanagawa", rev = "d98f0c3" }]

View file

@ -1,2 +1,6 @@
[manager] [manager]
show_hidden = true show_hidden = true
linemode = "size_and_mtime"
[preview]
wrap = "yes"