diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-04-11 20:45:36 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-04-11 20:45:36 +0200 |
commit | 1d50839b9c03f77956132f776f6798140a13ac70 (patch) | |
tree | 2e4960c8b4082948a14b46d0a55bd4ffeb3c02cb /fnl | |
parent | 3542e120015fa32a4c62c2b6eba036eb5252731c (diff) |
style: format
Diffstat (limited to 'fnl')
-rw-r--r-- | fnl/config/autocmd.fnl | 65 | ||||
-rw-r--r-- | fnl/config/init.fnl | 2 |
2 files changed, 30 insertions, 37 deletions
diff --git a/fnl/config/autocmd.fnl b/fnl/config/autocmd.fnl index e168bd5..628a670 100644 --- a/fnl/config/autocmd.fnl +++ b/fnl/config/autocmd.fnl @@ -1,39 +1,32 @@ ;; A customizable greeter. (module config.autocmd {autoload {nvim aniseed.nvim util util}}) -(defn autocmd [group cmds] - (nvim.command (.. "augroup " group)) - (nvim.command "autocmd!") - (each [_ cmd (ipairs cmds)] - (nvim.command (.. "autocmd " cmd))) - (nvim.command "augroup end")) - -(def- general-settings [ - "FileType qf,help,man,lspinfo nnoremap <silent> <buffer> q :close<CR>" - "TextYankPost * silent!lua require('vim.highlight').on_yank({higroup = 'Search', timeout = 200})" - "BufWinEnter * :set formatoptions-=cro" - "FileType qf set nobuflisted"]) - -(def- git [ - "FileType gitcommit setlocal wrap" - "FileType gitcommit setlocal spell"]) - -(def- markdown [ - "FileType markdown setlocal wrap" - "FileType markdown setlocal spell"]) - -(def- auto-resize [ - "VimResized * tabdo wincmd ="]) - -(def- alpha [ - "User AlphaReady set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2"]) - -(def- packer [ - "BufWritePost plugins.lua source <afile> | PackerSync"]) - -(autocmd "_general_settings" general-settings) -(autocmd "_git" git) -(autocmd "_markdown" markdown) -(autocmd "_auto_resize" auto-resize) -(autocmd "_alpha" alpha) -(autocmd "packer_user_config" packer) +(defn autocmd [group cmds] (nvim.command (.. "augroup " group)) + (nvim.command :autocmd!) + (each [_ cmd (ipairs cmds)] + (nvim.command (.. "autocmd " cmd))) (nvim.command "augroup end")) + +(def- general-settings ["FileType qf,help,man,lspinfo nnoremap <silent> <buffer> q :close<CR>" + "TextYankPost * silent!lua require('vim.highlight').on_yank({higroup = 'Search', timeout = 200})" + "BufWinEnter * :set formatoptions-=cro" + "FileType qf set nobuflisted"]) + +(def- git ["FileType gitcommit setlocal wrap" + "FileType gitcommit setlocal spell"]) + +(def- markdown ["FileType markdown setlocal wrap" + "FileType markdown setlocal spell"]) + +(def- auto-resize ["VimResized * tabdo wincmd ="]) + +(def- alpha + ["User AlphaReady set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2"]) + +(def- packer ["BufWritePost plugins.lua source <afile> | PackerSync"]) + +(autocmd :_general_settings general-settings) +(autocmd :_git git) +(autocmd :_markdown markdown) +(autocmd :_auto_resize auto-resize) +(autocmd :_alpha alpha) +(autocmd :packer_user_config packer) diff --git a/fnl/config/init.fnl b/fnl/config/init.fnl index 975288b..3ccff7d 100644 --- a/fnl/config/init.fnl +++ b/fnl/config/init.fnl @@ -1,8 +1,8 @@ ;; Load all plugin configs. (module config.init {require {_ config.impatient _ config.packer + _ config.autocmd _ config.alpha - ;;_ config.autocmd _ config.autopairs _ config.better-escape _ config.bufferline |