summaryrefslogtreecommitdiff
path: root/lua/core
diff options
context:
space:
mode:
Diffstat (limited to 'lua/core')
-rw-r--r--lua/core/formatter.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/core/formatter.lua b/lua/core/formatter.lua
index 50dcb654..06fcb56d 100644
--- a/lua/core/formatter.lua
+++ b/lua/core/formatter.lua
@@ -48,8 +48,12 @@ end
-- end
-- end
-- end
+local status_ok, formatter = pcall(require, "formatter")
+if not status_ok then
+ return
+end
-require("formatter").setup {}
+formatter.setup {}
if not O.format_on_save then
vim.cmd [[if exists('#autoformat#BufWritePost')