Commit graph

113 commits

Author SHA1 Message Date
Steven Arcangeli
fa3820ebf1 feat: can restore Oil progress window when minimized 2024-04-19 16:31:42 -04:00
Steven Arcangeli
2bd71dda88 lint: fix typechecking 2024-04-19 10:44:16 -04:00
Steven Arcangeli
6c48ac7dc6 fix: output suppressed when opening files (#348) 2024-04-19 10:40:35 -04:00
Steven Arcangeli
0de8e60e3d fix: correctly reset bufhidden for formerly previewed buffers (#291) 2024-03-12 20:41:23 -07:00
Steven Arcangeli
17d71eb3d8 fix: window options sometimes not set in oil buffer (#287) 2024-03-12 20:06:02 -07:00
Steven Arcangeli
f259347d4d cleanup: remove old unused logic for transferring window variables 2024-03-12 19:37:57 -07:00
Steven Arcangeli
e045ee3b4e fix: spurious exits from faulty :wq detection (#221)
The previous mechanism used histget() to get the last command or
expression to detect if the user issued a `:wq` or similar. This had the
issue where if a user issued a `:wq`, started vim again, then entered
oil and saved via some mechanism that is _not_ a command (e.g. a
keymap), we would incorrectly detect that `:wq` and exit after saving.
The new mechanism tracks all keypresses and may end up with false
negatives (e.g. ":wqaff<backspace><backspace>ll"), but those are less
frustrating than false positives.
2024-03-12 15:57:57 -07:00
Lucas Eras Paiva
132b4ea074
fix: close preview window when leaving oil buffer (#296)
* fix: close preview window when leaving oil buffer

* refactor: try different approach for closing the preview window

* fix: use util.is_oil_bufnr

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-02-22 22:11:32 -08:00
Lucas Eras Paiva
bf753c3e3f
feat: do not close preview when switching dirs (#277)
* feat: do not close preview when cd into dir

* refactor: add helper method to run function after oil buffer loads

* Keep preview window open

* Remove some test logic

* Use `run_after_load` when moving to parent directory

* Remove unnecessary update of current window

* refactor: create helper function for updating preview

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-01-21 20:32:02 -08:00
TheLeoP
553b7a0ac1
feat(trash): support for deleting to windows recycle bin (#243)
* feat(windows-trash): support for deleting to windows trash

* feat(windows-trash): add support for view, restore and purge

* fix(windows-trash): undefined path on M.list

* chore(windows-trash): modify comments

* fix(windows-trash): show correct original_path

* fix(windows-trash): add self to powershell_date_grammar

* fix(windows-trash-support): parse deleted date as number

* fix(fs): do not add innecesary \\ on Windows

* feat: extend windows trash adapter

* perf(windows-trash): powershell -> libuv (move, purge and copy)

* fix: don't prompt to save when opening trashed file

* lint: fix luacheck error

* lint: fix luacheck errors

* lint: luacheck error

---------

Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
2024-01-02 22:05:01 -08:00
Steven Arcangeli
22ab2ce1d5 fix: handle opening oil from buffers with foreign schemes (#256) 2023-12-24 11:32:26 -05:00
Shihua Zeng
a173b5776c
feat: allow multiple hlgroups inside one column (#240)
* feat: allow multiple hlgroups inside one column

* types: refactor formatting of highlight types

* types: LuaLS can't infer type information from unpack

---------

Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
2023-12-07 21:36:52 -08:00
Luka Potočnik
3ffb8309e6
feat: actions for sending oil entries to quickfix (#249)
* 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
2023-12-07 21:01:13 -08:00
Micah Halter
b3c24f4b3b
perf: speed up session loading (#246)
* perf: only execute on current buffer since this event is called on each buffer

* fix: only execute `SessionLoadPost` autocommand when a full session is loaded
2023-12-06 23:58:53 -08:00
Steven Arcangeli
636989b603 fix: oil.select respects splitbelow and splitright (#233) 2023-11-30 23:55:43 -08:00
Steven Arcangeli
6566f457e4 fix: preserve buflisted when re-opening oil buffers (#220) 2023-11-19 21:02:06 -08:00
Steven Arcangeli
873d505e5b fix: don't set buflisted on oil buffers (#220) 2023-11-14 22:41:39 -08:00
Steven Arcangeli
af13ce333f fix: quit after mutations when :wq or similar (#221) 2023-11-13 10:46:08 -08:00
Steven Arcangeli
3727410e48
fix: previewing and editing files on windows (#214) 2023-11-09 21:31:23 -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
57db10d748 lint: apply stylua 2023-11-05 07:29:15 -08:00
Steven Arcangeli
126a8a2346 fix: can view drives on Windows 2023-11-05 07:27:28 -08:00
Steven Arcangeli
aea896a880 fix: restore original window when closing floating win (#208) 2023-11-04 11:35:50 -07:00
Steven Arcangeli
05a80e24f6 refactor: floating window uses same win options
We were passing in `style = "minimal"` to `nvim_open_win`, which sets a
lot of default window options. If we remove that, the style of the
floating window will match the other oil windows. Users can use
`float.override` to set `style = "minimal"` if they want the previous
behavior.
2023-10-28 12:23:45 -07:00
Steven Arcangeli
3275996ce6 fix: shorten path when opening files (#194, #197) 2023-10-16 08:19:34 -07:00
Steven Arcangeli
69ce73e810 Revert "fix: shorten path when opening files" (#197)
This reverts commit 6cbc8d725d.
2023-10-15 16:41:50 -07:00
Steven Arcangeli
6cbc8d725d fix: shorten path when opening files (#194) 2023-10-10 19:51:43 -07:00
Steven Arcangeli
bfc5a4c48f fix: hide swapfile error when editing file (#188) 2023-09-28 23:22:31 -07:00
Steven Arcangeli
5ced687ddd fix: don't override FloatTitle highlight (#189) 2023-09-28 17:24:18 -07:00
Steven Arcangeli
977da9ac66 feat: keymaps can specify mode (#187) 2023-09-28 09:18:15 -07:00
Steven Arcangeli
96a334abeb
feat: action for opening entry in an external program (#183) 2023-09-22 12:20:37 -07:00
Steven Arcangeli
83e4d04922 fix: correctly resolve new files when selected (#179) 2023-09-18 20:48:40 -07:00
Steven Arcangeli
9e036c6a48 cleanup: remove unnecessary option restore_win_options
This was only necessary to begin with because I was using `vim.wo` to
set window options. I mistakenly thought that would set the option as
window-local, but it did not. This was fixed in
6f8bf067c0. Now all the window options
should function as expected without the extra logic.
2023-09-12 10:53:11 -07:00
Steven Arcangeli
879d280617 feat: api to sort directory contents (#169) 2023-09-08 21:56:34 -07:00
Steven Arcangeli
e45aeebc2b types: update type annotations for LuaLS 3.7 2023-08-24 09:15:06 -07:00
Steven Arcangeli
7aeb239a6a refactor: rename supports_xfer 2023-08-20 21:50:02 +00:00
Steven Arcangeli
f4819d8b43 refactor: remove cache side effects from adapter.list 2023-08-20 21:50:02 +00:00
Steven Arcangeli
866085407f refactor: fix type annotations for adapters 2023-08-20 18:18:36 +00:00
Steven Arcangeli
9d90893c37 refactor!: disable netrw by default (#155)
If you use oil and you want to still use netrw, set
`default_file_explorer = false`.

It is nonsensical to both use netrw _and_ have oil hijack directory
buffers (which was the case for the default config). It also causes
undefined behavior and bugs. When `default_file_explorer = true` (the
default) oil will now disable netrw for you.
2023-08-20 01:13:42 +00:00
Steven Arcangeli
8f7807946a fix: remaining type errors 2023-08-13 13:32:35 -07:00
Steven Arcangeli
47c7737618 fix: type annotations and type errors 2023-08-12 20:32:52 -07:00
Steven Arcangeli
966eaaadbc fix: directory hijacking when oil is lazy loaded (#149) 2023-08-09 00:57:54 -07:00
Steven Arcangeli
887bb4a8b6 fix: opening oil from netrw defaults to netrw directory (#148) 2023-08-09 00:03:41 -07:00
Steven Arcangeli
a05b2eb54d doc: provide more hints in netrw buffer warning (#148) 2023-08-08 23:55:47 -07:00
Steven Arcangeli
b24380c0e1 feat: config to remove icon padding (#145) 2023-08-08 23:22:16 -07:00
Steven Arcangeli
eaa20a6aee fix: previewed buffers are deleted once hidden (#141) 2023-07-17 17:01:36 -07:00
Jamie Bray
f180a9ffab
fix: use standard Directory highlight group (#139) 2023-07-14 12:02:55 -07:00
David Attlee
789b486fb5
fix: leave netrw autocmds intact when default_file_explorer = false (#135) 2023-06-29 09:48:36 -07:00
Aritra Sen
ac72a8df4a
feat: add override config option to customize float layout (#132)
* (feat) Added override function for floatwin

* (feat) Added in-place floatwin option modification

Added in-place modification of floatwin options, and removed example
from config.lua.
2023-06-26 08:56:22 -07:00