Skip to content

Commit

Permalink
Merge pull request #253 from kabinspace/automatic_indent
Browse files Browse the repository at this point in the history
Add automatic indent detection
  • Loading branch information
mehalter committed Apr 5, 2022
2 parents b8ecb60 + 3e6b936 commit b64448f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lua/configs/indent-o-matic.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
local M = {}

function M.config()
local present, indent_o_matic = pcall(require, "indent-o-matic")
if not present then
return
end

indent_o_matic.setup(require("core.utils").user_plugin_opts("plugins.indent-o-matic", {
max_lines = 2048,
standard_widths = { 2, 4, 8 },
}))
end

return M
8 changes: 8 additions & 0 deletions lua/core/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ local astro_plugins = {
require("configs.filetype").config()
end,
},
-- Indent detection
{
"Darazaki/indent-o-matic",
event = "BufRead",
config = function()
require("configs.indent-o-matic").config()
end,
},

-- Notification Enhancer
{
Expand Down

0 comments on commit b64448f

Please sign in to comment.