feat: Improve yazi

This commit is contained in:
Fabio Lenherr / DashieTM 2024-03-12 02:46:53 +01:00
parent 17b2b630af
commit 4bb15d851e
14 changed files with 782 additions and 377 deletions

View file

@ -1,8 +1,8 @@
NEOVIDE_MAXIMIZED=0 NEOVIDE_MAXIMIZED=0
GPG_TTY=$(tty) GPG_TTY=$(tty)
PATH=/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:~/.local/bin:~/.cargo/bin:$PATH PATH=/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:~/.local/bin:~/.cargo/bin:$PATH
EDITOR="neovide --novsync --nofork" EDITOR="neovide --no-fork"
SUDO_EDITOR="neovide --novsync --nofork" SUDO_EDITOR="neovide --no-fork"
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
LD_LIBRARY_PATH=/usr/local/lib LD_LIBRARY_PATH=/usr/local/lib
SCRIPTS=$HOME/.config/scripts SCRIPTS=$HOME/.config/scripts

View file

@ -14,6 +14,18 @@ function sudo --description "Replacement for Bash 'sudo !!' command to run last
command sudo $argv command sudo $argv
end end
end end
function y
set tmp (mktemp -t "yazi-cwd.XXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
cd -- "$cwd"
end
rm -- "$tmp"
end
set EDITOR "neovide --no-fork"
alias ls='lsd' alias ls='lsd'
alias :q='exit' alias :q='exit'
alias gh='git push origin' alias gh='git push origin'

View file

@ -1,10 +1,10 @@
{ {
"LazyVim": { "branch": "main", "commit": "fe72424e77cb9c953084bbcaaa0eb7fe8056dc70" }, "LazyVim": { "branch": "main", "commit": "e3bfcb9bf74292dc846f5d1710fbb2e8f36a687a" },
"LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" }, "LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" },
"SchemaStore.nvim": { "branch": "main", "commit": "d91daa5bf63c409f9e752e55082c3ba088b04c0b" }, "SchemaStore.nvim": { "branch": "main", "commit": "b788bde023f9fbc2eb86e89d32c0bf98a60ae406" },
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" }, "alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
"bufferline.nvim": { "branch": "main", "commit": "b15c6daf5a64426c69732b31a951f4e438cb6590" }, "bufferline.nvim": { "branch": "main", "commit": "64e2c5def50dfd6b6f14d96a45fa3d815a4a1eef" },
"catppuccin": { "branch": "main", "commit": "c0de3b46811fe1ce3912e2245a9dfbea6b41c300" }, "catppuccin": { "branch": "main", "commit": "045e3499d9ec8d84635fb08877ae44fd33f6a38d" },
"clangd_extensions.nvim": { "branch": "main", "commit": "34c8eaa12be192e83cd4865ce2375e9f53e728f2" }, "clangd_extensions.nvim": { "branch": "main", "commit": "34c8eaa12be192e83cd4865ce2375e9f53e728f2" },
"cmake-tools.nvim": { "branch": "master", "commit": "055d7bb37d5c4038ce1e400656b6504602934ce7" }, "cmake-tools.nvim": { "branch": "master", "commit": "055d7bb37d5c4038ce1e400656b6504602934ce7" },
"cmp-async-path": { "branch": "main", "commit": "9d581eec5acf812316913565c135b0d1ee2c9a71" }, "cmp-async-path": { "branch": "main", "commit": "9d581eec5acf812316913565c135b0d1ee2c9a71" },
@ -12,24 +12,22 @@
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "34b81e70da83e26c048290204de44268eb59814e" }, "conform.nvim": { "branch": "master", "commit": "5a15cc46e75cad804fd51ec5af9227aeb1d1bdaa" },
"crates.nvim": { "branch": "main", "commit": "ec2b04a380c9f3a8e6ca38c230e4990d71978143" }, "crates.nvim": { "branch": "main", "commit": "535773ed3b321d68ddd6ef8cd5a1e07b345026a6" },
"dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" }, "dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" },
"edgy.nvim": { "branch": "main", "commit": "0b35dc6da4cae6cc2f724bc610eadf955cd2319b" },
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
"friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" }, "friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" },
"git-blame.nvim": { "branch": "master", "commit": "a0282d05adbee80aaf4e2ff35b81b52940b67bed" }, "git-blame.nvim": { "branch": "master", "commit": "a0282d05adbee80aaf4e2ff35b81b52940b67bed" },
"gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
"headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" }, "headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" },
"inc-rename.nvim": { "branch": "main", "commit": "6f9b5f9cb237e12935144cdc535322b8c93c1b25" }, "inc-rename.nvim": { "branch": "main", "commit": "6f9b5f9cb237e12935144cdc535322b8c93c1b25" },
"indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" }, "indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" },
"instant.nvim": { "branch": "master", "commit": "294b6d08143b3db8f9db7f606829270149e1a786" }, "instant.nvim": { "branch": "master", "commit": "294b6d08143b3db8f9db7f606829270149e1a786" },
"lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, "lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" },
"ltex_extra.nvim": { "branch": "master", "commit": "42dd3572cb09b52a137e91e515f2dff5eb631b1e" }, "ltex_extra.nvim": { "branch": "master", "commit": "42dd3572cb09b52a137e91e515f2dff5eb631b1e" },
"lualine.nvim": { "branch": "master", "commit": "8b56462bfb746760465264de41b4907310f113ec" }, "lualine.nvim": { "branch": "master", "commit": "3c55675a7bc170d21d7ea70874ae66fbf5cfb0dc" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "21d33d69a81f6351e5a5f49078b2e4f0075c8e73" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "55716a879568a498fa236593c8119789054a3b8e" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" },
"mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" }, "mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" },
"mini.ai": { "branch": "main", "commit": "ee9446a17c160aba6a04ff22097389c41872c878" }, "mini.ai": { "branch": "main", "commit": "ee9446a17c160aba6a04ff22097389c41872c878" },
@ -38,52 +36,50 @@
"mini.indentscope": { "branch": "main", "commit": "cf07f19e718ebb0bcc5b00999083ce11c37b8d40" }, "mini.indentscope": { "branch": "main", "commit": "cf07f19e718ebb0bcc5b00999083ce11c37b8d40" },
"mini.pairs": { "branch": "main", "commit": "04f58f2545ed80ac3b52dd4826e93f33e15b2af6" }, "mini.pairs": { "branch": "main", "commit": "04f58f2545ed80ac3b52dd4826e93f33e15b2af6" },
"mini.surround": { "branch": "main", "commit": "a1b590cc3b676512de507328d6bbab5e43794720" }, "mini.surround": { "branch": "main", "commit": "a1b590cc3b676512de507328d6bbab5e43794720" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "459c60317cc1d251f6eb3b6f010d015d5d24b806" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "7f2ebdef3b55374390714ac7c0a7fe6b0dae498a" },
"neoconf.nvim": { "branch": "main", "commit": "8d7150e9d6113f01421c34c5aeb0f586afa232e0" }, "neoconf.nvim": { "branch": "main", "commit": "d21739358bca9811f783c9a3d5e91c7b3abc3005" },
"neodev.nvim": { "branch": "main", "commit": "84e0290f5600e8b89c0dfcafc864f45496a53400" }, "neodev.nvim": { "branch": "main", "commit": "84e0290f5600e8b89c0dfcafc864f45496a53400" },
"neoscroll.nvim": { "branch": "master", "commit": "6e3546751076890304428150e53bd59198a4505d" }, "neoscroll.nvim": { "branch": "master", "commit": "21d52973bde32db998fc8b6590f87eb3c3c6d8e4" },
"neotest": { "branch": "master", "commit": "4440cc2227894c2ae9b0673a30e6cc6f1836e8c2" }, "neotest": { "branch": "master", "commit": "4440cc2227894c2ae9b0673a30e6cc6f1836e8c2" },
"neotest-go": { "branch": "main", "commit": "6a2f996d89fe4631942e035b1c114544ee045043" }, "neotest-go": { "branch": "main", "commit": "6a2f996d89fe4631942e035b1c114544ee045043" },
"neotest-python": { "branch": "master", "commit": "2e83d2bc00acbcc1fd529dbf0a0e677cabfe6b50" }, "neotest-python": { "branch": "master", "commit": "2e83d2bc00acbcc1fd529dbf0a0e677cabfe6b50" },
"neotest-rust": { "branch": "main", "commit": "9e9df68064bd6fa3b5e40b32fcb7c52af130cdbf" }, "nui.nvim": { "branch": "main", "commit": "756c59f46057cd2d43619cd3a6d4e01b2aa60295" },
"nui.nvim": { "branch": "main", "commit": "fbb139c6f14896b434d0229099e1acd863ae6bec" },
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
"nvim-dap": { "branch": "master", "commit": "fc880e82059eb21c0fa896be60146e5f17680648" }, "nvim-dap": { "branch": "master", "commit": "fc880e82059eb21c0fa896be60146e5f17680648" },
"nvim-dap-go": { "branch": "main", "commit": "64f73400761e2d19459e664a52ea478f3a4420e7" }, "nvim-dap-go": { "branch": "main", "commit": "64f73400761e2d19459e664a52ea478f3a4420e7" },
"nvim-dap-python": { "branch": "master", "commit": "66560f0ebddf96604f7037e1efad3ba6942761e6" }, "nvim-dap-python": { "branch": "master", "commit": "66560f0ebddf96604f7037e1efad3ba6942761e6" },
"nvim-dap-ui": { "branch": "master", "commit": "9720eb5fa2f41988e8770f973cd11b76dd568a5d" }, "nvim-dap-ui": { "branch": "master", "commit": "9720eb5fa2f41988e8770f973cd11b76dd568a5d" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "a5fc69240869c0fee8ff176bc9e4efdf8bdfb596" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "baa5b0dc6663284cce32e0d00ac1f2511b13496f" },
"nvim-jdtls": { "branch": "master", "commit": "382b9f625861f47d95876bcfb4c261f3b96077cb" }, "nvim-jdtls": { "branch": "master", "commit": "8eb5f0dbe6e126b392ddcaf45893358619893e45" },
"nvim-lint": { "branch": "master", "commit": "e824adb9bc01647f71e55457353a68f0f37f9931" }, "nvim-lint": { "branch": "master", "commit": "e824adb9bc01647f71e55457353a68f0f37f9931" },
"nvim-lspconfig": { "branch": "master", "commit": "7f5cf1121f772850a30bdaf83fb448e88846aa58" }, "nvim-lspconfig": { "branch": "master", "commit": "1917b562a02f20885900b1da0f0ea25028ccedab" },
"nvim-spectre": { "branch": "master", "commit": "3712ff0cdf4f9f877d9ca708d835a877d9a0abaf" }, "nvim-spectre": { "branch": "master", "commit": "3712ff0cdf4f9f877d9ca708d835a877d9a0abaf" },
"nvim-tree.lua": { "branch": "master", "commit": "efafd73efa9bc8c26282aed563ba0f01c7465b06" }, "nvim-treesitter": { "branch": "master", "commit": "b781fd058224f67df7469b8f376c42a8d85e11db" },
"nvim-treesitter": { "branch": "master", "commit": "212b7a504cf56f85d1acc5be237261b42d7560c5" }, "nvim-treesitter-context": { "branch": "master", "commit": "b8b7e52c1517d401d7c519787d5dc4528c41291a" },
"nvim-treesitter-context": { "branch": "master", "commit": "53cdd58446521575d8f1052152099e08b15ca53c" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "b7a0bfa3e93697ca5b61b15df633404bf8f45883" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3532f6095efd4723f7c066a5ac3fe632506cc09e" },
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" },
"nvim-web-devicons": { "branch": "master", "commit": "4adea17610d140a99c313e3f79a9dc01825d59ae" }, "nvim-web-devicons": { "branch": "master", "commit": "75df79feb02d5e0ec114e447453775d4d291ea03" },
"omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "4be2e8689067494ed7e5a4f1221adc31d1a07783" }, "omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "f7310a06ad86072158adc37f394650e7fba9631d" },
"persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" }, "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" },
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, "plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" },
"rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" }, "rustaceanvim": { "branch": "master", "commit": "5dc35a075ad7c9d2f6493065e1e5970e4ad61504" },
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "bc25c56083939f274edcfe395c6ff7de23b67c50" }, "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "bc25c56083939f274edcfe395c6ff7de23b67c50" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "48ffb8de688a22942940f50411d5928631368848" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "8839e3f8070dfafa5b0c0e4652700298e7b872c4" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope-project.nvim": { "branch": "master", "commit": "1aaf16580a614601a7f7077d9639aeb457dc5559" }, "telescope-project.nvim": { "branch": "master", "commit": "1aaf16580a614601a7f7077d9639aeb457dc5559" },
"telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" },
"telescope.nvim": { "branch": "master", "commit": "dc1ea28cc2a02cd1cebb9d80e967807d668f78f8" }, "telescope.nvim": { "branch": "master", "commit": "7472420f8734c710bd7009081cef9b97f08a3821" },
"test_plugin": { "branch": "main", "commit": "c6100b07b2f7925e5bb639c6b42427f9aa362add" }, "test_plugin": { "branch": "main", "commit": "c6100b07b2f7925e5bb639c6b42427f9aa362add" },
"todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
"tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" }, "tokyonight.nvim": { "branch": "main", "commit": "c025baf23b62f044eff1f4ef561c45de636f0e32" },
"tree-sitter-hyprlang": { "branch": "master", "commit": "fc1d331586e4da2b5f5bcfa89d630ebafe66458b" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"typst.vim": { "branch": "main", "commit": "ff57d27cf5ee7427941a63fb537714f9a80e0246" }, "typst.vim": { "branch": "main", "commit": "ff57d27cf5ee7427941a63fb537714f9a80e0246" },
"venv-selector.nvim": { "branch": "main", "commit": "93ee4ac249277571a90db5b50aae83d6f9d036f5" }, "venv-selector.nvim": { "branch": "main", "commit": "2ad34f36d498ff5193ea10f79c87688bd5284172" },
"vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" }, "vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" },
"vim-startuptime": { "branch": "master", "commit": "308b0088a864c4711a96e45b6734cf9294074f65" }, "vim-startuptime": { "branch": "master", "commit": "308b0088a864c4711a96e45b6734cf9294074f65" },
"vim-visual-multi": { "branch": "master", "commit": "fe1ec7e430013b83c8c2dee85ae496251b71e253" }, "vim-visual-multi": { "branch": "master", "commit": "fe1ec7e430013b83c8c2dee85ae496251b71e253" },
"vimtex": { "branch": "master", "commit": "a77d14b2e4391c0d3e860708bb1fd56161ab68eb" }, "vimtex": { "branch": "master", "commit": "a77d14b2e4391c0d3e860708bb1fd56161ab68eb" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
"yazi.nvim": { "branch": "master", "commit": "b5c9390c733244b10859b940413ef9741955301a" }
} }

