fix(yazi): nvim env

This commit is contained in:
2025-04-28 22:10:08 +03:00
parent 57314ec659
commit ed917492f1
8 changed files with 34 additions and 1240 deletions

View File

@@ -14,11 +14,13 @@ show_symlink = true
scrolloff = 8
[preview]
wrap = "yes"
tab_size = 2
max_width = 600
max_height = 900
cache_dir = ""
image_filter = "triangle"
image_delay = 0
image_quality = 75
sixel_fraction = 15
ueberzug_scale = 1
@@ -26,7 +28,7 @@ ueberzug_offset = [ 0, 0, 0, 0 ]
[opener]
edit = [
{run = '${EDITOR:=vim} "$@"', desc = "$EDITOR", block = true, for = "unix"},
{run = '/usr/bin/nvim "$@"', desc = "$EDITOR", block = true, for = "unix"},
{run = 'code "%*"', orphan = true, desc = "code", for = "windows"},
{run = 'code -w "%*"', block = true, desc = "code (block)", for = "windows"},
]
@@ -35,7 +37,6 @@ open = [
{run = 'open "$@"', desc = "Open", for = "macos"},
{run = 'start "" "%1"', orphan = true, desc = "Open", for = "windows"},
]
reveal = [
{run = 'xdg-open "$(dirname "$0")"', desc = "Reveal", for = "linux"},
{run = 'open -R "$1"', desc = "Reveal", for = "macos"},
@@ -54,16 +55,23 @@ play = [
[open]
rules = [
# Folder
{name = "*/", use = [ "edit", "open", "reveal" ]},
# Text
{mime = "text/*", use = [ "edit", "reveal" ]},
{mime = "image/*", use = [ "reveal" ]},
# Image
{mime = "image/*", use = [ "open", "reveal" ]},
# Media
{mime = "{audio,video}/*", use = [ "play", "reveal" ]},
{mime = "inode/x-empty", use = [ "edit", "reveal" ]},
{mime = "application/*zip", use = [ "extract", "reveal" ]},
{mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", use = [ "extract", "reveal" ]},
{mime = "application/json", use = [ "edit", "reveal" ]},
# Archive
{mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", use = [ "extract", "reveal" ]},
# JSON
{mime = "application/{json,ndjson}", use = [ "edit", "reveal" ]},
{mime = "*/javascript", use = [ "edit", "reveal" ]},
{mime = "*", use = [ "open", "reveal" ]},
# Empty file
{mime = "inode/empty", use = [ "edit", "reveal" ]},
# Fallback
{name = "*", use = [ "open", "reveal" ]},
]
[tasks]
@@ -75,7 +83,6 @@ image_bound = [ 0, 0 ]
suppress_preload = false
[plugin]
preloaders = [
{mime = "image/*", run = "image"},
{mime = "video/*", run = "video"},
@@ -135,7 +142,6 @@ append_previewers = [
prepend_fetchers = [
{id = "git", name = "*", run = "git"},
{id = "git", name = "*/", run = "git"},
{id = "mime", name = "*", run = "mime-ext", prio = "high"},
]
[input]