summaryrefslogtreecommitdiff
path: root/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua')
-rw-r--r--mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua14
1 files changed, 13 insertions, 1 deletions
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua
index b7b5812..fe9cf69 100644
--- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua
+++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lsp.lua
@@ -348,7 +348,19 @@ return {
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
- return { lsp_format = "fallback", timeout_ms = 1000, async = false }
+ local ft = vim.bo[bufnr].filetype
+ local off = {
+ javascript = true,
+ typescript = true,
+ javascriptreact = true,
+ typescriptreact = true,
+ json = true,
+ css = true,
+ }
+ if off[ft] then
+ return false
+ end
+ return { lsp_fallback = true, timeout_ms = 1000, async = false }
end,
})