View file

@ -5,5 +5,5 @@
"news": { "news": {
"NEWS.md": "2123" "NEWS.md": "2123"
}, },
"version": 2 "version": 3
} }

View file

@ -131,11 +131,6 @@ map("n", "<leader>z", function()
require("telescope").extensions.zoxide.list({}) require("telescope").extensions.zoxide.list({})
end, { desc = "Zoxide" }) end, { desc = "Zoxide" })
-- nvimtree
map("n", "<A-f>", function()
require("nvim-tree.api").tree.toggle()
end, { noremap = true, silent = true, desc = "Toggle file tree" })
-- neoscroll -- neoscroll
local t = {} local t = {}
t["<A-l>"] = { "scroll", { "-vim.wo.scroll", "true", "250" } } t["<A-l>"] = { "scroll", { "-vim.wo.scroll", "true", "250" } }

View file

@ -8,7 +8,6 @@ local options = {
termguicolors = true, termguicolors = true,
spelllang = "en_us", spelllang = "en_us",
shell = "/usr/bin/fish", shell = "/usr/bin/fish",
autochdir = true,
relativenumber = false, relativenumber = false,
scrolloff = 5, scrolloff = 5,
scrolljump = 5, scrolljump = 5,

View file

@ -25,6 +25,7 @@ return {
}, },
{ {
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
version = false,
event = "InsertEnter", event = "InsertEnter",
dependencies = { dependencies = {
"hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-nvim-lsp",
@ -140,3 +141,4 @@ return {
end, end,
}, },
} }

View file

@ -41,14 +41,8 @@ return {
} }
dashboard.section.buttons.val = { dashboard.section.buttons.val = {
dashboard.button("f", " Find file", ":lua require('telescope.builtin').find_files()<CR>"), dashboard.button("f", " Find file", ":lua require('telescope.builtin').find_files()<CR>"),
dashboard.button( dashboard.button("y", " Yazi", ":lua require('yazi').yazi()<CR>"),
"b", dashboard.button("p", " Find project", ":lua require('telescope').extensions.project.project{}<CR>"),
" Open File Browser",
":lua require('telescope').extensions.file_browser.file_browser{}<CR>"
),
dashboard.button("e", " New file", ":ene <BAR> startinsert <CR>"),
dashboard.button("p", " Find project", ":lua require('telescope').extensions.project.project{}<CR>"),
dashboard.button("r", " Recently used files", ":lua require('telescope.builtin').oldfiles() <CR>"),
dashboard.button("t", " Zoxide", ":lua require('telescope').extensions.zoxide.list{}<CR>"), dashboard.button("t", " Zoxide", ":lua require('telescope').extensions.zoxide.list{}<CR>"),
dashboard.button("c", " Configuration", ":e ~/.config/nvim/init.lua <CR>"), dashboard.button("c", " Configuration", ":e ~/.config/nvim/init.lua <CR>"),
dashboard.button("q", " Quit Neovim", ":qa<CR>"), dashboard.button("q", " Quit Neovim", ":qa<CR>"),

View file

@ -29,13 +29,6 @@ return {
}, },
}, },
}, },
{
"ThePrimeagen/harpoon",
lazy = true,
config = function()
require("telescope").load_extension("harpoon")
end,
},
{ {
"nvim-telescope/telescope-project.nvim", "nvim-telescope/telescope-project.nvim",
lazy = true, lazy = true,
@ -93,12 +86,6 @@ return {
) )
end, end,
}, },
{
"rcarriga/nvim-notify",
opts = {
top_down = false,
},
},
{ {
"jbyuki/instant.nvim", "jbyuki/instant.nvim",
config = function() config = function()
@ -194,113 +181,32 @@ return {
end, end,
}, },
{ {
"nvim-tree/nvim-tree.lua", "nvim-neo-tree/neo-tree.nvim",
lazy = true,
opts = { opts = {
view = { window = {
centralize_selection = false, position = "right",
side = "right", mappings = {
}, ["l"] = "none",
update_focused_file = {
enable = true,
update_root = false,
ignore_list = {},
},
hijack_directories = {
enable = true,
auto_open = true,
},
system_open = {
cmd = "",
args = {},
},
actions = {
use_system_clipboard = true,
change_dir = {
enable = true,
global = false,
restrict_above_cwd = false,
},
expand_all = {
max_folder_discovery = 300,
exclude = {},
}, },
}, },
}, },
}, keys = {
-- {
-- "nvim-neo-tree/neo-tree.nvim",
-- opts = {
-- window = {
-- bind_to_cwd = true,
-- position = "right",
-- mappings = {
-- ["l"] = "none",
-- },
-- },
-- },
-- keys = {
-- {
-- "<leader>fe",
-- function()
-- require("neo-tree.command").execute({ position = "right", toggle = true, dir = Util.root() })
-- end,
-- desc = "Explorer NeoTree (root dir)",
-- },
-- {
-- "<leader>fE",
-- function()
-- require("neo-tree.command").execute({ position = "right", toggle = true, dir = vim.loop.cwd() })
-- end,
-- desc = "Explorer NeoTree (cwd)",
-- },
-- { "<A-f>", "<leader>fe", desc = "Explorer NeoTree (root dir)", remap = true },
-- { "<A-F>", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
-- },
-- },
{ {
"folke/edgy.nvim", "<leader>fe",
opts = { function()
animate = { require("neo-tree.command").execute({ position = "right", toggle = true, dir = Util.root() })
enabled = false,
},
left = {},
right = {
-- Neo-tree filesystem always takes half the screen height
{
title = "Neo-Tree",
ft = "neo-tree",
filter = function(buf)
return vim.b[buf].neo_tree_source == "filesystem"
end, end,
size = { height = 0.5 }, desc = "Explorer NeoTree (root dir)",
}, },
{ {
title = "Neo-Tree Git", "<leader>fE",
ft = "neo-tree", function()
filter = function(buf) require("neo-tree.command").execute({ position = "right", toggle = true, dir = vim.loop.cwd() })
return vim.b[buf].neo_tree_source == "git_status"
end, end,
pinned = true, desc = "Explorer NeoTree (cwd)",
open = "Neotree position=right git_status",
},
{
title = "Neo-Tree Buffers",
ft = "neo-tree",
filter = function(buf)
return vim.b[buf].neo_tree_source == "buffers"
end,
pinned = true,
open = "Neotree position=top buffers",
},
{
ft = "Outline",
pinned = true,
open = "SymbolsOutlineOpen",
},
-- any other neo-tree windows
"neo-tree",
}, },
{ "<A-f>", "<leader>fe", desc = "Explorer NeoTree (root dir)", remap = true },
{ "<A-F>", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
}, },
}, },
{ {
@ -336,4 +242,14 @@ return {
what = 0, what = 0,
}, },
}, },
{
"DreamMaoMao/yazi.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim",
},
keys = {
{ "<leader>fy", "<cmd>Yazi<CR>", desc = "Toggle Yazi" },
},
},
} }

