nvim-orgmode / nvim-orgmode/orgmode
Use ftplugin directory for filetype initialization
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 3.9k
- Forks
- 190
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
Does this feature exist in Emacs orgmode core?
N/A
Orgmode link
No response
Feature value
I have a plugin, table.vim that I would like to use extend orgmode to format tables. There is a keymap collision with <tab>. The <tab> mapping used in my plugin is context dependent, instead of simply disabling orgmode's <tab> mapping, I would prefer to capture it and use it as fallback when the context is not a table.
Orgmode uses the FileType event to set keymaps. This is not ideal as it fires after the ftplugin and after/plugin directories in the runtime path. I cannot make plugin-side changes to table.vim to ensure it maps <tab> after orgmode does. Currently I must register my own FIleType callback after Orgmode loads.
Neovim defines an org filetype, but it is not very substantive. It seems to me that Orgmode should define the org filetype in ftplugin/org.lua and set the b:did_ftplugin option to override neovim's definition. This would also allow other plugins to use the after/ftplugin directory to extend orgmode.
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the current FileType event handler that initializes orgmode and compare it with Neovim’s org filetype setup. Check how an ftplugin/org.lua entry and b:did_ftplugin would affect after/ftplugin ordering and the mapping used by table.vim. Done means orgmode initializes through ftplugin ordering while allowing after/ftplugin extensions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100