Skip to content
Discussion options

You must be logged in to vote

It's not an oversight you can ignore, the two specs behave differently, and the README one is the correct one. The ft line isn't a lazy-loading nicety here; without it, the first .org file you open in a session silently loses orgmode's ftplugin.

The reason is that Neovim core ships its own ftplugin/org.vim, and its first act is:

if exists("b:did_ftplugin")
    finish
endif
let b:did_ftplugin = 1

orgmode's ftplugin/org.lua opens with the mirror image of that guard:

if vim.b.did_ftplugin or vim.b.org_tmp_edit_window then
  return
end

So it's a race for one buffer-local flag. event = 'VeryLazy' fires after FileType, so on nvim notes.org core's ftplugin gets there first, sets the flag, and wh…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rmunn
Comment options

Answer selected by rmunn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants