Skip to content

Commit e385fcf

Browse files
fix(indents): Trigger reindent when closing block or drawers
1 parent e0ba9dc commit e385fcf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ftplugin/org.lua

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ end
3232
vim.opt_local.formatexpr = 'v:lua.require("orgmode.org.format")()'
3333
vim.opt_local.omnifunc = 'v:lua.orgmode.omnifunc'
3434
vim.opt_local.commentstring = '# %s'
35+
vim.bo.indentkeys = ('%s,%s'):format(vim.bo.indentkeys, '=~end_src,=~end_example,<:>')
3536

3637
_G.orgmode.omnifunc = function(findstart, base)
3738
return require('orgmode').completion:omnifunc(findstart, base)
@@ -69,5 +70,6 @@ vim.b.undo_ftplugin = table.concat({
6970
'foldexpr<',
7071
'formatexpr<',
7172
'omnifunc<',
73+
'indentkeys<',
7274
'| unlet! b:org_bufnr b:org_tmp_edit_window',
7375
}, ' ')

0 commit comments

Comments
 (0)