summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/autocmds.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/autocmds.lua')
-rw-r--r--.config/nvim/lua/autocmds.lua67
1 files changed, 0 insertions, 67 deletions
diff --git a/.config/nvim/lua/autocmds.lua b/.config/nvim/lua/autocmds.lua
deleted file mode 100644
index 1b8751c..0000000
--- a/.config/nvim/lua/autocmds.lua
+++ /dev/null
@@ -1,67 +0,0 @@
1-- ┌─────────────────────────┐
2-- │ ▐ ▌ │
3-- │▝▀▖▌ ▌▜▀ ▞▀▖▞▀▖▛▚▀▖▞▀▌▞▀▘│
4-- │▞▀▌▌ ▌▐ ▖▌ ▌▌ ▖▌▐ ▌▌ ▌▝▀▖│
5-- │▝▀▘▝▀▘ ▀ ▝▀ ▝▀ ▘▝ ▘▝▀▘▀▀ │
6-- └─────────────────────────┘
7
8local au = require('au')
9
10au.TextYankPost = function()
11 vim.highlight.on_yank { higroup="IncSearch", timeout=400 }
12end
13
14-- autocmd FileType vimwiki,latex,tex setlocal formatprg=/home/yigit/.local/bin/sentences
15au.FileType = {
16 'vimwiki,latex,tex',
17 function()
18 vim.bo.formatprg = "/home/yigit/.local/bin/sentences"
19 end,
20}
21
22-- autocmd VimLeave *.tex !texclear %
23au.VimLeave = {
24 '*.tex',
25 function()
26 vim.cmd("!texclear %")
27 end,
28}
29
30-- autocmd FileType rust let b:dispatch = 'cargo run'
31au.FileType = {
32 'rust',
33 function()
34 vim.b.dispatch = 'cargo run'
35 end,
36}
37
38-- autocmd VimResized * :wincmd =
39au.VimResized = {
40 '*',
41 function()
42 vim.cmd(":wincmd =")
43 end,
44}
45
46-- autocmd FileType markdown,tex setlocal spell
47au.FileType = {
48 'markdown,text',
49 function()
50 vim.wo.spell = true
51 end,
52}
53
54-- gf plugins
55au.BufEnter = {
56 'init.lua',
57 function()
58 vim.opt.path:append("./lua")
59 end
60}
61
62au.BufLeave = {
63 'init.lua',
64 function()
65 vim.opt.path:remove("./lua")
66 end
67}