View file

@ -1,233 +1,573 @@
[manager] [manager]
keymap = [ keymap = [
{ on = [ "<Esc>" ], exec = "escape", desc = "Exit visual mode, clear selected, or cancel search" }, { on = [
{ on = [ "q" ], exec = "quit", desc = "Exit the process" }, "<Esc>",
{ on = [ "Q" ], exec = "quit --no-cwd-file", desc = "Exit the process without writing cwd-file" }, ], run = "escape", desc = "Exit visual mode, clear selected, or cancel search" },
{ on = [ "<C-q>" ], exec = "close", desc = "Close the current tab, or quit if it is last tab" }, { on = [
{ on = [ "<C-z>" ], exec = "suspend", desc = "Suspend the process" }, "q",
], run = "quit", desc = "Exit the process" },
{ on = [
"Q",
], run = "quit --no-cwd-file", desc = "Exit the process without writing cwd-file" },
{ on = [
"<C-q>",
], run = "close", desc = "Close the current tab, or quit if it is last tab" },
{ on = [
"<C-z>",
], run = "suspend", desc = "Suspend the process" },
# Navigation # Navigation
{ on = [ "l" ], exec = "arrow -1", desc = "Move cursor up" }, { on = [
{ on = [ "k" ], exec = "arrow 1", desc = "Move cursor down" }, "l",
], run = "arrow -1", desc = "Move cursor up" },
{ on = [
"k",
], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "L" ], exec = "arrow -5", desc = "Move cursor up 5 lines" }, { on = [
{ on = [ "K" ], exec = "arrow 5", desc = "Move cursor down 5 lines" }, "L",
], run = "arrow -5", desc = "Move cursor up 5 lines" },
{ on = [
"K",
], run = "arrow 5", desc = "Move cursor down 5 lines" },
{ on = [ "<C-u>" ], exec = "arrow -50%", desc = "Move cursor up half page" }, { on = [
{ on = [ "<C-d>" ], exec = "arrow 50%", desc = "Move cursor down half page" }, "<C-u>",
{ on = [ "<C-b>" ], exec = "arrow -100%", desc = "Move cursor up one page" }, ], run = "arrow -50%", desc = "Move cursor up half page" },
{ on = [ "<C-f>" ], exec = "arrow 100%", desc = "Move cursor down one page" }, { on = [
"<C-d>",
], run = "arrow 50%", desc = "Move cursor down half page" },
{ on = [
"<C-b>",
], run = "arrow -100%", desc = "Move cursor up one page" },
{ on = [
"<C-f>",
], run = "arrow 100%", desc = "Move cursor down one page" },
{ on = [ "j" ], exec = "leave", desc = "Go back to the parent directory" }, { on = [
{ on = [ ";" ], exec = "enter", desc = "Enter the child directory" }, "j",
], run = "leave", desc = "Go back to the parent directory" },
{ on = [
";",
], run = "enter", desc = "Enter the child directory" },
{ on = [ "J" ], exec = "back", desc = "Go back to the previous directory" }, { on = [
{ on = [ "P" ], exec = "forward", desc = "Go forward to the next directory" }, "J",
], run = "back", desc = "Go back to the previous directory" },
{ on = [
"P",
], run = "forward", desc = "Go forward to the next directory" },
{ on = [ "<C-k>" ], exec = "peek -5", desc = "Peek up 5 units in the preview" }, { on = [
{ on = [ "<C-j>" ], exec = "peek 5", desc = "Peek down 5 units in the preview" }, "<C-k>",
], run = "peek -5", desc = "Peek up 5 units in the preview" },
{ on = [
"<C-j>",
], run = "peek 5", desc = "Peek down 5 units in the preview" },
{ on = [ "<Up>" ], exec = "arrow -1", desc = "Move cursor up" }, { on = [
{ on = [ "<Down>" ], exec = "arrow 1", desc = "Move cursor down" }, "<Up>",
{ on = [ "<Left>" ], exec = "leave", desc = "Go back to the parent directory" }, ], run = "arrow -1", desc = "Move cursor up" },
{ on = [ "<Right>" ], exec = "enter", desc = "Enter the child directory" }, { on = [
"<Down>",
], run = "arrow 1", desc = "Move cursor down" },
{ on = [
"<Left>",
], run = "leave", desc = "Go back to the parent directory" },
{ on = [
"<Right>",
], run = "enter", desc = "Enter the child directory" },
{ on = [ "g", "g" ], exec = "arrow -99999999", desc = "Move cursor to the top" }, { on = [
{ on = [ "G" ], exec = "arrow 99999999", desc = "Move cursor to the bottom" }, "g",
"g",
], run = "arrow -99999999", desc = "Move cursor to the top" },
{ on = [
"G",
], run = "arrow 99999999", desc = "Move cursor to the bottom" },
# Selection # Selection
{ on = [ "<Space>" ], exec = [ "select --state=none", "arrow 1" ], desc = "Toggle the current selection state" }, { on = [
{ on = [ "v" ], exec = "visual_mode", desc = "Enter visual mode (selection mode)" }, "v",
{ on = [ "V" ], exec = "visual_mode --unset", desc = "Enter visual mode (unset mode)" }, ], run = "visual_mode", desc = "Enter visual mode (selection mode)" },
{ on = [ "<C-a>" ], exec = "select_all --state=true", desc = "Select all files" }, { on = [
{ on = [ "<C-r>" ], exec = "select_all --state=none", desc = "Inverse selection of all files" }, "V",
], run = "visual_mode --unset", desc = "Enter visual mode (unset mode)" },
{ on = [
"<C-a>",
], run = "select_all --state=true", desc = "Select all files" },
{ on = [
"<C-r>",
], run = "select_all --state=none", desc = "Inverse selection of all files" },
# Operation # Operation
{ on = [ "o" ], exec = "open", desc = "Open the selected files" }, { on = [
{ on = [ "O" ], exec = "open --interactive", desc = "Open the selected files interactively" }, "o",
{ on = [ "<Enter>" ], exec = "open", desc = "Open the selected files" }, ], run = "open", desc = "Open the selected files" },
{ on = [ "<C-Enter>" ], exec = "open --interactive", desc = "Open the selected files interactively" }, # It's cool if you're using a terminal that supports CSI u { on = [
{ on = [ "y" ], exec = "yank", desc = "Copy the selected files" }, "O",
{ on = [ "x" ], exec = "yank --cut", desc = "Cut the selected files" }, ], run = "open --interactive", desc = "Open the selected files interactively" },
{ on = [ "p" ], exec = "paste", desc = "Paste the files" }, { on = [
{ on = [ "P" ], exec = "paste --force", desc = "Paste the files (overwrite if the destination exists)" }, "<Enter>",
{ on = [ "-" ], exec = "link", desc = "Symlink the absolute path of files" }, ], run = "open", desc = "Open the selected files" },
{ on = [ "_" ], exec = "link --relative", desc = "Symlink the relative path of files" }, { on = [
{ on = [ "d" ], exec = "remove", desc = "Move the files to the trash" }, "<C-Enter>",
{ on = [ "D" ], exec = "remove --permanently", desc = "Permanently delete the files" }, ], run = "open --interactive", desc = "Open the selected files interactively" }, # It's cool if you're using a terminal that supports CSI u
{ on = [ "a" ], exec = "create", desc = "Create a file or directory (ends with / for directories)" }, { on = [
{ on = [ "r" ], exec = "rename", desc = "Rename a file or directory" }, "y",
{ on = [ ";" ], exec = "shell", desc = "Run a shell command" }, ], run = "yank", desc = "Copy the selected files" },
{ on = [ ":" ], exec = "shell --block", desc = "Run a shell command (block the UI until the command finishes)" }, { on = [
{ on = [ "." ], exec = "hidden toggle", desc = "Toggle the visibility of hidden files" }, "x",
{ on = [ "s" ], exec = "search fd", desc = "Search files by name using fd" }, ], run = "yank --cut", desc = "Cut the selected files" },
{ on = [ "S" ], exec = "search rg", desc = "Search files by content using ripgrep" }, { on = [
{ on = [ "<C-s>" ], exec = "search none", desc = "Cancel the ongoing search" }, "p",
{ on = [ "z" ], exec = "jump zoxide", desc = "Jump to a directory using zoxide" }, ], run = "paste", desc = "Paste the files" },
{ on = [ "Z" ], exec = "jump fzf", desc = "Jump to a directory, or reveal a file using fzf" }, { on = [
"P",
], run = "paste --force", desc = "Paste the files (overwrite if the destination exists)" },
{ on = [
"-",
], run = "link", desc = "Symlink the absolute path of files" },
{ on = [
"_",
], run = "link --relative", desc = "Symlink the relative path of files" },
{ on = [
"d",
], run = "remove", desc = "Move the files to the trash" },
{ on = [
"D",
], run = "remove --permanently", desc = "Permanently delete the files" },
{ on = [
"a",
], run = "create", desc = "Create a file or directory (ends with / for directories)" },
{ on = [
"r",
], run = "rename", desc = "Rename a file or directory" },
{ on = [
";",
], run = "shell", desc = "Run a shell command" },
{ on = [
":",
], run = "shell --block", desc = "Run a shell command (block the UI until the command finishes)" },
{ on = [
".",
], run = "hidden toggle", desc = "Toggle the visibility of hidden files" },
{ on = [
"<Space>",
"f",
"g>",
], run = "search fd", desc = "Search files by name using fd" },
{ on = [
"<Space>",
"f",
"G>",
], run = "search rg", desc = "Search files by content using ripgrep" },
{ on = [
"<C-s>",
], run = "search none", desc = "Cancel the ongoing search" },
{ on = [
"z",
], run = "jump zoxide", desc = "Jump to a directory using zoxide" },
{ on = [
"Z",
], run = "jump fzf", desc = "Jump to a directory, or reveal a file using fzf" },
# Copy # Copy
{ on = [ "c", "c" ], exec = "copy path", desc = "Copy the absolute path" }, { on = [
{ on = [ "c", "d" ], exec = "copy dirname", desc = "Copy the path of the parent directory" }, "c",
{ on = [ "c", "f" ], exec = "copy filename", desc = "Copy the name of the file" }, "c",
{ on = [ "c", "n" ], exec = "copy name_without_ext", desc = "Copy the name of the file without the extension" }, ], run = "copy path", desc = "Copy the absolute path" },
{ on = [
"c",
"d",
], run = "copy dirname", desc = "Copy the path of the parent directory" },
{ on = [
"c",
"f",
], run = "copy filename", desc = "Copy the name of the file" },
{ on = [
"c",
"n",
], run = "copy name_without_ext", desc = "Copy the name of the file without the extension" },
# Find # Find
{ on = [ "/" ], exec = "find --smart" }, { on = [
{ on = [ "?" ], exec = "find --previous --smart" }, "/",
{ on = [ "n" ], exec = "find_arrow" }, ], run = "find --smart" },
{ on = [ "N" ], exec = "find_arrow --previous" }, { on = [
"?",
], run = "find --previous --smart" },
{ on = [
"n",
], run = "find_arrow" },
{ on = [
"N",
], run = "find_arrow --previous" },
# Sorting # Sorting
{ on = [ ",", "a" ], exec = "sort alphabetical --dir_first", desc = "Sort alphabetically" }, { on = [
{ on = [ ",", "A" ], exec = "sort alphabetical --reverse --dir_first", desc = "Sort alphabetically (reverse)" }, ",",
{ on = [ ",", "c" ], exec = "sort created --dir_first", desc = "Sort by creation time" }, "a",
{ on = [ ",", "C" ], exec = "sort created --reverse --dir_first", desc = "Sort by creation time (reverse)" }, ], run = "sort alphabetical --dir_first", desc = "Sort alphabetically" },
{ on = [ ",", "m" ], exec = "sort modified --dir_first", desc = "Sort by modified time" }, { on = [
{ on = [ ",", "M" ], exec = "sort modified --reverse --dir_first", desc = "Sort by modified time (reverse)" }, ",",
{ on = [ ",", "n" ], exec = "sort natural --dir_first", desc = "Sort naturally" }, "A",
{ on = [ ",", "N" ], exec = "sort natural --reverse --dir_first", desc = "Sort naturally (reverse)" }, ], run = "sort alphabetical --reverse --dir_first", desc = "Sort alphabetically (reverse)" },
{ on = [ ",", "s" ], exec = "sort size --dir_first", desc = "Sort by size" }, { on = [
{ on = [ ",", "S" ], exec = "sort size --reverse --dir_first", desc = "Sort by size (reverse)" }, ",",
"c",
], run = "sort created --dir_first", desc = "Sort by creation time" },
{ on = [
",",
"C",
], run = "sort created --reverse --dir_first", desc = "Sort by creation time (reverse)" },
{ on = [
",",
"m",
], run = "sort modified --dir_first", desc = "Sort by modified time" },
{ on = [
",",
"M",
], run = "sort modified --reverse --dir_first", desc = "Sort by modified time (reverse)" },
{ on = [
",",
"n",
], run = "sort natural --dir_first", desc = "Sort naturally" },
{ on = [
",",
"N",
], run = "sort natural --reverse --dir_first", desc = "Sort naturally (reverse)" },
{ on = [
",",
"s",
], run = "sort size --dir_first", desc = "Sort by size" },
{ on = [
",",
"S",
], run = "sort size --reverse --dir_first", desc = "Sort by size (reverse)" },
# Tabs # Tabs
{ on = [ "t" ], exec = "tab_create --current", desc = "Create a new tab using the current path" }, { on = [
"t",
], run = "tab_create --current", desc = "Create a new tab using the current path" },
{ on = [ "1" ], exec = "tab_switch 0", desc = "Switch to the first tab" }, { on = [
{ on = [ "2" ], exec = "tab_switch 1", desc = "Switch to the second tab" }, "1",
{ on = [ "3" ], exec = "tab_switch 2", desc = "Switch to the third tab" }, ], run = "tab_switch 0", desc = "Switch to the first tab" },
{ on = [ "4" ], exec = "tab_switch 3", desc = "Switch to the fourth tab" }, { on = [
{ on = [ "5" ], exec = "tab_switch 4", desc = "Switch to the fifth tab" }, "2",
{ on = [ "6" ], exec = "tab_switch 5", desc = "Switch to the sixth tab" }, ], run = "tab_switch 1", desc = "Switch to the second tab" },
{ on = [ "7" ], exec = "tab_switch 6", desc = "Switch to the seventh tab" }, { on = [
{ on = [ "8" ], exec = "tab_switch 7", desc = "Switch to the eighth tab" }, "3",
{ on = [ "9" ], exec = "tab_switch 8", desc = "Switch to the ninth tab" }, ], run = "tab_switch 2", desc = "Switch to the third tab" },
{ on = [
"4",
], run = "tab_switch 3", desc = "Switch to the fourth tab" },
{ on = [
"5",
], run = "tab_switch 4", desc = "Switch to the fifth tab" },
{ on = [
"6",
], run = "tab_switch 5", desc = "Switch to the sixth tab" },
{ on = [
"7",
], run = "tab_switch 6", desc = "Switch to the seventh tab" },
{ on = [
"8",
], run = "tab_switch 7", desc = "Switch to the eighth tab" },
{ on = [
"9",
], run = "tab_switch 8", desc = "Switch to the ninth tab" },
{ on = [ "[" ], exec = "tab_switch -1 --relative", desc = "Switch to the previous tab" }, { on = [
{ on = [ "]" ], exec = "tab_switch 1 --relative", desc = "Switch to the next tab" }, "[",
], run = "tab_switch -1 --relative", desc = "Switch to the previous tab" },
{ on = [
"]",
], run = "tab_switch 1 --relative", desc = "Switch to the next tab" },
{ on = [ "{" ], exec = "tab_swap -1", desc = "Swap the current tab with the previous tab" }, { on = [
{ on = [ "}" ], exec = "tab_swap 1", desc = "Swap the current tab with the next tab" }, "{",
], run = "tab_swap -1", desc = "Swap the current tab with the previous tab" },
{ on = [
"}",
], run = "tab_swap 1", desc = "Swap the current tab with the next tab" },
# Tasks # Tasks
{ on = [ "w" ], exec = "tasks_show", desc = "Show the tasks manager" }, { on = [
"w",
], run = "tasks_show", desc = "Show the tasks manager" },
# Goto # Goto
{ on = [ "g", "h" ], exec = "cd ~", desc = "Go to the home directory" }, { on = [
{ on = [ "g", "c" ], exec = "cd ~/.config", desc = "Go to the config directory" }, "g",
{ on = [ "g", "d" ], exec = "cd ~/Downloads", desc = "Go to the downloads directory" }, "h",
{ on = [ "g", "t" ], exec = "cd /tmp", desc = "Go to the temporary directory" }, ], run = "cd ~", desc = "Go to the home directory" },
{ on = [ "g", "<Space>" ], exec = "cd --interactive", desc = "Go to a directory interactively" }, { on = [
"g",
"c",
], run = "cd ~/.config", desc = "Go to the config directory" },
{ on = [
"g",
"d",
], run = "cd ~/Downloads", desc = "Go to the downloads directory" },
{ on = [
"g",
"t",
], run = "cd /tmp", desc = "Go to the temporary directory" },
{ on = [
"g",
"<Space>",
], run = "cd --interactive", desc = "Go to a directory interactively" },
# Help # Help
{ on = [ "~" ], exec = "help", desc = "Open help" }, { on = [
"~",
], run = "help", desc = "Open help" },
] ]
[tasks] [tasks]
keymap = [ keymap = [
{ on = [ "<Esc>" ], exec = "close", desc = "Hide the task manager" }, { on = [
{ on = [ "<C-q>" ], exec = "close", desc = "Hide the task manager" }, "<Esc>",
{ on = [ "w" ], exec = "close", desc = "Hide the task manager" }, ], run = "close", desc = "Hide the task manager" },
{ on = [
"<C-q>",
], run = "close", desc = "Hide the task manager" },
{ on = [
"w",
], run = "close", desc = "Hide the task manager" },
{ on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" }, { on = [
{ on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" }, "k",
], run = "arrow -1", desc = "Move cursor up" },
{ on = [
"j",
], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "<Up>" ], exec = "arrow -1", desc = "Move cursor up" }, { on = [
{ on = [ "<Down>" ], exec = "arrow 1", desc = "Move cursor down" }, "<Up>",
], run = "arrow -1", desc = "Move cursor up" },
{ on = [
"<Down>",
], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "<Enter>" ], exec = "inspect", desc = "Inspect the task" }, { on = [
{ on = [ "x" ], exec = "cancel", desc = "Cancel the task" }, "<Enter>",
], run = "inspect", desc = "Inspect the task" },
{ on = [
"x",
], run = "cancel", desc = "Cancel the task" },
{ on = [ "~" ], exec = "help", desc = "Open help" } { on = [
"~",
], run = "help", desc = "Open help" },
] ]
[select] [select]
keymap = [ keymap = [
{ on = [ "<C-q>" ], exec = "close", desc = "Cancel selection" }, { on = [
{ on = [ "<Esc>" ], exec = "close", desc = "Cancel selection" }, "<C-q>",
{ on = [ "<Enter>" ], exec = "close --submit", desc = "Submit the selection" }, ], run = "close", desc = "Cancel selection" },
{ on = [
"<Esc>",
], run = "close", desc = "Cancel selection" },
{ on = [
"<Enter>",
], run = "close --submit", desc = "Submit the selection" },
{ on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" }, { on = [
{ on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" }, "k",
], run = "arrow -1", desc = "Move cursor up" },
{ on = [
"j",
], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "K" ], exec = "arrow -5", desc = "Move cursor up 5 lines" }, { on = [
{ on = [ "J" ], exec = "arrow 5", desc = "Move cursor down 5 lines" }, "K",
], run = "arrow -5", desc = "Move cursor up 5 lines" },
{ on = [
"J",
], run = "arrow 5", desc = "Move cursor down 5 lines" },
{ on = [ "<Up>" ], exec = "arrow -1", desc = "Move cursor up" }, { on = [
{ on = [ "<Down>" ], exec = "arrow 1", desc = "Move cursor down" }, "<Up>",
], run = "arrow -1", desc = "Move cursor up" },
{ on = [
"<Down>",
], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "~" ], exec = "help", desc = "Open help" } { on = [
"~",
], run = "help", desc = "Open help" },
] ]
[input] [input]
keymap = [ keymap = [
{ on = [ "<C-q>" ], exec = "close", desc = "Cancel input" }, { on = [
{ on = [ "<Enter>" ], exec = "close --submit", desc = "Submit the input" }, "<C-q>",
{ on = [ "<Esc>" ], exec = "escape", desc = "Go back the normal mode, or cancel input" }, ], run = "close", desc = "Cancel input" },
{ on = [
"<Enter>",
], run = "close --submit", desc = "Submit the input" },
{ on = [
"<Esc>",
], run = "escape", desc = "Go back the normal mode, or cancel input" },
# Mode # Mode
{ on = [ "i" ], exec = "insert", desc = "Enter insert mode" }, { on = [
{ on = [ "a" ], exec = "insert --append", desc = "Enter append mode" }, "i",
{ on = [ "v" ], exec = "visual", desc = "Enter visual mode" }, ], run = "insert", desc = "Enter insert mode" },
{ on = [ "V" ], exec = [ "move -999", "visual", "move 999" ], desc = "Enter visual mode and select all" }, { on = [
"a",
], run = "insert --append", desc = "Enter append mode" },
{ on = [
"v",
], run = "visual", desc = "Enter visual mode" },
{ on = [
"V",
], run = [
"move -999",
"visual",
"move 999",
], desc = "Enter visual mode and select all" },
# Navigation # Navigation
{ on = [ "h" ], exec = "move -1", desc = "Move cursor left" }, { on = [
{ on = [ "l" ], exec = "move 1", desc = "Move cursor right" }, "h",
], run = "move -1", desc = "Move cursor left" },
{ on = [
"l",
], run = "move 1", desc = "Move cursor right" },
{ on = [ "0" ], exec = "move -999", desc = "Move to the BOL" }, { on = [
{ on = [ "$" ], exec = "move 999", desc = "Move to the EOL" }, "0",
{ on = [ "I" ], exec = [ "move -999", "insert" ], desc = "Move to the BOL, and enter insert mode" }, ], run = "move -999", desc = "Move to the BOL" },
{ on = [ "A" ], exec = [ "move 999", "insert --append" ], desc = "Move to the EOL, and enter append mode" }, { on = [
"$",
], run = "move 999", desc = "Move to the EOL" },
{ on = [
"I",
], run = [
"move -999",
"insert",
], desc = "Move to the BOL, and enter insert mode" },
{ on = [
"A",
], run = [
"move 999",
"insert --append",
], desc = "Move to the EOL, and enter append mode" },
{ on = [ "<Left>" ], exec = "move -1", desc = "Move cursor left" }, { on = [
{ on = [ "<Right>" ], exec = "move 1", desc = "Move cursor right" }, "<Left>",
], run = "move -1", desc = "Move cursor left" },
{ on = [
"<Right>",
], run = "move 1", desc = "Move cursor right" },
{ on = [ "b" ], exec = "backward", desc = "Move to the beginning of the previous word" }, { on = [
{ on = [ "w" ], exec = "forward", desc = "Move to the beginning of the next word" }, "b",
{ on = [ "e" ], exec = "forward --end-of-word", desc = "Move to the end of the next word" }, ], run = "backward", desc = "Move to the beginning of the previous word" },
{ on = [
"w",
], run = "forward", desc = "Move to the beginning of the next word" },
{ on = [
"e",
], run = "forward --end-of-word", desc = "Move to the end of the next word" },
# Deletion # Deletion
{ on = [ "d" ], exec = "delete --cut", desc = "Cut the selected characters" }, { on = [
{ on = [ "D" ], exec = [ "delete --cut", "move 999" ], desc = "Cut until the EOL" }, "d",
{ on = [ "c" ], exec = "delete --cut --insert", desc = "Cut the selected characters, and enter insert mode" }, ], run = "delete --cut", desc = "Cut the selected characters" },
{ on = [ "C" ], exec = [ "delete --cut --insert", "move 999" ], desc = "Cut until the EOL, and enter insert mode" }, { on = [
{ on = [ "x" ], exec = [ "delete --cut", "move 1 --in-operating" ], desc = "Cut the current character" }, "D",
], run = [
"delete --cut",
"move 999",
], desc = "Cut until the EOL" },
{ on = [
"c",
], run = "delete --cut --insert", desc = "Cut the selected characters, and enter insert mode" },
{ on = [
"C",
], run = [
"delete --cut --insert",
"move 999",
], desc = "Cut until the EOL, and enter insert mode" },
{ on = [
"x",
], run = [
"delete --cut",
"move 1 --in-operating",
], desc = "Cut the current character" },
# Yank/Paste # Yank/Paste
{ on = [ "y" ], exec = "yank", desc = "Copy the selected characters" }, { on = [
{ on = [ "p" ], exec = "paste", desc = "Paste the copied characters after the cursor" }, "y",
{ on = [ "P" ], exec = "paste --before", desc = "Paste the copied characters before the cursor" }, ], run = "yank", desc = "Copy the selected characters" },
{ on = [
"p",
], run = "paste", desc = "Paste the copied characters after the cursor" },
{ on = [
"P",
], run = "paste --before", desc = "Paste the copied characters before the cursor" },
# Undo/Redo # Undo/Redo
{ on = [ "u" ], exec = "undo", desc = "Undo the last operation" }, { on = [
{ on = [ "<C-r>" ], exec = "redo", desc = "Redo the last operation" }, "u",
], run = "undo", desc = "Undo the last operation" },
{ on = [
"<C-r>",
], run = "redo", desc = "Redo the last operation" },
# Help # Help
{ on = [ "~" ], exec = "help", desc = "Open help" } { on = [
"~",
], run = "help", desc = "Open help" },
] ]
[help] [help]
keymap = [ keymap = [
{ on = [ "<Esc>" ], exec = "escape", desc = "Clear the filter, or hide the help" }, { on = [
{ on = [ "q" ], exec = "close", desc = "Exit the process" }, "<Esc>",
{ on = [ "<C-q>" ], exec = "close", desc = "Hide the help" }, ], run = "escape", desc = "Clear the filter, or hide the help" },
{ on = [
"q",
], run = "close", desc = "Exit the process" },
{ on = [
"<C-q>",
], run = "close", desc = "Hide the help" },
# Navigation # Navigation
{ on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" }, { on = [
{ on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" }, "k",
], run = "arrow -1", desc = "Move cursor up" },
{ on = [
"j",
], run = "arrow 1", desc = "Move cursor down" },
{ on = [ "K" ], exec = "arrow -5", desc = "Move cursor up 5 lines" }, { on = [
{ on = [ "J" ], exec = "arrow 5", desc = "Move cursor down 5 lines" }, "K",
], run = "arrow -5", desc = "Move cursor up 5 lines" },
{ on = [
"J",
], run = "arrow 5", desc = "Move cursor down 5 lines" },
{ on = [ "<Up>" ], exec = "arrow -1", desc = "Move cursor up" }, { on = [
{ on = [ "<Down>" ], exec = "arrow 1", desc = "Move cursor down" }, "<Up>",
], run = "arrow -1", desc = "Move cursor up" },
{ on = [
"<Down>",
], run = "arrow 1", desc = "Move cursor down" },
# Filtering # Filtering
{ on = [ "/" ], exec = "filter", desc = "Apply a filter for the help items" }, { on = [
"/",
], run = "filter", desc = "Apply a filter for the help items" },
] ]

