diff options
Diffstat (limited to 'lua/core/autocmds.lua')
-rw-r--r-- | lua/core/autocmds.lua | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index 89590454..91278544 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -3,6 +3,11 @@ local autocommands = {} lvim.autocommands = { _general_settings = { { + "Filetype", + "*", + "lua require('utils.ft').do_filetype(vim.fn.expand(\"<amatch>\"))", + }, + { "TextYankPost", "*", "lua require('vim.highlight').on_yank({higroup = 'Search', timeout = 200})", @@ -27,7 +32,7 @@ lvim.autocommands = { "*", "setlocal formatoptions-=c formatoptions-=r formatoptions-=o", }, - { "BufWritePost", "lv-config.lua", "lua require('utils').reload_lv_config()" }, + { "BufWritePost", USER_CONFIG_PATH, "lua require('utils').reload_lv_config()" }, { "FileType", "qf", @@ -51,13 +56,14 @@ lvim.autocommands = { -- {'BufWinEnter', '.gmi', 'setlocal filetype=markdown'}, {'BufRead', '*.gmi', 'setlocal filetype=markdown'}, -- {'BufNewFile', '*.gmi', 'setlocal filetype=markdown'} -- }, + _git = { + { "FileType", "gitcommit", "setlocal wrap" }, + { "FileType", "gitcommit", "setlocal spell" }, + }, _markdown = { { "FileType", "markdown", "setlocal wrap" }, { "FileType", "markdown", "setlocal spell" }, }, - _tab_bindings = { - { "FileType", "*", "lua require'core.compe'.set_tab_keybindings()" }, - }, _buffer_bindings = { { "FileType", "floaterm", "nnoremap <silent> <buffer> q :q<CR>" }, }, @@ -66,7 +72,7 @@ lvim.autocommands = { { "VimResized", "*", "wincmd =" }, }, _packer_compile = { - -- will cause split windows to be resized evenly if main window is resized + -- will run PackerCompile after writing plugins.lua { "BufWritePost", "plugins.lua", "PackerCompile" }, }, _general_lsp = { |