#!/usr/bin/env bash DEST=${1:-/etc/skel} LAZY_DEST=${DEST}/.config/nvim/lua/plugins LAZY_SYNTAX=${DEST}/.config/nvim/after/queries # Yazi tui filemanager # For extra configuration options see: # https://github.com/mikavilpas/yazi.nvim # https://github.com/mikavilpas/yazi.nvim#%EF%B8%8F%EF%B8%8F-advanced-configuration conf_print_yazi() { cat <-", mode = { "n", "v" }, "Yazi", desc = "Open yazi at the current file", }, { -- Open in the current working directory "cw", "Yazi cwd", desc = "Open the file manager in nvim's working directory", }, { "", "Yazi toggle", desc = "Resume the last yazi session", }, }, ---@type YaziConfig | {} opts = { -- if you want to open yazi instead of netrw, see below for more info open_for_directories = false, keymaps = { show_help = "", }, }, -- 👇 if you use \$(open_for_directories=true), this is recommended init = function() -- mark netrw as loaded so it's not loaded at all. -- -- More details: https://github.com/mikavilpas/yazi.nvim/issues/802 vim.g.loaded_netrwPlugin = 1 end, } } EOF } conf_print_yazi | tee "${LAZY_DEST}/yazi.lua" conf_print_time-machine() { cat <t", "", desc = "Time Machine", }, { "tt", "TimeMachineToggle", desc = "[Time Machine] Toggle Tree", }, { "tx", "TimeMachinePurgeCurrent", desc = "[Time Machine] Purge current", }, { "tX", "TimeMachinePurgeAll", desc = "[Time Machine] Purge all", }, { "tl", "TimeMachineLogShow", desc = "[Time Machine] Show log", }, }, } EOF } conf_print_time-machine | tee "${LAZY_DEST}/time-machine.lua" # Use triple backtick for code blocks rather than tab # set code-block-style: or MD046: om ~/.markdownlint-cli2.yaml conf_print_markdownlint_yaml() { cat <= 0.12, you can use the multi node pattern instead of ; combining injections: ; ; ((comment)+ @injection.content ; (#lua-match? @injection.content "^#USAGE ") ; (#offset! @injection.content 0 7 0 1) ; (#set! injection.language "kdl")) ; ; this is the preferred way as combined injections have multiple ; limitations: ; https://github.com/neovim/neovim/issues/32635 EOF } conf_print_bash_injections | tee "${LAZY_SYNTAX}/bash/injections.scm" conf_print_bash_injections | tee "${LAZY_SYNTAX}/python/injections.scm" conf_print_go_injections() { cat < -- ──────────────────────────────────────────────── -- Default (what you get with just kitty_scrollback_nvim) default = {}, -- Opens scrollback and immediately starts backward search (?) search = { callbacks = { after_ready = function() vim.api.nvim_feedkeys('?', 'n', false) end, }, }, -- Only shows the last command output (very clean for quick checks) last_cmd = { kitty_get_text = { extent = 'last_non_empty_output', -- or 'output' / 'screen' }, status_window = { enabled = false, -- cleaner without status if only last cmd }, }, }) end, } EOF } config_print_kitty_scrollback | tee "${LAZY_DEST}/kitty-scrollback.lua" # PlatformIO wrapper for neovim written lua. # conf_print_platformio() { # cat <