lettertwo / lettertwo/occurrence.nvim
config flag to dispose "occurrence mode" after operator done
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 21
- Forks
- 0
- Avg merge
- 19h 49m
- Merged PRs (30d)
- 1
Description
This is mostly for built-in operators or integrations where you dont have control over operator.
Right now this possible only with manually overriding after hook which is inconvenient for built-ins/third-party integrations.
Also there are no way to get all available operators. occurrence.api ok for built-ins
just in case anyone else want built-ins but with dispose after operator
local api = require("occurrence.api")
-- filter api because have keymaps there too!
local actions = vim.tbl_map(function(item)
if item.operator ~= nil then
return item
end
end, api)
actions = vim.tbl_map(function(action)
local after = action.after
action.after = function(marks, ctx)
if after then
after(marks, ctx)
end
ctx.occurrence:dispose()
end
return action
end, actions)
require("occurrence").setup({
operators = actions,
})
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 reading the occurrence.api operator entries and the setup path that accepts operators. Trace how each operator's after hook receives ctx and how occurrence:dispose() is handled. Done means a configuration flag can enable disposal after built-in or integration operators without requiring manual after-hook overrides.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, vim
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100