feat: support vim.g.oil configuration + remove release-please (#17)
* feat: support vim.g.oil declarative configuration
Problem: oil.nvim requires an imperative require("oil").setup(opts)
call to initialize. The Neovim ecosystem is moving toward vim.g.plugin
as a declarative config source that works without explicit setup calls.
Solution: fall back to vim.g.oil in config.setup() when no opts are
passed, and add plugin/oil.lua to auto-initialize when vim.g.oil is
set. Explicit setup(opts) calls still take precedence. Update docs
and add tests for the new resolution order.
Closes: barrettruth/oil.nvim#1
* build: remove release-please pipeline
Problem: the release-please action creates automated releases that
are not needed for this fork's workflow.
Solution: remove the release job from tests.yml and the
release-please branch exclusion from the review request workflow.
* fix(doc): improve readme phrasing
* doc: minor phrasing "improvements"
* ci: add luarocks release on tag push
Problem: there is no automated way to publish oil.nvim to luarocks
when a new version is tagged.
Solution: add a luarocks workflow that triggers on v* tag pushes,
runs the test suite via workflow_call, then publishes via
luarocks-tag-release. Add workflow_call trigger to tests.yml so it
can be reused.
This commit is contained in:
parent
3b930636e3
commit
856716e6dc
8 changed files with 116 additions and 55 deletions
21
doc/oil.txt
21
doc/oil.txt
|
|
@ -48,6 +48,27 @@ REQUIREMENTS *oil-requirement
|
|||
--------------------------------------------------------------------------------
|
||||
CONFIG *oil-config*
|
||||
|
||||
Oil can be configured in two ways:
|
||||
|
||||
1. The traditional `setup()` call: >lua
|
||||
require("oil").setup({
|
||||
-- your opts here
|
||||
})
|
||||
<
|
||||
|
||||
2. Declarative configuration via `vim.g.oil`, which does not require calling
|
||||
`setup()`: >lua
|
||||
vim.g.oil = {
|
||||
-- your opts here
|
||||
}
|
||||
<
|
||||
|
||||
When `vim.g.oil` is set, oil initializes automatically during plugin
|
||||
loading. If `setup()` is called with explicit opts, those take precedence
|
||||
over `vim.g.oil`.
|
||||
|
||||
The full list of options with their defaults:
|
||||
|
||||
>lua
|
||||
require("oil").setup({
|
||||
-- Oil will take over directory buffers (e.g. `vim .` or `:e src/`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue