EP6JDCXOC25RA4LD7RNLHLCSZ5JP45SQOUF6TXVFQ6DDVU5STOIQC (fn foreach [f lst]`(do ,(unpack(icollect [_ v (ipairs lst)]`(,f ,v)))))(fn foreachMulti [f lst]`(do ,(unpack(icollect [_ v (ipairs lst)]`(,f (table.unpack ,v)))))){: foreach : foreachMulti}
(tset vim :opt :runtimepath "~/.config/nvim,~/.local/share/nvim/runtime,~/.local/lib/nvim")(let [clibpath (.. (vim.fn.stdpath "config") "/lib/?.so")](tset package :cpath (.. package.cpath ";" clibpath)))nil
(local M {})(fn M.open-wrapwin [](let [curwin (vim.api.nvim_tabpage_get_win 0)newwin (vim.api.nvim_open_win 0 false { :split :left })winheight (vim.api.nvim_win_get_height 0)winbot (vim.fn.line :w$)targetline (+ winbot (math.floor (/ winheight 2) -1))]; scroll new window page forward(vim.api.nvim_win_set_cursor 0 [targetline 1])(vim.cmd.normal :zz); enable scrollbind for both(tset vim :o :scrollbind true)(vim.api.nvim_tabpage_set_win 0 newwin)(tset vim :o :scrollbind true); delete only new window(vim.keymap.set :n :<c-c>#((vim.api.nvim_win_close newwin false)(vim.keymap.set :n :Q :ZZ)){ :buffer true }); delete both of windows(vim.keymap.set :n :Q#((vim.api.nvim_win_close newwin false)(vim.api.nvim_tabpage_set_win 0 curwin)(vim.cmd.quit)){ :buffer true })(vim.keymap.set :n :<c-f> :2<c-f> { :buffer true })(vim.keymap.set :n :<c-b> :2<c-b> { :buffer true })(vim.keymap.set :n :<c-d> :<c-f> { :buffer true })(vim.keymap.set :n :<c-u> :<c-b> { :buffer true })))M
(local M {})(fn M.get-visual-selection [](let [buf (vim.api.nvim_get_current_buf)[s-row s-col] (vim.api.nvim_buf_get_mark buf :<)[e-row e-col] (vim.api.nvim_buf_get_mark buf :>)](vim.range s-row s-col e-row e-col)))M
(local extui (require :vim._extui))(extui.enable { :enable true })
(local M {})(fn make-uniq [str](.. "<plug>(" str ")"))(fn map [mode lhs rhs remap](vim.keymap.set mode lhs rhs { :expr (vim.is_callable rhs) :remap remap }));;;@class Autos;;;@field entering (fun(): string?|string)?;;;@field repeating (fun(): string?|string)?;;;@field leaving (fun(): string?|string)? (reserved);;;@class Follower;;;@field key string;;;@field run-when Autos?;;;@param mode string|string[];;;@param leader string;;;@param followers Follower[](fn M.set-submode-keymap [mode leader followers](let [uniqid (make-uniq leader)uniqpre (.. uniqid leader)](each [_ {: key : run-when} (ipairs followers)](let [k (.. leader key)get-rhs (lambda [any](case (type any):nil :nil:string (.. any uniqpre):function (.. (or (any) "") uniqpre)_ (.. k uniqpre)))](map mode k (get-rhs run-when.entering) true)(map mode (.. uniqpre key) (get-rhs run-when.repeating) true)))(map mode uniqpre "" true)));;;@class AccOpts;;;@field base number?;;;@field thre number?;;;@param mode string|string[];;;@param key string;;;@param callback (fun(): string?)?;;;@param opts AccOpts?(fn M.acceleration-key [mode key callback opts](let [uniqid (make-uniq key)base (if opts opts.base 2)thre (if opts opts.thre 3)](var count 0)(vim.keymap.set mode key#(if (> vim.v.count 0)key(do(set count 1)(if callback(.. (or (callback) "") uniqid)(.. key uniqid)))))(vim.keymap.set mode (.. uniqid key)#(let [spped (math.pow base (math.floor (/ count thre)))](set count (+ count 1))(if callback(.. speed (or (callback) key) uniqid)(.. speed key uniqid))){ :expr true })(vim.keymap.set mode uniqid "")))M
(local mysnip {})(local M {})(local map vim.keymap.set)(fn M.set-snip [sn](tset mysnip sn.abbr sn.snip))(fn M.setup-keymap [](map :i :<tab>#(let [[row col] (vim.api.nvim_win_get_cursor 0)](if (= 0 col):<tab>(let [newpos [row (- col 1)]cword (vim.fn.expand :<cword>)snip (. mysnip cword)](vim.api.nvim_win_set_cursor 0 newpos)(if snip(.. "<esc>ciw<cmd>lua vim.snippet.expand'" (snip:gsub "\n" "\\n") "'<cr>")(do (vim.api.nvim_win_set_cursor 0 curpos)(if (vim.snippet.active { :direction 1 })"<cmd>lua vim.snippet.jump(1)""<tab>")))))){ :expr true })(map [:i :s] :<s-tab>#(if (vim.snippet.active { :direction 1 })(vim.snippet.jump -1):<s-tab>){ :expr true }))M
(import-macros {: foreachMulti} :macros)(local map vim.keymap.set){ :folke/flash.nvim{ :modname "flash":opts {}:callback#((: (require :flash) :toggle true)) }:gbprod/substitute.nvim{ :modname "substitute":callback#(let [sub (require :substitute)](map :n :s sub.operator)(map :n :ss sub.line)(map :n :S sub.eol)(map :x :s sub.visual)) }:kylechui/nvim-surround{ :modname "nvim-surround":opts {} }:stevearc/oil.nvim{ :modname "oil":opts{ :columns [:icon :permission :size :mtime] }:callback#(map :n :^o (. (require :oil) :toggle_float)) }:altermo/ultimate-autopair.nvim{ :modname "ultimate-autopair":opts{ :fastwarp { :rmap "<a-y>" :rcmap "<a-y>" }:tabout { :enable true :multi true :hopout true }:bs { :indent_ignore true }:space2 { :enable true }:extensions { :fly { :enable true :multiline true } } } }:utilyre/sentiment.nvim{ :modname "sentiment":opts {}:callback #(tset vim :g :loaded_matchparen 1) }:niui/track.nvim{ :modname "trach":opts {}:callback#(let [track (require :track) markfile (.. (vim.fn.stdpath :data) "marks/mark.json")](foreachMulti (partial map :n)[[:ma track.add_mark][:mA track.add_flow][:md track.delete_mark][:mD track.delete_flow][:mu track.update_mark][:mU track.update_flow][:ms #(track.store_marks markfile)]])(track.restore_marks markfile)) }:nvim-telescope/telescope.nvim{ :modname "telescope":opts {}:dependencies [:nvim-lua/plenary.nvim] }:hadronized/hop.nvim{ :modname "hop":opts {}:callback#(let [hop (require :hop)](foreachMulti (partial map [:n :v :o])[[:gw hop.hint_words][:ga hop.hint_anywhere]])) }:zbirenbaum/copilot.lua{ :modname "copilot":opts{ :suggestion{ :enabled true:auto_trigger false:keymap{ :accept :<c-s-y>:next :<c-s-n>:prev :<c-s-p>:dismiss :<c-s-e> } }:filetypes { :gitcommit true } } }:nvim-treesitter/nvim-treesitter{ :modname :nvim-treesitter:opts { :ensure_installed "all" } }:SmiteshP/nvim-navic{ :modname "nvim-navic":opts{ :lsp { :auto_attach true }:highlight true} }:SmiteshP/nvim-navbuddy{ :modname "nvim-navbuddy":opts{ :lsp { :auto_attach true }:highlight true }:dependencies [:SmiteshP/nvim-navic :MunifTanjim/nui.nvim] }:MunifTanjim/nui.nvim { :modname "nui" }:andersevenrud/nvim_context_vt{ :modname "nvim_context_vt":opts { :enabled true } }:sphamba/smear-cursor.nvim{ :modname "smear_cursor":opts {} }:nvim-tree/nvim-web-devicons {}:niuiic/core.nvim {}:nvim-lua/plenary.nvim {}}
(import-macros {: foreach} :macros)(local au vim.api.nvim_create_autocmd)(local map vim.keymap.set)(local pluginOptions (require :plugindata))(fn Load_plugin [plugname](when (. pluginOptions plugname)(let [url (.. "https://github.com/" plugname)p (partial . pluginOptions plugname){ : modname : opts : callback : dependencies } p](when dependencies(each [_ dep (ipairs dependencies)](Load_plugin dep)))(vim.pack.add [url])(when opts ((. (require modname) :setup) opts))(when callback (callback))(tset pluginOptions plugname nil))))(au [:UIEnter]{ :callback#(foreach Load_plugin[:folke/flash.nvim:gbprod/substitute.nvim:kylechui/nvim-surround:andersecenrud/nvim_context_vt])})(map :n :^a#((Load_plugin :zbirenbaum/copilot.lua)(let [sug (require :copilot.suggestion)](map :n :^a sug.toggle_auto_trigger)(sug.toggle_auto_trigger))))(map :n :g/#((Load_plugin :nvim-telescope/telescope.nvim)(let [tb (require :telescope.builtin)](map :n :g/ tb.live_grep)(tb.live_grep))))(map :n :m#((Load_plugin :niuiic/track.nvim)(vim.keymap.del :n :m)(vim.fn.feedkeys :m)))(map :n :<a-n>#((Load_plugin :SmiteshP/nvim-navbuddy)(map :n :<a-n> vim.cmd.Navbuddy)(vim.cmd.Navbuddy)))(fn Load_cmdln [](require :command)(require :fzf)(Load_plugin :stevearc/oil.nvim))(au [:CmdlineEnter]{ :once true:callback Load_cmdln })(au [:InsertEnter :CmdlineEnter]{ :once true:callback#(Load_plugin :altermo/ultimate-autopair.nvim)})(au [:CursorMoved]{ :once true:callback#((Load_plugin :mini.indentscope)(Load_plugin :utilyre/sentiment.nvim)(Load_plugin :hadronized/hop.nvim))})
(local o vim.opt)(tset o :autoread true)(tset o :autowrite true)(tset o :complete "w,i,d,kspell")(tset o :completeopt "menuone,preinsert,noselect,popup,fuzzy")(tset o :cursorline true)(tset o :expandtab true)(tset o :foldmethod "manual")(tset o :fillchars { :stl " " :stlnc " " })(tset o :gdefault true)(tset o :guicursor "n-v-c-sm:block,i-ci-ve:ver25-blinkwait1000-blinkoff300-blinkon1000,t:block-TermCursor")(tset o :guifont "PlemolJP35 Console NF:h8")(tset o :helplang "ja,en")(tset o :hidden true)(tset o :ignorecase true)(tset o :hlsearch false)(tset o :incsearch false)(tset o :laststatus 0)(tset o :mouse "")(tset o :number false)(tset o :paragraphs "")(tset o :path ".,,,**")(tset o :ruler false)(tset o :scrolloff 10)(tset o :shada "")(tset o :shell "/run/current-system/sw/bin/zsh")(tset o :shiftwidth 4)(tset o :showcmd false)(tset o :showmode false)(tset o :showtabline 0)(tset o :signcolumn "yes")(tset o :smartcase true)(tset o :smartindent true)(tset o :statusline " ")(tset o :tabstop 4)(tset o :termguicolors true)(tset o :textwidth 0)(tset o :timeout false)(tset o :undodir (.. (vim.fn.stdpath :data) "/undo"))(tset o :undofile true)(tset o :wildmenu true)(tset o :wrap false)(tset vim :g :copilot_filetypes { :gitcommit true :yaml true :markdown true })(when vim.g.neovide(tset vim :g :neovide_hide_mouse_when_typing true)(tset vim :g :neovide_opacity 1.0)(tset vim :g :transparency 1.0)(tset vim :g :neovide_text_gamma 0)(tset vim :g :neovide_text_contrast 0.0)(tset vim :g :terminal_color_0 :#171717) ; black(tset vim :g :terminal_color_1 :#d81765) ; normal red(tset vim :g :terminal_color_2 :#97d01a) ; normal green(tset vim :g :terminal_color_3 :#ffa800) ; normal yellow(tset vim :g :terminal_color_4 :#16b1fb) ; normal blue(tset vim :g :terminal_color_5 :#ff2491) ; normal magenta(tset vim :g :terminal_color_6 :#0fdcb6) ; normal cyan(tset vim :g :terminal_color_7 :#ebebeb) ; light gray(tset vim :g :terminal_color_8 :#88757c) ; dark gray(tset vim :g :terminal_color_9 :#ff0000) ; bright red(tset vim :g :terminal_color_10 :#76b639) ; bright green(tset vim :g :terminal_color_11 :#f7b125) ; bright yellow(tset vim :g :terminal_color_12 :#289cd5) ; bright blue(tset vim :g :terminal_color_13 :#ff2491) ; bright magenta(tset vim :g :terminal_color_14 :#0a9b81) ; bright cyan(tset vim :g :terminal_color_15 :#f8f8f8) ; white)
(import-macros {: foreach : foreachMulti} :macros)(local map vim.keymap.set)(local submode (require :submode))(tset vim :g :mapleader " ")(fn smart-gf [](let [fpath (vim.fn.expand "<cfile>")](if (not= "https://" (fpath:sub 1 8))(vim.cmd.normal "gF")(do(vim.cmd.term (.. "w3m " fpath))(vim.cmd.startinsert)))))(fn smart-i [](if (: (vim.fn.getline ".") :match "^ *$")(vim.api.nvim_input "\"_cc")(vim.cmd.startinsert)))(foreachMulti (partial map :n)[[:<BS> :<c-b>][:<delete> :<c-f>][:<c-s-e> :5<c-e>][:<c-s-y> :5<c-y>][:i smart-i][:S :c^][:Q :ZZ { :noremap true }][:ZZ #(do (vim.cmd.mksession (.. vim.env.HOME "/.cache/nvim/session.nvim")) (vim.cmd.wqa))][:gk :25k][:gj :25j][:gf smart-gf][:gb vim.cmd.bnext][:gB vim.cmd.bprev][:^n #(tset vim :o :number (not vim.o.number))][:^r #(tset vim :o :relativenumber (not vim.o.relativenumber))][:^s #(tset vim :o :spell (not vim.o.spell))][:<c-z> :<cmd>w<CR><c-z>][:zS vim.show_pos]])(foreachMulti (partial map [:n :v])[["q;" :q:]])(foreachMulti (partial map [:n :v :o])[[:K :5k][:J :5j][:gl :$l][:gh :^]["]b" "])"]["[b" "[("]["]B" "]}"]["[B" "[{"]])(foreachMulti (partial map "i")[[:<esc> :<right><esc>]])(foreachMulti (partial map "v")[[:v :<c-v>][:aa :VggoG]])(foreachMulti (partial map "o")[[:. :i>][:iq "i'"][:iQ "i\""][:aq "a'"][:aQ "a\""][:i<space> :iW][:a<space> :aW]])(foreachMulti (partial map "t")[[:<c-\\> :<c-\\><c-n>]])(submode.set-submode-keymap "n" "g"[{ :key "t" }{ :key "T" }{ :key "e" }{ :key "E" }{ :key "J" }])(submode.set-submode-keymap "n" "d"[{ :key "h" }{ :key "l" }])(submode.set-submode-keymap "n" "<c-w>"[{ :key ">" }{ :key "<" }{ :key "+" }{ :key "-" }{ :key "h" }{ :key "j" }{ :key "k" }{ :key "l" }])(submode.set-submode-keymap "n" "z"[{ :key "<space>" :run-when { :entering "<c-f>" :repeating "<c-f>" } }{ :key "b" :run-when { :entering "<c-b>" :repeating "<c-b>" } }])(submode.set-submode-keymap "n" "*"[{ :key "*" :run-when { :entering "#*" :repeating "*" } }{ :key "#" :run-when { :entering "*#" :repeating "#" } }])(foreach (partial submode.acceleration-key :n)[:h:j:k:l])(fn safe-cabbr [lhs rhs](vim.cmd (.. "cabbrev <expr>" lhs " (getcmdtype() ==# ':' && getcmdline() ==# '" lhs "') ? '" rhs "' : '" lhs "'")))(safe-cabbr "r" "lua require")(safe-cabbr "l" "lua")nil
(var M {})(vim.keymap.set "n" "=" vim.lsp.buf.format)(vim.keymap.set "n" "^h" #(vim.lsp.inlay_hint.enable (not (vim.lsp.inlay_hint.is_enabled))))(vim.keymap.set "n" "gd" vim.lsp.buf.definition)(vim.keymap.set "n" "grh" vim.lsp.buf.hover)(fn M.on_attach [client buf](let [chars (fcollect [i 32 126](string.char i))](tset client :server_capabilities :completionProvider :triggerCharacters chars))(vim.lsp.completion.enabletrueclient.idbuf{ :autotrigger true:convert #{ :abbr ($.label:gsub "%b()" "") } }))M
(local map vim.keymap.set)(local api vim.api)(fn print-blame-text [](let [curfile (vim.fn.expand "%")line (api.nvim_win_get_cursor 0)blame (vim.fn.system (string.format "git blame -c -L %d,%d %s" (. line 1) (. line 1) curfile))hash (string.match blame "%S+")](print (if (= hash " 00000000")"Not Committed Yet"(let [cmd (.. "git show " hash " --format='%an | %ar | %s' | head -n 1")](: (vim.fn.system cmd) :sub 1 -2))))))(map "n" "\\b" print-blame-text)nil
(fn get-files-recursive [directory files](let [curdir vim.env.PWDdirectory-files (vim.fn.readdir directory)ignored-dirs ["." ".." ".git" "build" "bin" "plugins"]](each [_ file (ipairs directory-files)](let [full-path (.. directory "/" file)](if (and (not= 0 (vim.fn.isdirectory full-path)) (not (vim.tbl_contains ignored-dirs file)))(get-files-recursive full-path files)(table.insert files (full-path:sub (+ 2 (length curdir)))))))files)(var file-cache nil)(vim.api.nvim_create_user_command "F"(lambda [opts](vim.cmd.tabnew (. opts.fargs 1))){ :nargs 1:bars true:complete(lambda [trigger](if (not file-cache)(set file-cache (get-files-recursive vim.env.PWD {})))(if (> (length trigger) 0)(vim.fn.matchfuzzy file-cache trigger)file-cache)) }))
(local au vim.api.nvim_create_autocmd)(local snip (require "snippet"))(fn quickeval [cmd](let [range (. (require "utils") :get-visual-selection)start range.startend_ range.end_content (vim.fn.getregion start end_ { :type (vim.fn.mode 1) })tmpfilename (.. "/tmp/nvim-ftplugin." (vim.fn.expand "%:e"))file (assert io.open tmpfilename "w")](each [_ line (ipairs content)](file:write (.. line "\n")))(file:close)(vim.cmd (.. "vert term" cmd tmpfilename))(vim.cmd.startinsert)))(au "FileType"{ :callback(lambda [ev](let [ft ev.match[ok ftp] (pcall require (.. "ftplugin." ft))](when ok(when ftp.lsp(set ftp.lsp.on_attach (. (require "lsp") :on-attach))(: (vim.uv.new_async (vim.schedule_wrap #(vim.lsp.start ftp.lsp))) :send))(if ftp.quickeval_cmd(vim.keymap.set "v" "x" #(quickeval ftp.quickeval_cmd)))(if ftp.callback(ftp.callback))(when ftp.snippet(snip.setup_keymap)(each [_ sn (ipairs ftp.snippet)](snip.set_snip sn)))))) })nil
(local IM_cmd "fcitx5-remote")(local toggle_IM [IM_cmd "-t"])(var was_IM_enabled false)(fn get_IM_status [](= "2" (: (. (: (vim.system [IM_cmd]) :wait) :stdout) :sub 1 1)))(fn toggle_IM_status [](if was_IM_enabled (vim.system toggle_IM)))(vim.api.nvim_create_autocmd "InsertEnter" { :callback toggle_IM_status })(vim.api.nvim_create_autocmd "InsertLeave"{ :callback(lambda [](set was_IM_enabled (get_IM_status))(toggle_IM_status)) })nil
(local dmacro-key "<C-T>")(local clear-key "<C-S-T>")(var key-log "")(var prev-macro nil)(fn guess-macro [kl](for [i (/ (length kl) 2) (length kl)](let [curspan (kl:sub i)srchspan (kl:sub 1 (- i 1))[start end] (srchspan:find curspan 1 true)](when (and start end)(set prev-macro (srchspan:sub start))(srchspan:sub (+ end 1))))))(fn key-logger [_ typed](let [readable-keycode (vim.fn.keytrans typed)](if (~= readable-keycode dmacro-key)(set key-log (.. key-log readable-keycode))(if (> (length key-log) 100)(set key-log (key-log:sub (- (length key-log) 100))))(set prev-macro nil))))(vim.on_key key-logger)(vim.keymap.set ["i" "n" "v" "o" "c" "t"] dmacro-key#(vim.api.nvim_input (or prev-macro (guess-macro key-log) "")))(vim.keymap.set ["i" "n" "v" "o" "c" "t"] clear-key#(set key-log ""))nil
(local command vim.api.nvim_create_user_command)(command "M"(lambda [opts](let [args (table.concat opts.fargs " ")](vim.cmd.term (.. "man " args "| bat -p -l man"))(vim.cmd.startinsert))){ :nargs "*":bar true })(command "W"(lambda [opts](vim.cmd.term (.. "w3m " (. opts.fargs 1)))(vim.cmd.startinsert)){ :nargs 1:bar true })(command "H"(lambda [opts](vim.cmd (.. "tab h " (. opts.fargs 1)))(. (require "wrapwin") :open-wrapwin)){ :nargs 1:complete "help" })(command "VS"(lambda [](. (require "wrapwin") :open-wrapwin)){ :nargs 0 })nil
(local ns{ :green "#07d101":blue "#00bfff":cream "#edf0e0":pink "#f584c6":red "#f85624":dustypink "#d8916e":navy "#0047ab":gray "#c0c0c0":greenyellow "#adff2f":electriclime "#ccff00":darkgreen "#228b22":lightpink "#ffb7c5":gold "#ffd700" })(local hi (partial vim.api.nvim_set_hl 0))(hi :Normal { :bg "none" })(hi :NormalNC { :bg "none" })(hi :SignColumn { :bg "none" })(hi :CursorLine { :bg "none" })(hi :CursorLineNR { :bg "none" :fg ns.red :bold true })(hi :CursorLineNC { :bg "none" })(hi :LineNr { :bg "none" :fg ns.navy })(hi :StatusLine { :bg "none" })(hi :StatusLineNC { :bg "none" })(hi :LspInlayHint { :fg "DarkCyan" })(hi :Visual { :bg ns.blue })(hi :PmenuSel { :bg ns.blue :fg ns.gold })(hi :Search { :fg ns.cream })(hi :CurSearch { :bg ns.cream :fg ns.darkgreen })(hi :Substitute { :fg ns.cream })(hi :WinSeparator { :fg ns.blue })(hi :Boolean { :fg ns.blue })(hi :Comment { :fg ns.gray })(hi :Constant { :fg ns.pink })(hi :Statement { :fg ns.green :bold true })(hi :KeyWord { :fg ns.cream :bold true })(hi :PreProc { :fg ns.dustypink })(hi :Identifier { :fg ns.greenyellow :bold true })(hi :Special { :fg ns.blue })(hi :String { :fg ns.lightpink })(hi :Type { :fg ns.blue :bold true })(hi :Number { :fg ns.gold })(hi :Todo { :bg ns.cream :fg ns.navy :bold true })(hi :Operator { :fg ns.cream })(hi :Function { :fg ns.gold })(hi :SpecialChar { :fg ns.pink })(hi :Delimiter { :fg ns.cream })(hi "@variable" { :fg ns.electriclime })(hi "@variable.parameter" { :italic true })nil
(local au vim.api.nvim_create_autocmd)(local m vim.keymap.set)(fn Treesitter_config [](let [prefix (.. vim.env.HOME "/.local/share/nvim/runtime/queries/")](if (and (> (length vim.o.filetype) 0) (vim.uv.fs_stat (.. prefix vim.o.filetype)))(vim.treesitter.start))))(au ["VimEnter"]{ :callback#(let [session (.. vim.env.HOME "/.cache/nvim/")](when (vim.uv.fs_stat session)(vim.cmd.source session)(vim.fs.rm session))) })(au ["UIEnter"]{ :callback#((require "map")(vim.cmd.shada)(if (= 0 (vim.fn.argc))(vim.cmd.term "nu")(vim.cmd.normal "g`\""))) })(au ["FileType"]{ :callback Treesitter_config })(au ["CmdLineEnter"]{ :callback#(require "cdtrack"):once true })(au ["TextYankPost"]{ :callback#(if (= "" vim.v.event.regname)(vim.fn.setreg vim.v.event.operator (vim.fn.getreg)))})(au ["CmdWinEnter"]{ :callback#((m "n" "<ESC>" "<cmd>q!<CR>" { :buffer true })(tset vim :bo :filetype "vim")) })(au ["BufWinEnter"]{ :pattern "COMMIT_EDITMSG":callback#(icollect [i s (ipairs (vim.fn.systemlist "git diff --cached"))](vim.fn.append (- i 1) (.. "# " s)))})(au ["BufWritePre"]{ :callback#(let [dir (vim.fn.expand :<afile>:p:h)f (io.open dir :r)](if f(f:close)(vim.fn.mkdir dir :p)))})(au ["VimLeave"] { :command "wshada" })nil