From 502cf147d5d1dbb57b3373b0775c4bcf0bc6e3e4 Mon Sep 17 00:00:00 2001 From: steveno Date: Tue, 20 Aug 2024 23:33:37 -0400 Subject: [PATCH] Setup par for md files --- dot_config/nvim/lua/autocmd.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dot_config/nvim/lua/autocmd.lua b/dot_config/nvim/lua/autocmd.lua index dad5036..0fd9825 100644 --- a/dot_config/nvim/lua/autocmd.lua +++ b/dot_config/nvim/lua/autocmd.lua @@ -7,12 +7,20 @@ vim.api.nvim_create_autocmd({ 'FileType' }, { command = 'setlocal noexpandtab', }) +-- Setup skeleton file shell scripts vim.api.nvim_create_autocmd({ 'BufNewFile' }, { pattern = '*.sh', command = '0r ~/.config/nvim/templates/skeleton.sh', }) +-- Setup skeleton for python vim.api.nvim_create_autocmd({ 'BufNewFile' }, { pattern = '*.py', command = '0r ~/.config/nvim/templates/skeleton.py', }) + +-- Use par to format markdown at 80 chars +vim.api.nvim_create_autocmd({ 'BufNewFile' }, { + pattern = '*.md', + command = 'set formatprg=par tw=80', +})