diff options
author | rebuilt <[email protected]> | 2021-04-29 08:01:37 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-29 02:01:37 -0400 |
commit | a5a706a3ccb90746882a229db04464d44d4c6137 (patch) | |
tree | ec962df8b53e9260caea854fc39e92893280fc80 /lua/lv-autocommands/init.lua | |
parent | 66e907d43fa6cd78101c11d0e36a97b1186490cd (diff) |
Typescript (#311)
* Add typescript formatting support
* make sure vue is in the list of filetypes
* Add typescriptreact formatting
Diffstat (limited to 'lua/lv-autocommands/init.lua')
-rw-r--r-- | lua/lv-autocommands/init.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/lv-autocommands/init.lua b/lua/lv-autocommands/init.lua index 3b841b2f..6e69de48 100644 --- a/lua/lv-autocommands/init.lua +++ b/lua/lv-autocommands/init.lua @@ -7,9 +7,13 @@ if O.python.autoformat then table.insert(auto_formatters, python_autoformat) end local javascript_autoformat = {'BufWritePre', '*.js', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'} local javascriptreact_autoformat = {'BufWritePre', '*.jsx', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'} +local typescript_autoformat = {'BufWritePre', '*.ts', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'} +local typescriptreact_autoformat = {'BufWritePre', '*.tsx', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'} if O.tsserver.autoformat then table.insert(auto_formatters, javascript_autoformat) table.insert(auto_formatters, javascriptreact_autoformat) + table.insert(auto_formatters, typescript_autoformat) + table.insert(auto_formatters, typescriptreact_autoformat) end local lua_format = {'BufWritePre', '*.lua', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'} |