diff options
| -rw-r--r-- | lua/lsp/efm-general-ls.lua | 4 | ||||
| -rw-r--r-- | lua/lv-autocommands/init.lua | 4 | 
2 files changed, 7 insertions, 1 deletions
| diff --git a/lua/lsp/efm-general-ls.lua b/lua/lsp/efm-general-ls.lua index 9488afec..01bc3eed 100644 --- a/lua/lsp/efm-general-ls.lua +++ b/lua/lsp/efm-general-ls.lua @@ -92,7 +92,7 @@ require"lspconfig".efm.setup {      -- init_options = {initializationOptions},      cmd = {DATA_PATH .. "/lspinstall/efm/efm-langserver"},      init_options = {documentFormatting = true, codeAction = false}, -    filetypes = {"lua", "python", "javascriptreact", "javascript", "sh", "html", "css", "json", "yaml", "markdown", "vue"}, +    filetypes = {"lua", "python", "javascriptreact", "javascript", "typescript","typescriptreact","sh", "html", "css", "json", "yaml", "markdown", "vue"},      settings = {          rootMarkers = {".git/"},          languages = { @@ -101,6 +101,8 @@ require"lspconfig".efm.setup {              sh = sh_arguments,              javascript = tsserver_args,              javascriptreact = tsserver_args, +			typescript = tsserver_args, +			typescriptreact = tsserver_args,              html = {prettier},              css = {prettier},              json = {prettier}, 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)'} | 
