diff options
| author | Ian Griffin <migriffin@disroot.org> | 2025-04-02 19:08:48 +0800 |
|---|---|---|
| committer | Ian Griffin <migriffin@disroot.org> | 2025-04-02 19:08:48 +0800 |
| commit | 78566240e0fbe4e3d4f2c6782277459ca136ea6c (patch) | |
| tree | 77cc03fb8b2e4663dbbc19547136545b1440e3ad /lua/filetypes.lua | |
| parent | e33c2e623bdd880117917b6901fea47e1e9f4f8c (diff) | |
some fixes
Diffstat (limited to 'lua/filetypes.lua')
| -rw-r--r-- | lua/filetypes.lua | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/lua/filetypes.lua b/lua/filetypes.lua index 78a2c70..08aed46 100644 --- a/lua/filetypes.lua +++ b/lua/filetypes.lua @@ -9,9 +9,9 @@ local defs = require('defaults') ct.augroup('templates', {'BufNewFile', '*.c', '0r', defs.template_dir .. '/c_stdio.c'}, {'BufNewFile', '*.cpp', '0r', defs.template_dir .. '/cpp_iostream.cpp'}, + {'BufNewFile', '*.desktop', '0r', defs.template_dir .. '/desktop'}, {'BufNewFile', '*.go', '0r', defs.template_dir .. '/go.go'}, - {'BufNewFile', '*.html', '0r', defs.template_dir .. '/html.html'}, - {'BufNewFile', '*.html', '0r', defs.template_dir .. '/html.html'}, + {'BufNewFile', '*.html', '0r', defs.template_dir .. '/html-index.html'}, {'BufNewFile', '*.py', '0r', defs.template_dir .. '/py.py'}, {'BufNewFile', '*.sh', '0r', defs.template_dir .. '/sh.sh'} ) @@ -19,16 +19,19 @@ ct.augroup('templates', -- -- FileType based Settings -- -ct.augroup('filetypeSettings', - {'FileType', 'python', 'setlocal', 'tabstop=4 shiftwidth=4 expandtab'}, - {'FileType', 'html', 'setlocal', 'tabstop=2 shiftwidth=2'}, - {'FileType', 'javascript', 'setlocal', 'tabstop=2 shiftwidth=2'}, - {'FileType', 'typescript', 'setlocal', 'tabstop=2 shiftwidth=2'}, - {'FileType', 'typescriptreact','setlocal', 'tabstop=2 shiftwidth=2'}, - {'FileType', 'vue', 'setlocal', 'tabstop=2 shiftwidth=2'} -) + +-- moved to after/ftplugin +-- ct.augroup('filetypeSettings', +-- {'FileType', 'python', 'setlocal', 'tabstop=4 shiftwidth=4 expandtab'}, +-- {'FileType', 'dart', 'setlocal', 'tabstop=2 shiftwidth=2 expandtab'}, +-- {'FileType', 'html', 'setlocal', 'tabstop=2 shiftwidth=2'}, +-- {'FileType', 'javascript', 'setlocal', 'tabstop=2 shiftwidth=2'}, +-- {'FileType', 'typescript', 'setlocal', 'tabstop=2 shiftwidth=2'}, +-- {'FileType', 'typescriptreact','setlocal', 'tabstop=2 shiftwidth=2'}, +-- {'FileType', 'vue', 'setlocal', 'tabstop=2 shiftwidth=2'} +-- ) -- -- Misc. -- -vim.cmd 'autocmd BufWritePost *.go,*.py,*.js,*.ts,*tsx,*.tex LspFormat' -- run lspformat when saving in go +vim.cmd 'autocmd BufWritePost *.go,*.py,*.js,*.ts,*tsx,*.tex LspFormat' -- run lspformat when saving |
