refactor: rename oil to canola across entire codebase
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
e6b42168c9
70 changed files with 1571 additions and 1555 deletions
|
|
@ -1,4 +1,4 @@
|
|||
local oil = require('oil')
|
||||
local canola = require('canola')
|
||||
local test_util = require('spec.test_util')
|
||||
|
||||
describe('close', function()
|
||||
|
|
@ -10,35 +10,35 @@ describe('close', function()
|
|||
end)
|
||||
|
||||
it('does not close buffer from visual mode', function()
|
||||
oil.open()
|
||||
test_util.wait_for_autocmd({ 'User', pattern = 'OilEnter' })
|
||||
assert.equals('oil', vim.bo.filetype)
|
||||
canola.open()
|
||||
test_util.wait_for_autocmd({ 'User', pattern = 'CanolaEnter' })
|
||||
assert.equals('canola', vim.bo.filetype)
|
||||
test_util.feedkeys({ 'V' }, 10)
|
||||
oil.close()
|
||||
assert.equals('oil', vim.bo.filetype)
|
||||
canola.close()
|
||||
assert.equals('canola', vim.bo.filetype)
|
||||
test_util.feedkeys({ '<Esc>' }, 10)
|
||||
end)
|
||||
|
||||
it('does not close buffer from operator-pending mode', function()
|
||||
oil.open()
|
||||
test_util.wait_for_autocmd({ 'User', pattern = 'OilEnter' })
|
||||
assert.equals('oil', vim.bo.filetype)
|
||||
canola.open()
|
||||
test_util.wait_for_autocmd({ 'User', pattern = 'CanolaEnter' })
|
||||
assert.equals('canola', vim.bo.filetype)
|
||||
vim.api.nvim_feedkeys('d', 'n', false)
|
||||
vim.wait(20)
|
||||
local mode = vim.api.nvim_get_mode().mode
|
||||
if mode:match('^no') then
|
||||
oil.close()
|
||||
assert.equals('oil', vim.bo.filetype)
|
||||
canola.close()
|
||||
assert.equals('canola', vim.bo.filetype)
|
||||
end
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('<Esc>', true, true, true), 'n', false)
|
||||
vim.wait(20)
|
||||
end)
|
||||
|
||||
it('closes buffer from normal mode', function()
|
||||
oil.open()
|
||||
test_util.wait_for_autocmd({ 'User', pattern = 'OilEnter' })
|
||||
assert.equals('oil', vim.bo.filetype)
|
||||
oil.close()
|
||||
assert.not_equals('oil', vim.bo.filetype)
|
||||
canola.open()
|
||||
test_util.wait_for_autocmd({ 'User', pattern = 'CanolaEnter' })
|
||||
assert.equals('canola', vim.bo.filetype)
|
||||
canola.close()
|
||||
assert.not_equals('canola', vim.bo.filetype)
|
||||
end)
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue