this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Translate whole init.vim into startup.fnl

+371 -160
-3
fish/.config/fish/functions/gdb.fish
··· 1 - function gdb --wrap gdb 2 - command gdb -q $argv 3 - end
-3
fish/.config/fish/functions/pretty.fish
··· 1 - function pretty --wrap highlight 2 - highlight -O ansi --force --stdout $argv | less -RS 3 - end
+7 -4
nix/.config/nixpkgs/darwin/configuration.nix
··· 8 8 (import ../overlays/encpipe.nix) 9 9 (import ../overlays/fonts.nix) 10 10 (import ../overlays/git-riff.nix) 11 + (import ../overlays/comby.nix) 11 12 ]; 12 13 13 14 system.defaults.dock.autohide = true; ··· 26 27 environment.systemPackages = with pkgs; [ 27 28 _1password 28 29 bat 30 + comby 29 31 coreutils 30 32 direnv 31 33 nix-direnv ··· 40 42 gitAndTools.hub 41 43 gitAndTools.tig 42 44 git 43 - git-riff 45 + # git-riff 44 46 gnupg 45 47 httpie 46 48 imagemagick ··· 91 93 92 94 programs.fish = { 93 95 enable = true; 94 - translateEnvironment = true; 96 + useBabelfish = true; 97 + babelfishPackage = pkgs.babelfish; 95 98 shellAliases = { 96 99 git = "LC_CTYPE=UTF-8 LANG=C hub"; 97 100 }; ··· 100 103 enable = true; 101 104 }; 102 105 103 - nix.package = pkgs.nixFlakes; 106 + nix.package = pkgs.nixStable; 104 107 # nix.useSandbox = true; 105 108 nix.sandboxPaths = [ 106 109 "/System/Library/Frameworks" ··· 117 120 keep-outputs = true 118 121 keep-derivations = true 119 122 120 - experimental-features = nix-command flakes 123 + # experimental-features = nix-command flakes 121 124 ''; 122 125 123 126 # Used for backwards compatibility, please read the changelog before changing.
+34
nix/.config/nixpkgs/overlays/comby.nix
··· 1 + final: prev: 2 + 3 + with prev; 4 + 5 + { 6 + comby = stdenv.mkDerivation rec { 7 + pname = "comby"; 8 + version = "1.0.0"; 9 + 10 + nativeBuildInputs = [ autoPatchelfHook ]; 11 + 12 + buildInputs = [ pcre ]; 13 + 14 + src = fetchurl { 15 + url = "https://github.com/comby-tools/comby/releases/download/${version}/comby-${version}-x86_64-macos.tar.gz"; 16 + sha256 = "0p9qna7sbgxfi8m0mr83nbx6jwp4jg9xrvqgwibk1wvhj1d33nvp"; 17 + }; 18 + 19 + dontBuild = true; 20 + dontUnpack = true; 21 + 22 + installPhase = '' 23 + mkdir -p $out/bin 24 + tar xzf $src 25 + mv comby-$version-x86_64-macos $out/bin/comby 26 + ''; 27 + 28 + postFixup = 29 + let libpath = lib.makeLibraryPath [ pcre ]; 30 + in '' 31 + install_name_tool -change /usr/local/opt/pcre/lib/libpcre.1.dylib ${libpath}/libpcre.1.dylib $out/bin/comby 32 + ''; 33 + }; 34 + }
+1 -1
nix/.config/nixpkgs/overlays/erlang.nix
··· 1 - import (builtins.fetchTarball "https://github.com/hauleth/nix-elixir/archive/master.tar.gz") 1 + import <nix-elixir>
+1 -3
nix/.config/nixpkgs/overlays/neovim-nightly.nix
··· 1 - (import (builtins.fetchTarball { 2 - url = https://github.com/nix-community/neovim-nightly-overlay/archive/master.tar.gz; 3 - })) 1 + import <neovim-nightly>
+4 -1
vim/.config/nvim/autoload/plugins.vim
··· 30 30 call minpac#add('tpope/vim-projectionist') " Requires access to VimEnter 31 31 call minpac#add('justinmk/vim-dirvish') " Required for opening directories 32 32 call minpac#add('tpope/vim-eunuch') 33 - call minpac#add('liuchengxu/vim-clap') 33 + call minpac#add('nvim-lua/popup.nvim') 34 + call minpac#add('nvim-lua/plenary.nvim') 35 + call minpac#add('nvim-telescope/telescope.nvim') 36 + call minpac#add('nvim-telescope/telescope-fzy-native.nvim') 34 37 " }}} 35 38 " Git {{{ 36 39 call minpac#add('tpope/vim-fugitive')
+21 -9
vim/.config/nvim/fnl/langclient.fnl
··· 1 - (local {:buf_map bmap} (require :utils)) 1 + (local {:buf-map bmap} (require :nvim)) 2 2 (local lsp (require :lspconfig)) 3 + (local picker (require :picker)) 4 + (import-macros logger :nvim.logger) 5 + (import-macros {: bopt} :nvim.macros) 3 6 4 - (macro if-capable [client capability body ...] 5 - (assert body "expected body") 6 - `(if (. (. ,client :resolved_capabilities) ,capability) (do ,body ,...))) 7 + (fn capable? [client capability] 8 + (. client.resolved_capabilities capability)) 7 9 8 10 (fn on-attach [client] 9 - (if-capable client :hover (bmap :n :K ":lua vim.lsp.buf.hover()")) 10 - (if-capable client :goto_definition (bmap :n :gd ":lua vim.lsp.definition()")) 11 - (if-capable client :references (bmap :n :gd ":lua vim.lsp.references()")) 12 - (vim.api.nvim_buf_set_option 0 :omnifunc "v:lua.vim.lsp.omnifunc")) 11 + (logger.inspect client) 12 + (when (capable? client :hover) 13 + (bmap :n :K #(vim.lsp.buf.hover))) 14 + (when (capable? client :goto_definition) 15 + (bmap :n :gd #(vim.lsp.buf.definition))) 16 + (when (capable? client :find_references) 17 + (bmap :n :gr #(picker.lsp_references))) 18 + (when (capable? client :document_formatting) 19 + (bmap :n :Q #(vim.lsp.buf.formatting_sync))) 20 + (when (capable? client :document_symbol) 21 + (bmap :n :gO #(picker.lsp_document_symbols))) 22 + (when (capable? client :completion) 23 + (bopt omnifunc "v:lua.vim.lsp.omnifunc"))) 13 24 14 25 (lsp.elixirls.setup {:cmd ["nix-shell" "--show-trace" "--run" "elixir-ls"] 15 - :on_attach on-attach}) 26 + :on_attach on-attach 27 + :settings {:elixirLS {:dialyzerEnabled false}}})
+63
vim/.config/nvim/fnl/nvim/init.fnl
··· 1 + (import-macros logger :nvim.logger) 2 + 3 + (global __nvim_functions__ {}) 4 + 5 + (fn filter [t cb] 6 + (collect [k v (pairs t)] 7 + (when (cb k v) (values k v)))) 8 + 9 + (fn try [value test cb] 10 + (if (test value) (cb value) value)) 11 + 12 + (fn make-func [func] 13 + (let [idx (+ (length __nvim_functions__) 1)] 14 + (tset __nvim_functions__ idx func) 15 + (.. "__nvim_functions__[" idx "]"))) 16 + 17 + (fn normalise-map [rhs opts] 18 + (if (= (type rhs) :string) 19 + (if (and (vim.startswith rhs ":") (not= rhs ":")) 20 + (-> rhs 21 + (try #(not (. opts :selection)) 22 + #(.. "<cmd>" (: $1 :sub 2))) 23 + (try #(and (not (vim.endswith (: $1 :lower) "<cr>")) (. opts :cr)) 24 + #(.. $1 "<cr>"))) 25 + rhs) 26 + (.. "<cmd>lua " (make-func rhs) "()<CR>"))) 27 + 28 + (fn plug-map? [rhs] 29 + (and (= (type rhs) :string) 30 + (vim.startswith (rhs:lower) "<plug>"))) 31 + 32 + (fn make-map [cb] 33 + (lambda [modes lhs rhs ?opts] 34 + (let [options (vim.tbl_extend :force {:noremap (not (plug-map? rhs)) 35 + :selection false 36 + :cr true} 37 + (or ?opts {})) 38 + map-opts (filter options #(not (or (= $1 :selection) (= $1 :cr)))) 39 + normalised-rhs (normalise-map rhs options)] 40 + (when (= modes "") (error "At least one mode must be specified")) 41 + (each [mode (modes:gmatch ".")] 42 + (cb mode lhs normalised-rhs map-opts))))) 43 + 44 + (local api (setmetatable {} 45 + {:__index (fn [_ key] 46 + (let [func (.. "nvim_" key)] 47 + (. vim.api func)))})) 48 + 49 + (fn executable? [name] 50 + (api.call_function "executable" [name])) 51 + 52 + (fn colorscheme [name] 53 + (api.command (.. "colorscheme " name))) 54 + 55 + (fn call [name ...] 56 + (api.call_function name (or ... []))) 57 + 58 + (setmetatable {:map (make-map api.set_keymap) 59 + :buf-map (make-map #(api.buf_set_keymap 0 $...)) 60 + : call 61 + : colorscheme 62 + : make-func 63 + : executable?} {:__index api})
+6
vim/.config/nvim/fnl/nvim/logger.fnl
··· 1 + (fn inspect [data] 2 + `(let [v# ,data] 3 + (when vim.g.debug (print (vim.inspect v#))) 4 + v#)) 5 + 6 + {: inspect}
+93
vim/.config/nvim/fnl/nvim/macros.fnl
··· 1 + (import-macros logger :nvim.logger) 2 + 3 + (fn g [name value] 4 + "Set value for global Vim variable" 5 + `(tset vim.g ,name ,value)) 6 + 7 + (fn env [name value] 8 + "Set environment variable" 9 + (assert (sym? name)) 10 + `(tset vim.env ,(view name) ,(if (= nil value) true value))) 11 + 12 + (fn set-opt [scope name value] 13 + (assert (sym? name)) 14 + (let [full-opt (view name) 15 + len (length full-opt) 16 + opt (if (full-opt:match "[-+^!]$") (full-opt:sub 1 (- len 1)) full-opt)] 17 + (match (full-opt:sub len) 18 + :- (assert false "not implemented") 19 + :^ `(let [v# ,value] 20 + (tset ,scope ,opt (if (= (. ,scope ,opt) "") v# (.. v# "," (. ,scope ,opt))))) 21 + :+ `(let [v# ,value] 22 + (tset ,scope ,opt (if (= (. ,scope ,opt) "") v# (.. (. ,scope ,opt) "," v#)))) 23 + _ `(tset ,scope ,opt ,(or value true))))) 24 + 25 + (fn opt [name value] 26 + "Set Vim option" 27 + (set-opt `vim.o name value)) 28 + (fn wopt [name value] 29 + "Set Vim window option" 30 + (set-opt `vim.wo name value)) 31 + (fn bopt [name value] 32 + "Set Vim buffer option" 33 + (set-opt `vim.bo name value)) 34 + 35 + (fn into-func [code] 36 + `(.. "lua " ((. (require :nvim) :make-func) (fn [] ,code)) "()")) 37 + 38 + (fn on [event pattern ...] 39 + "Run command on `event`" 40 + `(vim.api.nvim_command (.. "au " ,(view event) 41 + " " ,pattern 42 + " " ,(into-func ...)))) 43 + 44 + (fn augroup [name ...] 45 + "Define auto group" 46 + `(do 47 + (vim.api.nvim_command ,(.. "augroup " (view name))) 48 + (vim.api.nvim_command "au!") 49 + ,... 50 + (vim.api.nvim_command "augroup END"))) 51 + 52 + (fn translate-opts [opts] 53 + (let [flags (icollect [k v (pairs opts)] 54 + (match k 55 + :bar (when v "-bar") 56 + :bang (when v "-bang") 57 + :register (when v "-register") 58 + :buffer (when v "-buffer") 59 + :range (.. "-range=" v) 60 + :addr (.. "-addr=" v) 61 + :complete (.. "-complete=" v) 62 + :nargs (.. "-nargs=" v)))] 63 + (table.concat flags " "))) 64 + 65 + (fn command-func [code] 66 + (let [bang (sym "bang") 67 + mods (sym "mods") 68 + f-args (sym "f-args") 69 + q-args (sym "q-args") 70 + reg (sym "reg") 71 + lines (sym "lines") 72 + ] 73 + `(.. "lua " 74 + ((. (require :nvim) :make-func) (fn [,bang ,mods ,f-args ,q-args ,reg ,lines] ,code)) 75 + "('<bang>' == '!', '<mods>', {<f-args>}, <q-args>, [[<reg>]], {from=<line1>, to=<line2>, range=<range>})"))) 76 + 77 + (lambda defcommand [name opts ...] 78 + (assert (string.match (view name) "^%u%w*$")) 79 + (let [(command opts1) (match ... 80 + (nil ? (= (type opts) :string)) (values (opts:gsub "|" "<bar>") {}) 81 + (body ? (= (type body) :string)) (values (body:gsub "|" "<bar>") opts) 82 + _ (values (command-func `(do ,...)) opts)) 83 + flags (translate-opts opts1)] 84 + `(vim.api.nvim_command (.. "command! " ,flags " " ,(view name) " " ,command)))) 85 + 86 + {: augroup 87 + : defcommand 88 + : env 89 + : g 90 + : on 91 + : opt 92 + : bopt 93 + : wopt}
+22
vim/.config/nvim/fnl/picker.fnl
··· 1 + (local telescope (require :telescope)) 2 + (local themes (require :telescope.themes)) 3 + 4 + (let [opts {:vimgrep_arguments ["rg" 5 + "--vimgrep" 6 + "--smart-case" 7 + "--hidden" 8 + "--glob=!.git"]}] 9 + (telescope.setup 10 + {:defaults (themes.get_dropdown opts)})) 11 + (telescope.load_extension :fzy_native) 12 + 13 + (fn finder [name] 14 + (. (require :telescope.builtin) name)) 15 + 16 + (fn find_files [opts] 17 + (let [defaults {:find_command ["rg" "--hidden" "--ignore" "--files" "--glob=!.git"]} 18 + options (vim.tbl_extend :force defaults (or opts {}))] 19 + ((finder :find_files) options))) 20 + 21 + (setmetatable {: find_files} 22 + {:__index (fn [_ key] (finder key))})
+7
vim/.config/nvim/fnl/startify.fnl
··· 1 + (import-macros {: g} :nvim.macros) 2 + 3 + (fn setup [opts] 4 + (each [k v (pairs opts)] 5 + (g (.. "startify_" (k:gsub "-" "_")) v))) 6 + 7 + {: setup}
+103 -49
vim/.config/nvim/fnl/startup.fnl
··· 1 - (local {:map map} (require :utils)) 2 - (local ts (require :nvim-treesitter.configs)) 3 - 4 - (macro g [name value] `(tset vim.g ,name ,value)) 5 - (macro opt [name value] 6 - (assert (sym? name)) 7 - `(tset vim.o ,(view name) ,(if (= nil value) true value))) 8 - (macro wopt [name value] 9 - (assert (sym? name)) 10 - `(tset vim.wo ,(view name) ,(if (= nil value) true value))) 11 - 12 - (macro on [event pattern cmd] 13 - `(vim.api.nvim_command (.. "au " ,(view event) " " ,pattern " " ,cmd))) 14 - 15 - (macro augroup [name ...] 16 - (let [f (sym "on")] 17 - `(do 18 - (vim.api.nvim_command (.. "augroup " ,(view name))) 19 - (vim.api.nvim_command "au!") 20 - ,... 21 - (vim.api.nvim_command "augroup END")))) 22 - 23 - (fn executable? [name] 24 - (vim.api.nvim_call_function "executable" [name])) 25 - 26 - (fn colorscheme [name] 27 - (vim.api.nvim_command (.. "colorscheme " name))) 1 + (local {: map 2 + : call 3 + : command 4 + : executable? 5 + : colorscheme &as nvim} (require :nvim)) 6 + (local picker (require :picker)) 7 + (import-macros {: augroup 8 + : defcommand 9 + : on 10 + : env 11 + : g 12 + : opt 13 + : wopt} :nvim.macros) 28 14 29 15 ; Colors 30 16 (colorscheme :blame) ··· 52 38 (opt title) 53 39 54 40 ; Display tabs and trailing spaces visually 55 - ; (opt fillchars "vert:┃,fold:·") 41 + (opt fillchars "vert:┃,fold:·") 56 42 (opt list) 57 - ; (opt listchars "tab:→\ ,trail:·,nbsp:␣,extends:↦,precedes:↤") 43 + (opt listchars "tab:→ ,trail:·,nbsp:␣,extends:↦,precedes:↤") 58 44 (opt conceallevel 2) 59 45 60 46 ; Ignore case. If your code uses different casing to differentiate files, then ··· 62 48 (opt wildignorecase) 63 49 (opt wildmode :full) 64 50 (opt fileignorecase) 51 + (opt wildignore "*.o,*~,**/.git/**,**/tmp/**,**/node_modules/**,**/_build/**,**/deps/**,**/target/**,**/uploads/**") 52 + 53 + (opt diffopt+ "indent-heuristic,algorithm:patience") 54 + (opt tags^ "./**/tags") 55 + (opt iskeyword+ "-") 65 56 66 57 (opt showmode false) 67 58 ··· 70 61 (opt autowriteall) 71 62 72 63 ; Keep cursor in the middle 73 - (let [value 9999 74 - scrolloff (fn [v] (.. "silent setl scrolloff=" v))] 64 + (let [value 9999] 75 65 (opt scrolloff value) 76 - (augroup terminal_scrolloff 77 - (on BufEnter "term://*" (scrolloff 0)) 78 - (on BufLeave "term://*" (scrolloff value)))) 66 + (augroup terminal-scrolloff 67 + (on BufEnter "term://*" (wopt scrolloff 0)) 68 + (on BufLeave "term://*" (wopt scrolloff value)))) 79 69 80 70 ; XXI century - we have cursors now 81 71 (opt mouse :a) ··· 104 94 (opt complete ".,w,b,t,k,kspell") 105 95 (opt completeopt "menuone,noselect,noinsert") 106 96 107 - (g "echodoc#enable_at_startup" true) 108 - (g "echodoc#type" :virtual) 97 + (g :echodoc#enable_at_startup true) 98 + (g :echodoc#type :virtual) 109 99 110 100 ; Clap 111 - (map :n :<Space><Space> ":Clap files") 101 + (map :n :<Space><Space> 102 + #(picker.find_files)) 112 103 113 104 ; Frequently used unimpaired mappings 114 105 (let [unimpaired (fn [char left right] ··· 147 138 (map :n :0 "virtcol('.') - 1 <= indent('.') && col('.') > 1 ? '0' : '_'" {:expr true}) 148 139 149 140 (map :n :gK ":Dash") 150 - (map :n :gq ":call open#open()") 141 + (map :n :gq #(call :open#open)) 151 142 152 143 ; Text object for whole file 153 144 (map :o :aG ":normal! ggVG") ··· 165 156 (map :t "<C-q>" "<C-\\><C-n>") 166 157 (map :n "<C-q>" "<ESC>") 167 158 159 + (when (executable? "nvr") 160 + (env EDITOR "nvr -cc split -c 'set bufhidden=delete' --remote-wait")) 161 + 168 162 ; Git mappings 169 163 (let [leader "U" 170 164 git-map (fn [lhs cmd] (map :n (.. leader lhs) (.. ":Git " cmd)))] 171 165 (map :n leader "<nop>") 172 166 (map :n (.. leader leader) (.. leader :u) {:noremap false}) 173 167 (git-map :p "push") 174 - (git-map :s "status") 168 + (git-map :s "") 175 169 (git-map :d "diff") 176 170 (git-map :B "blame") 177 171 (git-map :c "commit") ··· 180 174 181 175 ; Split management 182 176 (augroup align-windows 183 - (on VimEnter "*" "wincmd =")) 184 - (map :n "<C-w>q" "<plug>(choosewin)") 185 - (map :n "<C-_>" "<plug>(choosewin)") 177 + (on VimEnter "*" (command "wincmd ="))) 178 + (map :n "<C-w><C-w>" "<plug>(choosewin)" {:noremap false}) 179 + (map :n "<C-_>" "<plug>(choosewin)" {:noremap false}) 186 180 187 181 ; Search 188 182 (when (executable? "rg") ··· 194 188 195 189 (augroup matchparen 196 190 (let [term "term://*"] 197 - (on BufEnter term "NoMatchParen") 198 - (on BufLeave term "DoMatchParen"))) 191 + (on BufEnter term (command "NoMatchParen")) 192 + (on BufLeave term (command "DoMatchParen")))) 199 193 200 194 ; Autoreload Direnv after writing the .envrc 201 195 (when (executable? "direnv") 202 196 (augroup autoreload-envrc 203 - (on BufWritePost ".envrc" "silent !direnv allow %"))) 197 + (on BufWritePost ".envrc" (command "silent !direnv allow %")))) 204 198 205 199 ; Clean non-existing buffers on leave 206 200 (augroup autoclean 207 - (on BufLeave "*" "call utils#cleanup()")) 201 + (on BufLeave "*" (call :utils#cleanup))) 208 202 209 - (ts.setup {:ensure_installed :maintained 210 - :highlight {:enable true} 211 - :indent {:enable true}}) 203 + ; Setup Lua extensions 204 + (let [setup (fn [package object] ((. (require package) :setup) object))] 205 + (setup :nvim-treesitter.configs 206 + {:ensure_installed :maintained 207 + :highlight {:enable true} 208 + :indent {:enable true}}) 209 + (setup :startify 210 + {:lists [{:type "sessions" :header [" Sessions"]} 211 + {:type "commands" :header [" Wiki"]}] 212 + :session-dir "~/.local/share/nvim/site/sessions/" 213 + :session-autoload true 214 + :session-persistence true 215 + :commands [{:w ["Wiki" "VimwikiIndex"]} 216 + {:d ["Diary" "VimwikiDiaryIndex"]} 217 + {:t ["Today" "VimwikiMakeDiaryNote"]} 218 + {:y ["Yesterday" "VimwikiMakeYesterdayDiaryNote"]} 219 + {:a ["Tomorrow" "VimwikiMakeTomorrowDiaryNote"]}] 220 + :change-to-dir false 221 + :change-to-vcs-root true 222 + :fortune-use-unicode true})) 212 223 224 + ; Minpac actions 225 + (defcommand PackUpdate {:bar true} 226 + (call :plugins#reload) 227 + (call :minpac#update)) 228 + (defcommand PackClean {:bar true} 229 + (call :plugins#reload) 230 + (call :minpac#clean)) 231 + (defcommand PackStatus {:bar true} 232 + (call :plugins#reload) 233 + (call :minpac#status)) 234 + 235 + (defcommand Term "<mods> split +term | startinsert") 236 + (defcommand Bd "b#|bd#") 237 + (defcommand Clean "keeppatterns %s/\\s\\+$//e | set nohlsearch") 238 + 239 + ; Async Make and Grep 240 + (let [run (fn [args f-args] 241 + (nvim.call_function :asyncdo#run (vim.list_extend args f-args)))] 242 + (defcommand Make {:bang true :nargs :* :complete :file} 243 + (run [bang vim.o.makeprg] f-args)) 244 + (defcommand Grep {:bang true :nargs :+ :complete :dir} 245 + (run [bang {:job vim.o.grepprg :errorformat vim.o.grepformat}] f-args))) 246 + 247 + ; Async LMake and LGrep 248 + (let [run (fn [args f-args] 249 + (nvim.call_function :asyncdo#lrun (vim.list_extend args f-args)))] 250 + (defcommand LMake {:bang true :nargs :* :complete :file} 251 + (run [bang vim.o.makeprg] f-args)) 252 + (defcommand LGrep {:bang true :nargs :+ :complete :dir} 253 + (run [bang {:job vim.o.grepprg :errorformat vim.o.grepformat}] f-args))) 254 + 255 + (defcommand Ctags (command :AsyncDo "ctags -R .")) 256 + (defcommand Start {:nargs :*} 257 + (command (.. mods " split new")) 258 + (call :termopen q-args) 259 + (command :startinsert)) 260 + (defcommand Dash {:nargs :?} (call :dash#open q-args)) 261 + 262 + (do 263 + (command "packadd! vim-sandwich") 264 + (command "runtime macros/sandwich/keymap/surround.vim")) 265 + 266 + (require :startify) 213 267 (require :langclient)
+8 -1
vim/.config/nvim/init.lua
··· 1 1 -- Fennel loader, default one do not work well with NeoVim so there is custom 2 2 -- one 3 - local fennel = require('fennel') 3 + _G.fennel = require('fennel') 4 4 local function fennel_loader(name) 5 5 local basename = name:gsub('%.', '/') 6 6 local paths = {"fnl/"..basename..".fnl", "fnl/"..basename.."/init.fnl"} ··· 15 15 return nil 16 16 end 17 17 table.insert(package.loaders, 1, fennel_loader) 18 + 19 + local fennel_paths = "" 20 + for _, v in pairs(vim.api.nvim_get_runtime_file("fnl/", false)) do 21 + fennel_paths = fennel_paths .. ";" .. v .. "?.fnl" 22 + fennel_paths = fennel_paths .. ";" .. v .. "?/init.fnl" 23 + end 24 + fennel.path = fennel.path .. fennel_paths 18 25 19 26 local u = require('utils') 20 27
-85
vim/.config/nvim/legacy.vim
··· 1 - " vi: foldmethod=marker foldlevel=0 2 - scriptencoding utf-8 3 - 4 - " Plugins {{{ 5 - command! -bar PackUpdate call plugins#reload() | call minpac#update() 6 - command! -bar PackClean call plugins#reload() | call minpac#clean() 7 - command! -bar PackStatus call plugins#reload() | call minpac#status() 8 - " }}} 9 - " User interface {{{ 10 - " Ignore all automatic files and folders {{{ 11 - set wildignore+=*.o,*~,**/.git/**,**/tmp/**,**/node_modules/**,**/_build/**,**/deps/**,**/target/**,**/uploads/** 12 - " }}} 13 - " Hypen is part of the keyword, if you want to substract then add spaces {{{ 14 - set iskeyword+=- 15 - " }}} 16 - " }}} 17 - " Diff options {{{ 18 - set diffopt+=indent-heuristic,algorithm:patience 19 - " }}} 20 - " Custom configurations {{{ 21 - " Fuzzy file search {{{ 22 - let g:clap_provider_grep_opts = '-H --no-heading --vimgrep --smart-case --hidden --glob !.git' 23 - 24 - let g:clap#provider#files# = { 25 - \ 'source': 'rg --files --hidden --glob !.git', 26 - \ 'sink*': function('clap#provider#files#sink_star_impl'), 27 - \ 'sink': function('clap#provider#files#sink_impl'), 28 - \ 'support_open_action': v:true, 29 - \ 'enable_rooter': v:true, 30 - \ 'syntax': 'clap_files', 31 - \ 'on_move': function('clap#provider#files#on_move_impl') 32 - \ } 33 - " }}} 34 - " Asynchronous commands {{{ 35 - command! -bang -nargs=* -complete=file Make call asyncdo#run(<bang>0, &makeprg, <f-args>) 36 - command! -bang -nargs=* -complete=dir Grep call asyncdo#run(<bang>0, 37 - \ { 'job': &grepprg, 'errorformat': &grepformat }, 38 - \ <f-args>) 39 - command! -bang -nargs=* -complete=file LMake call asyncdo#lrun(<bang>0, &makeprg, <f-args>) 40 - command! -bang -nargs=* -complete=dir LGrep call asyncdo#lrun(<bang>0, { 'job': &grepprg, 'errorformat': &grepformat }, <f-args>) 41 - " }}} 42 - " Format {{{ 43 - command! Clean keeppatterns %s/\s\+$//e | set nohlsearch 44 - " }}} 45 - " Terminal {{{ 46 - if executable('nvr') 47 - let $EDITOR = 'nvr -cc split -c "set bufhidden=delete" --remote-wait' 48 - endif 49 - " }}} 50 - " Startify {{{ 51 - let g:startify_lists = [ 52 - \ {'type': 'sessions', 'header': [' Sessions']}, 53 - \ {'type': 'commands', 'header': [' Wiki']}, 54 - \ ] 55 - let g:startify_session_dir = '~/.local/share/nvim/site/sessions/' 56 - let g:startify_session_autoload = v:true 57 - let g:startify_session_persistence = v:true 58 - 59 - let g:startify_commands = [ 60 - \ {'w': ['Wiki', 'VimwikiIndex']}, 61 - \ {'d': ['Diary', 'VimwikiDiaryIndex']}, 62 - \ {'t': ['Today', 'VimwikiMakeDiaryNote']}, 63 - \ {'y': ['Yesterday', 'VimwikiMakeYesterdayDiaryNote']}, 64 - \ {'a': ['Tomorrow', 'VimwikiMakeTomorrowDiaryNote']}, 65 - \ ] 66 - 67 - let g:startify_change_to_dir = v:false 68 - let g:startify_change_to_vcs_root = v:true 69 - let g:startify_fortune_use_unicode = v:true 70 - " }}} 71 - " }}} 72 - " Completions {{{ 73 - set tags^=./**/tags 74 - " }}} 75 - 76 - " Needed for Projectionist and dadbod 77 - command! -nargs=* Start <mods> split new <bar> call termopen(<q-args>) <bar> startinsert 78 - command! -nargs=0 Ctags AsyncDo ctags -R 79 - command! -nargs=? Dash call dash#open(<f-args>) 80 - command! Term <mods> split +term <bar> startinsert 81 - 82 - command! Bd b#|bd# 83 - 84 - packadd! vim-sandwich 85 - runtime macros/sandwich/keymap/surround.vim
+1 -1
vim/.config/nvim/plugin/wiki.vim
··· 1 - let g:vimwiki_list = [{'path': '~/Documents/Wiki/', 'syntax': 'markdown'}] 1 + let g:vimwiki_list = [{'path': '~/Documents/Wiki/'}] 2 2 let g:vimwiki_key_mappings = 3 3 \ { 4 4 \ 'headers': 0,