refactor: revert module namespace from canola back to oil

Problem: the canola rename creates unnecessary friction for users
migrating from stevearc/oil.nvim — every `require('oil')` call and
config reference must change.

Solution: revert all module paths, URL schemes, autocmd groups,
highlight groups, and filetype names back to `oil`. The repo stays
`canola.nvim` for identity; the code is a drop-in replacement.
This commit is contained in:
Barrett Ruth 2026-03-10 22:41:32 -04:00
parent 9298b48c5d
commit 8dd67f91e8
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
68 changed files with 1622 additions and 1625 deletions

View file

@ -1,26 +1,26 @@
local config = require('canola.config')
local config = require('oil.config')
describe('config', function()
after_each(function()
vim.g.canola = nil
vim.g.oil = nil
end)
it('falls back to vim.g.canola when setup() is called with no args', function()
vim.g.canola = { delete_to_trash = true, cleanup_delay_ms = 5000 }
it('falls back to vim.g.oil when setup() is called with no args', function()
vim.g.oil = { delete_to_trash = true, cleanup_delay_ms = 5000 }
config.setup()
assert.is_true(config.delete_to_trash)
assert.equals(5000, config.cleanup_delay_ms)
end)
it('uses defaults when neither opts nor vim.g.canola is set', function()
vim.g.canola = nil
it('uses defaults when neither opts nor vim.g.oil is set', function()
vim.g.oil = nil
config.setup()
assert.is_false(config.delete_to_trash)
assert.equals(2000, config.cleanup_delay_ms)
end)
it('prefers explicit opts over vim.g.canola', function()
vim.g.canola = { delete_to_trash = true }
it('prefers explicit opts over vim.g.oil', function()
vim.g.oil = { delete_to_trash = true }
config.setup({ delete_to_trash = false })
assert.is_false(config.delete_to_trash)
end)