Skip to content

Commit

Permalink
refactor: move auto setting org_adapt_indentation to Config:extend
Browse files Browse the repository at this point in the history
  • Loading branch information
PriceHiller committed Jan 25, 2024
1 parent cac865a commit 2e8410c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion ftplugin/org.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ config:setup_mappings('text_objects')
config:setup_foldlevel()

if config.org_startup_indented then
config.org_adapt_indentation = not config.org_indent_mode_turns_off_org_adapt_indentation
vim.b.org_indent_mode = true
end
require("orgmode.org.indent").setup()
Expand Down
3 changes: 3 additions & 0 deletions lua/orgmode/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ function Config:extend(opts)
opts.org_priority_default = self.opts.org_priority_default
end
self.opts = vim.tbl_deep_extend('force', self.opts, opts)
if self.org_startup_indented then
self.org_adapt_indentation = not self.org_indent_mode_turns_off_org_adapt_indentation
end
return self
end

Expand Down

0 comments on commit 2e8410c

Please sign in to comment.