@ -0,0 +1 @@
Subproject commit 54b34c2b337ab0933130a06f61038398efa9ce65

@ -0,0 +1 @@
Subproject commit a653e7a0e90327b0e8f53544c4af097df2e49bc7

149
yazi/theme.toml Normal file
View file

@ -0,0 +1,149 @@
# vim:fileencoding=utf-8:foldmethod=marker
# : Manager {{{
[manager]
cwd = { fg = "#94e2d5" }
# Hovered
hovered = { reversed = true }
preview_hovered = { underline = true }
# Find
find_keyword = { fg = "#f9e2af", bold = true, italic = true, underline = true }
find_position = { fg = "#f5c2e7", bg = "reset", bold = true, italic = true }
# Marker
marker_copied = { fg = "#a6e3a1", bg = "#a6e3a1" }
marker_cut = { fg = "#f38ba8", bg = "#f38ba8" }
marker_marked = { fg = "#f9e2af", bg = "#f9e2af" }
marker_selected = { fg = "#779EF0", bg = "#89b4fa" }
# Tab
tab_active = { fg = "#1e1e2e", bg = "#cdd6f4" }
tab_inactive = { fg = "#cdd6f4", bg = "#45475a" }
tab_width = 1
# Count
count_copied = { fg = "#1e1e2e", bg = "#a6e3a1" }
count_cut = { fg = "#1e1e2e", bg = "#f38ba8" }
count_selected = { fg = "#1e1e2e", bg = "#89b4fa" }
# Border
border_symbol = "│"
border_style = { fg = "#7f849c" }
# : }}}
# : Status {{{
[status]
separator_open = ""
separator_close = ""
separator_style = { fg = "#45475a", bg = "#45475a" }
# Mode
mode_normal = { fg = "#1e1e2e", bg = "#89b4fa", bold = true }
mode_select = { fg = "#1e1e2e", bg = "#a6e3a1", bold = true }
mode_unset = { fg = "#1e1e2e", bg = "#f2cdcd", bold = true }
# Progress
progress_label = { fg = "#ffffff", bold = true }
progress_normal = { fg = "#89b4fa", bg = "#45475a" }
progress_error = { fg = "#f38ba8", bg = "#45475a" }
# Permissions
permissions_t = { fg = "#89b4fa" }
permissions_r = { fg = "#f9e2af" }
permissions_w = { fg = "#f38ba8" }
permissions_x = { fg = "#a6e3a1" }
permissions_s = { fg = "#7f849c" }
# : }}}
# : Input {{{
[input]
border = { fg = "#89b4fa" }
title = {}
value = {}
selected = { reversed = true }
# : }}}
# : Select {{{
[select]
border = { fg = "#89b4fa" }
active = { fg = "#f5c2e7" }
inactive = {}
# : }}}
# : Tasks {{{
[tasks]
border = { fg = "#89b4fa" }
title = {}
hovered = { underline = true }
# : }}}
# : Which {{{
[which]
mask = { bg = "#313244" }
cand = { fg = "#94e2d5" }
rest = { fg = "#9399b2" }
desc = { fg = "#f5c2e7" }
separator = "  "
separator_style = { fg = "#585b70" }
# : }}}
# : Help {{{
[help]
on = { fg = "#f5c2e7" }
exec = { fg = "#94e2d5" }
desc = { fg = "#9399b2" }
hovered = { bg = "#585b70", bold = true }
footer = { fg = "#45475a", bg = "#cdd6f4" }
# : }}}
# : File-specific styles {{{
[filetype]
rules = [
# Images
{ mime = "image/*", fg = "#94e2d5" },
# Videos
{ mime = "video/*", fg = "#f9e2af" },
{ mime = "audio/*", fg = "#f9e2af" },
# Archives
{ mime = "application/zip", fg = "#f5c2e7" },
{ mime = "application/gzip", fg = "#f5c2e7" },
{ mime = "application/x-tar", fg = "#f5c2e7" },
{ mime = "application/x-bzip", fg = "#f5c2e7" },
{ mime = "application/x-bzip2", fg = "#f5c2e7" },
{ mime = "application/x-7z-compressed", fg = "#f5c2e7" },
{ mime = "application/x-rar", fg = "#f5c2e7" },
# Fallback
{ name = "*", fg = "#cdd6f4" },
{ name = "*/", fg = "#89b4fa" }
]
# : }}}

