Skip to content

Commit

Permalink
fix(indents): Trigger reindent when closing block or drawers
Browse files Browse the repository at this point in the history
  • Loading branch information
kristijanhusak committed Jan 22, 2025
1 parent e0ba9dc commit e385fcf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ftplugin/org.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ end
vim.opt_local.formatexpr = 'v:lua.require("orgmode.org.format")()'
vim.opt_local.omnifunc = 'v:lua.orgmode.omnifunc'
vim.opt_local.commentstring = '# %s'
vim.bo.indentkeys = ('%s,%s'):format(vim.bo.indentkeys, '=~end_src,=~end_example,<:>')

_G.orgmode.omnifunc = function(findstart, base)
return require('orgmode').completion:omnifunc(findstart, base)
Expand Down Expand Up @@ -69,5 +70,6 @@ vim.b.undo_ftplugin = table.concat({
'foldexpr<',
'formatexpr<',
'omnifunc<',
'indentkeys<',
'| unlet! b:org_bufnr b:org_tmp_edit_window',
}, ' ')

0 comments on commit e385fcf

Please sign in to comment.