Commit graph

23 commits

Author SHA1 Message Date
Barrett Ruth
e2cd1e66cf
refactor: revert canola namespace to oil and remove vim.g config (#120)
Some checks are pending
quality / changes (push) Waiting to run
quality / Lua Format Check (push) Blocked by required conditions
quality / Lua Lint Check (push) Blocked by required conditions
quality / Lua Type Check (push) Blocked by required conditions
quality / Markdown Format Check (push) Blocked by required conditions
test / Test (Neovim nightly) (push) Waiting to run
test / Test (Neovim stable) (push) Waiting to run
* 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.

* refactor: remove `vim.g.oil` declarative config

Problem: the `vim.g.oil` configuration path was added prematurely.
It adds a second config entrypoint before the plugin has stabilized
enough to justify it.

Solution: remove `vim.g.oil` support from `plugin/oil.lua`,
`config.setup()`, docs, and tests. Users configure via
`require("oil").setup({})`.
2026-03-10 22:49:56 -04:00
Barrett Ruth
0d3088f57e
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.
2026-03-05 14:50:10 -05:00
Barrett Ruth
86f553cd0a
build: replace luacheck with selene, add nix devshell and pre-commit (#20)
* build: replace luacheck with selene

Problem: luacheck is unmaintained (last release 2018) and required
suppressing four warning classes to avoid false positives. It also
lacks first-class vim/neovim awareness.

Solution: switch to selene with std='vim' for vim-aware linting.
Replace the luacheck CI job with selene, update the Makefile lint
target, and delete .luacheckrc.

* build: add nix devshell and pre-commit hooks

Problem: oil.nvim had no reproducible dev environment. The .envrc
set up a Python venv for the now-removed docgen pipeline, and there
were no pre-commit hooks for local formatting checks.

Solution: add flake.nix with stylua, selene, and prettier in the
devshell. Replace the stale Python .envrc with 'use flake'. Add
.pre-commit-config.yaml with stylua and prettier hooks matching
other plugins in the repo collection.

* fix: format with stylua

* build(selene): configure lints and add inline suppressions

Problem: selene fails on 5 errors and 3 warnings from upstream code
patterns that are intentional (mixed tables in config API, unused
callback parameters, identical if branches for readability).

Solution: globally allow mixed_table and unused_variable (high volume,
inherent to the codebase design). Add inline selene:allow directives
for the 8 remaining issues: if_same_then_else (4), mismatched_arg_count
(1), empty_if (2), global_usage (1). Remove .envrc from tracking.

* build: switch typecheck action to mrcjkb/lua-typecheck-action

Problem: oil.nvim used stevearc/nvim-typecheck-action, which required
cloning the action repo locally for the Makefile lint target. All
other plugins in the collection use mrcjkb/lua-typecheck-action.

Solution: swap to mrcjkb/lua-typecheck-action@v0 for consistency.
Remove the nvim-typecheck-action git clone from the Makefile and
.gitignore. Drop LuaLS from the local lint target since it requires
a full language server install — CI handles it.
2026-02-21 23:52:27 -05:00
4ab4765a84 feat: pass entry to is_hidden_file and is_always_hidden callbacks
Problem: the is_hidden_file and is_always_hidden config callbacks
only received (name, bufnr), making it impossible to filter by entry
type, permissions, or other metadata without reimplementing entry
lookup.

Solution: pass the full oil.Entry as a third argument to both
callbacks. Existing configs that only accept (name, bufnr) are
unaffected since Lua silently ignores extra arguments. The internal
should_display function signature changes from (name, bufnr) to
(bufnr, entry) to reflect its new contract.

Cherry-picked from: stevearc/oil.nvim#644
2026-02-20 16:29:08 -05:00
Steven Arcangeli
09a4e4f460 ci: fix type error 2025-12-21 15:14:45 -05:00
Steven Arcangeli
d7c61c7084 fix: silent handling when buffer has no oil adapter (#573) 2025-03-04 12:57:01 -08:00
Julian
b39a78959f
fix: add compatibility for Lua 5.1 (#456)
Some architectures don't support LuaJIT.
Remove the goto's from the code to be compatible
with Neovim built without LuaJIT.

Signed-off-by: Julian Ruess <julianonline+github@posteo.de>
2024-08-16 21:33:59 -07:00
Steven Arcangeli
2cb39e838e doc: more detailed type annotations for setup() call 2024-05-22 13:46:11 -07:00
Steven Arcangeli
3b3a6b23a1 fix(windows): treat both backslash and frontslash as path separators (#336) 2024-04-23 21:04:31 -07:00
Steven Arcangeli
be0a1ecbf0 fix: gracefully handle new dirs with trailing backslash on windows (#336) 2024-04-23 20:57:14 -07:00
Steven Arcangeli
a1af7a1b59 fix: diagnostic float would not open if scope=cursor (#275) 2024-01-14 12:35:35 -08:00
Steven Arcangeli
6175bd6462
feat: trash support for linux and mac (#165)
* wip: skeleton code for trash adapter

* refactor: split trash implementation for mac and linux

* fix: ensure we create the .Trash/$uid dir

* feat: code complete linux trash implementation

* doc: write up trash features

* feat: code complete mac trash implementation

* cleanup: remove previous, terrible, undocumented trash feature

* fix: always disabled trash

* feat: show original path of trashed files

* doc: add a note about calling actions directly

* fix: bugs in trash implementation

* fix: schedule_wrap in mac trash

* doc: fix typo and line wrapping

* fix: parsing of arguments to :Oil command

* doc: small documentation tweaks

* doc: fix awkward wording in the toggle_trash action

* fix: warning on Windows when delete_to_trash = true

* feat: :Oil --trash can open specific trash directories

* fix: show all trash files in device root

* fix: trash mtime should be sortable

* fix: shorten_path handles optional trailing slash

* refactor: overhaul the UI

* fix: keep trash original path vtext from stacking

* refactor: replace disable_changes with an error filter

* fix: shorten path names in home directory relative to root

* doc: small README format changes

* cleanup: remove unnecessary preserve_undo logic

* test: add a functional test for the freedesktop trash adapter

* test: more functional tests for trash

* fix: schedule a callback to avoid main loop error

* refactor: clean up mutator logic

* doc: some comments and type annotations
2023-11-05 12:40:58 -08:00
Steven Arcangeli
d8f0d91b10 feat: display ../ entry in oil buffers (#166) 2023-11-05 08:00:38 -08:00
Steven Arcangeli
0715f1b0aa fix: line parsing for empty columns 2023-11-05 07:57:54 -08:00
Steven Arcangeli
4088efb8ff fix: parse errors when moving files across adapters 2023-10-17 18:03:27 -07:00
Steven Arcangeli
926ae067eb fix: allow converting a file to directory and vice-versa (#117)
If you rename a file to have a `/` at the end, oil will detect the
change as a delete + new directory. Similarly, if you delete the
trailing `/` from a directory, it will delete the dir and create a new
file. This should help with the case where you want to create a new file
but forgot to add the trailing `/` and now you have a file instead.
2023-09-09 18:33:47 -07:00
Steven Arcangeli
e45aeebc2b types: update type annotations for LuaLS 3.7 2023-08-24 09:15:06 -07:00
Steven Arcangeli
4a4e0f4013 refactor: small perf win by eliminating string object keys 2023-06-25 22:44:44 -07:00
Steven Arcangeli
9be36a6488 fix: symbolic link target parsing fails if it has a trailing slash (#131) 2023-06-21 17:15:57 -07:00
Steven Arcangeli
33d5701a8d WIP: force move cursor 2023-03-06 22:37:27 -08:00
Steven Arcangeli
e5acff1b77 feat: config function to define which files are hidden (#58) 2023-02-22 21:11:11 -08:00
Steven Arcangeli
bcb99ae95a fix: detect duplicate filenames in buffer 2023-01-11 23:54:51 -08:00
Steven Arcangeli
fefd6ad5e4 feat: first draft 2023-01-02 01:34:53 -08:00