refactor: rename oil to canola across entire codebase (#70)
Problem: the codebase still used the upstream \`oil\` naming everywhere — URL schemes, the \`:Oil\` command, highlight groups, user events, module paths, filetypes, buffer/window variables, LuaCATS type annotations, vimdoc help tags, syntax groups, and internal identifiers. Solution: mechanical rename of every reference. URL schemes now use \`canola://\` (plus \`canola-ssh://\`, \`canola-s3://\`, \`canola-sss://\`, \`canola-trash://\`, \`canola-test://\`). The \`:Canola\` command replaces \`:Oil\`. All highlight groups, user events, augroups, namespaces, filetypes, require paths, type annotations, help tags, and identifiers follow suit. The \`upstream\` remote to \`stevearc/oil.nvim\` has been removed and the \`vim.g.oil\` deprecation shim dropped.
This commit is contained in:
parent
67ad0632a6
commit
0d3088f57e
70 changed files with 1571 additions and 1555 deletions
|
|
@ -1,26 +1,26 @@
|
|||
local config = require('oil.config')
|
||||
local config = require('canola.config')
|
||||
|
||||
describe('config', function()
|
||||
after_each(function()
|
||||
vim.g.oil = nil
|
||||
vim.g.canola = nil
|
||||
end)
|
||||
|
||||
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 }
|
||||
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 }
|
||||
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.oil is set', function()
|
||||
vim.g.oil = nil
|
||||
it('uses defaults when neither opts nor vim.g.canola is set', function()
|
||||
vim.g.canola = 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.oil', function()
|
||||
vim.g.oil = { delete_to_trash = true }
|
||||
it('prefers explicit opts over vim.g.canola', function()
|
||||
vim.g.canola = { delete_to_trash = true }
|
||||
config.setup({ delete_to_trash = false })
|
||||
assert.is_false(config.delete_to_trash)
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue