Namespace rename: oil → canola #38

Closed
opened 2026-09-21 18:54:23 +00:00 by barrettruth · 0 comments
Owner

Original issue: barrettruth/canola.nvim#198
Original author: barrettruth
Original date: 2026-03-19T17:18:57Z

Overview

Every identifier inherited from oil.nvim that uses the `oil` name must be updated to `canola`. This is a mechanical, find-and-replace-level change that touches all modules, but it is the prerequisite for everything else in v1.1 — doing it first means every subsequent PR works in the correct namespace.

No compatibility shim for `require('oil')` will be provided. This is a hard break; users must update their configs.

File and directory renames

Old path New path
`lua/oil/` (all ~30 modules) `lua/canola/`
`plugin/oil.lua` `plugin/canola.lua`
`doc/oil.txt` `doc/canola.txt`
`lua/resession/extensions/oil.lua` `lua/resession/extensions/canola.lua`

Internal require paths

All `require('oil')` and `require('oil.x')` calls inside the codebase become `require('canola')` and `require('canola.x')`.

Neovim-facing identifiers

These are the identifiers that users and third-party plugins interact with directly:

Category Old New
Filetype `oil` `canola`
Augroup `Oil` `Canola`
Highlight groups `Oil*` (e.g. `OilDir`) `Canola*` (e.g. `CanolaDir`)
User command `:Oil` `:Canola`
Window variables `oil_*` `canola_*`
Buffer variables `oil_*` `canola_*`

Highlight group inventory

All of the following must be renamed:

`OilDir`, `OilDirIcon`, `OilFile`, `OilFileIcon`, `OilExecutableFile`, `OilExecutableHidden`, `OilHidden`, `OilLink`, `OilSocket`, `OilFifo`, `OilCopy`, `OilCreate`, `OilDelete`, `OilMove`, `OilChange`, `OilPermissionRead`, `OilPermissionWrite`, `OilPermissionExecute`, `OilPermissionNone`, `OilTypeDir`, `OilTypeFile`, `OilTypeLink`, `OilTypeSpecial`, `OilSize`, `OilMtime`, `OilAtime`, `OilCtime`, `OilUser`, `OilGroup`

What does not change

  • `vim.g.loaded_netrw` — this is Neovim's own variable name, not ours; it stays as-is
  • Test infrastructure identifiers that have no user-facing surface (internal spec helpers, `oil-test://` adapter scheme used only in tests — the scheme can be renamed in a follow-up)

Migration note for users

Users must update:

  1. `require('oil')` → `require('canola')` everywhere in their config
  2. `:Oil` → `:Canola` in keymaps and command aliases
  3. Colorscheme overrides targeting `Oil*` highlight groups → `Canola*`
  4. Any `FileType oil` autocmds → `FileType canola`
  5. Any `augroup` references to `Oil` → `Canola`

Relationship to other issues

This rename is a prerequisite for all other v1.1 work. It should land before:

  • #82 — `vim.g.canola` config access
  • #183 — config surface restructure
  • #181 — canola-collection adapter registration
  • #182 — enhanced User autocmds
> Original issue: barrettruth/canola.nvim#198 > Original author: `barrettruth` > Original date: 2026-03-19T17:18:57Z ## Overview Every identifier inherited from oil.nvim that uses the \`oil\` name must be updated to \`canola\`. This is a mechanical, find-and-replace-level change that touches all modules, but it is the prerequisite for everything else in v1.1 — doing it first means every subsequent PR works in the correct namespace. No compatibility shim for \`require('oil')\` will be provided. This is a hard break; users must update their configs. ## File and directory renames | Old path | New path | |---|---| | \`lua/oil/\` (all ~30 modules) | \`lua/canola/\` | | \`plugin/oil.lua\` | \`plugin/canola.lua\` | | \`doc/oil.txt\` | \`doc/canola.txt\` | | \`lua/resession/extensions/oil.lua\` | \`lua/resession/extensions/canola.lua\` | ## Internal require paths All \`require('oil')\` and \`require('oil.x')\` calls inside the codebase become \`require('canola')\` and \`require('canola.x')\`. ## Neovim-facing identifiers These are the identifiers that users and third-party plugins interact with directly: | Category | Old | New | |---|---|---| | Filetype | \`oil\` | \`canola\` | | Augroup | \`Oil\` | \`Canola\` | | Highlight groups | \`Oil*\` (e.g. \`OilDir\`) | \`Canola*\` (e.g. \`CanolaDir\`) | | User command | \`:Oil\` | \`:Canola\` | | Window variables | \`oil_*\` | \`canola_*\` | | Buffer variables | \`oil_*\` | \`canola_*\` | ### Highlight group inventory All of the following must be renamed: \`OilDir\`, \`OilDirIcon\`, \`OilFile\`, \`OilFileIcon\`, \`OilExecutableFile\`, \`OilExecutableHidden\`, \`OilHidden\`, \`OilLink\`, \`OilSocket\`, \`OilFifo\`, \`OilCopy\`, \`OilCreate\`, \`OilDelete\`, \`OilMove\`, \`OilChange\`, \`OilPermissionRead\`, \`OilPermissionWrite\`, \`OilPermissionExecute\`, \`OilPermissionNone\`, \`OilTypeDir\`, \`OilTypeFile\`, \`OilTypeLink\`, \`OilTypeSpecial\`, \`OilSize\`, \`OilMtime\`, \`OilAtime\`, \`OilCtime\`, \`OilUser\`, \`OilGroup\` ## What does not change - \`vim.g.loaded_netrw\` — this is Neovim's own variable name, not ours; it stays as-is - Test infrastructure identifiers that have no user-facing surface (internal spec helpers, \`oil-test://\` adapter scheme used only in tests — the scheme can be renamed in a follow-up) ## Migration note for users Users must update: 1. \`require('oil')\` → \`require('canola')\` everywhere in their config 2. \`:Oil\` → \`:Canola\` in keymaps and command aliases 3. Colorscheme overrides targeting \`Oil*\` highlight groups → \`Canola*\` 4. Any \`FileType oil\` autocmds → \`FileType canola\` 5. Any \`augroup\` references to \`Oil\` → \`Canola\` ## Relationship to other issues This rename is a prerequisite for all other v1.1 work. It should land before: - #82 — \`vim.g.canola\` config access - #183 — config surface restructure - #181 — canola-collection adapter registration - #182 — enhanced User autocmds
barrettruth added this to the v1.1 milestone 2026-09-21 18:54:23 +00:00
Sign in to join this conversation.
No description provided.