View file

@ -15,33 +15,27 @@ cache_dir = ""
[opener] [opener]
folder = [ folder = [
{ exec = 'open -R "$@"', orphan = true, display_name = "Reveal in Finder" }, { run = 'open -R "$@"', orphan = true, display_name = "Reveal in Finder" },
{ exec = '$EDITOR "$@"', orphan = true }, { run = '$EDITOR "$@"', orphan = true },
]
archive = [
{ exec = 'unar "$1"', display_name = "Extract here" },
]
text = [
{ exec = '$EDITOR "$@"', orphan = true },
] ]
archive = [{ run = 'unar "$1"', display_name = "Extract here" }]
text = [{ run = '$EDITOR "$@"', orphan = true }]
image = [ image = [
{ exec = 'imv "$@"', orphan = true, display_name = "Open" }, { run = 'imv "$@"', orphan = true, display_name = "Open" },
{ exec = '''exiftool "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show EXIF" }, { run = '''exiftool "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show EXIF" },
]
pdf = [
{ exec = 'zathura "$@"', orphan = true, display_name = "Open" },
] ]
pdf = [{ run = 'zathura "$@"', orphan = true, display_name = "Open" }]
video = [ video = [
{ exec = 'mpv "$@"', orphan = true }, { run = 'mpv "$@"', orphan = true },
{ exec = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show media info" }, { run = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show media info" },
] ]
audio = [ audio = [
{ exec = 'xdg-open "$@"', orphan = true }, { run = 'xdg-open "$@"', orphan = true },
{ exec = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show media info" }, { run = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, display_name = "Show media info" },
] ]
fallback = [ fallback = [
{ exec = 'xdg-open "$@"', orphan = true, display_name = "Open" }, { run = 'xdg-open "$@"', orphan = true, display_name = "Open" },
{ exec = 'xdg-open -R "$@"', orphan = true, display_name = "Reveal in Finder" }, { run = 'xdg-open -R "$@"', orphan = true, display_name = "Reveal in Finder" },
] ]
[open] [open]
@ -76,3 +70,9 @@ bizarre_retry = 5
[log] [log]
enabled = false enabled = false
[plugin]
prepend_previewers = [
{ name = "*.md", run = "glow" },
{ mime = "text/csv", run = "miller" },
]