-- ┌─────────────────────────┐ -- │ ▐ ▌ │ -- │▝▀▖▌ ▌▜▀ ▞▀▖▞▀▖▛▚▀▖▞▀▌▞▀▘│ -- │▞▀▌▌ ▌▐ ▖▌ ▌▌ ▖▌▐ ▌▌ ▌▝▀▖│ -- │▝▀▘▝▀▘ ▀ ▝▀ ▝▀ ▘▝ ▘▝▀▘▀▀ │ -- └─────────────────────────┘ local au = require('au') au.TextYankPost = function() vim.highlight.on_yank({ higroup = 'Visual', timeout = 120 }) end -- autocmd FileType vimwiki,latex,tex setlocal formatprg=/home/yigit/.local/bin/sentences au.FileType = { 'vimwiki,latex,tex', function() vim.bo.formatprg = "/home/yigit/.local/bin/sentences" end, } -- autocmd VimLeave *.tex !texclear % au.VimLeave = { '*.tex', function() vim.cmd("!texclear %") end, } -- autocmd FileType rust let b:dispatch = 'cargo run' au.FileType = { 'rust', function() vim.b.dispatch = 'cargo run' end, } -- autocmd VimResized * :wincmd = au.VimResized = { '*', function() vim.cmd(":wincmd =") end, } -- autocmd FileType markdown,tex setlocal spell au.FileType = { 'markdown,text', function() vim.wo.spell = true end, } -- gf plugins au.BufEnter = { 'init.lua', function() vim.opt.path:append("./lua") end } au.BufLeave = { 'init.lua', function() vim.opt.path:remove("./lua") end }