diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-08-09 21:27:13 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-08-09 21:27:13 +0200 |
commit | c2a93f51705c4e5fbb75d3218758c018138ce1ca (patch) | |
tree | c29ef82cff78f0bdeb29e16a3224a795c18ece20 /.config/nvim/after/ftdetect/aerc.lua | |
parent | b21ab254ba390515ded0124f556188cdc42cbe77 (diff) |
nvim: Add missing runtime files
Diffstat (limited to '.config/nvim/after/ftdetect/aerc.lua')
-rw-r--r-- | .config/nvim/after/ftdetect/aerc.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/.config/nvim/after/ftdetect/aerc.lua b/.config/nvim/after/ftdetect/aerc.lua new file mode 100644 index 0000000..c430e33 --- /dev/null +++ b/.config/nvim/after/ftdetect/aerc.lua @@ -0,0 +1,24 @@ +local confhome = vim.fn.getenv('XDG_CONFIG_HOME') +confhome = confhome == vim.NIL and '~/.config/aerc/' or confhome .. '/aerc/' + +vim.api.nvim_create_autocmd({'BufRead', 'BufNewFile'}, { + pattern = { + confhome .. '*.conf', + confhome .. 'stylesets/*', + '/usr/share/aerc/*.conf', + '/usr/share/aerc/stylesets/*', + }, + callback = function() + vim.bo.filetype = 'ini' + end, +}) + +vim.api.nvim_create_autocmd({'BufRead', 'BufNewFile'}, { + pattern = { + confhome .. 'templates/*', + '/usr/share/aerc/templates/*', + }, + callback = function() + vim.bo.filetype = 'gotmpl' + end, +}) |