* 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.
Problem: users who bind <Esc> to close oil in floating windows also
accidentally close oil in split or fullscreen windows. There is no
action that closes only a floating oil window and is a no-op otherwise.
Solution: add a close_float action that checks vim.w.is_oil_win (the
same window-local variable oil.close already uses to identify its own
floating windows) before delegating to oil.close.
Resolves: stevearc/oil.nvim#645
* feat: copy/paste to system clipboard on macOS
* stylua
* feat: copy/paste to system clipboard on linux
* force mime type
* fix string.gsub
* vim.uv or vim.loop
* fix stylua
* support gnome directly
* support wayland
* refactor: extract clipboard actions into separate file
* fix: copy/paste in KDE
* refactor: simplify file loading
* fix: copy/paste on x11
* fix: better error message when clipboard command not found
* fix: paste on mac
* fix: pasting in Gnome
* feat: support pasting multiple files
* feat: support copying multiple files to clipboard
---------
Co-authored-by: Steve Walker <65963536+etherswangel@users.noreply.github.com>
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
* feat: auto-quit vim if oil is closed as last buffer
* rename auto_close_vim to auto_close_last_buffer
* rework actions.close to be more like actions.cd
* fix: configure close action correctly
* add type annotation, future proofing
* fix: typo
* fix: typo
* refactor: better type annotations and backwards compatibility
---------
Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
* implement floating window
* reset width on closing window
* use gap from new config parameter
* use minimal style for preview in floating
* lower z-index
* add configuration of preview position in floating window
* fix in verions earlier than nvim 0.10
* close preview on opening floating window
Close the any existing preview because otherwise strange errors happen when the preview is open and the floating window is opened at the same time.
* reset formatting changes
* remove empty line
* change z-index of preview window to floating window z-index
* add configurations to oil.txt
* formatting
* add auto configuration
* update oil doc
* refactor: move logic into layout.lua and eliminate flicker
* fix: floating preview window title is file name
* doc: clarify default_file_explorer
* refactor: don't need a preview_gap option
* refactor: only find preview win in current tabpage
---------
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
* feat: notify when changing the current directory
* Update actions.lua
---------
Co-authored-by: Ruslan Hrabovyi <ruslan.hrabovyi@ligadigital.com>
Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
* Implement actions for sending oil entries to quickfix/location-list
* Use vim.notify instead of vim.notify_once in util quickfix function
* Remove redundant files/directories options for sending to qf
always send just files
* set qflist/loclist with a single call
* Add type annotations and default values for send_to_quickfix
* In visual mode, send only selected items to qf
* 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
In an oil buffer you can select multiple entries by highlighting them in
visual mode and then calling `oil.select()` (or using a keymap that does
so, like `<CR>` or `<C-s>`. Previously we would automatically assume
that you wanted to open multiple entries as splits. Now, we treat a
default call to `select()` (which is what `<CR>` does) as if you simply
wanted to open the buffers and keep the same window. This plays nicer
with bufferlines. If you want the old behavior, you can explicitly pass
in `oil.select({vertical = true})` or use the `<C-s>` keymap when you
have multiple entries selected.
Using `vim.v.register`, we can respect the user's desire of copying to the unnamed (or unnamedplus) register or default one.
Check `:h v:register`
Thanks