Commit graph

246 commits

Author SHA1 Message Date
Steven Arcangeli
96f0983e75 fix(windows): file operation preview uses only backslash path separator (#336) 2024-04-23 20:57:22 -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
6a7a10b611 fix: git mv errors when moving empty directory (#358) 2024-04-23 19:31:54 -07:00
Steven Arcangeli
2bc56ad68a fix: error when opening files from floating oil window (#355) 2024-04-21 07:37:54 -07:00
Steven Arcangeli
1f05774e1c feat: experimental support for git operations (#290) 2024-04-19 18:00:44 -04:00
Steven Arcangeli
354c53080a fix: duplicate create actions (#334) 2024-04-19 17:05:19 -04:00
Steven Arcangeli
c86e48407b fix: race condition when entering oil buffer (#321) 2024-04-19 16:31:42 -04:00
Steven Arcangeli
f41d7e7cd8 fix: support visual mode when preview window is open (#315) 2024-04-19 16:31:42 -04:00
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
Kevin Oberlies
8bb35eb81a
fix(ssh): escape all file paths for the ssh adapter (#353)
* Escape all paths for ssh file changes using `vim.fn.shellescape()`

* Change away from `vim.fn.shellescape` to custom implementation

Really, only escape `'` with `'\\''` so that it will:
- exit the single quote mode
- escape out a single quote character
- and get back into the single quote mode

Also format long line so linter doesn't complain

* Adding doc comments to the shellescape function

* Adding actual words to the doc comment
2024-04-17 16:19:10 -04:00
Steven Arcangeli
e462a34465 feat: add user autocmds before and after performing actions (#310) 2024-03-17 19:50:31 -07: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
Lucas Eras Paiva
71b076b3af
feat: use natural sort order by default (#328)
* Sort entries with natural sorting

* refactor: move natural ordering logic and add config option

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-03-12 19:21:54 -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
Luis Calle
18dfd2458d
fix(windows): can delete non-ascii filenames to trash (#323) 2024-03-04 10:50:22 -08:00
Steven Arcangeli
c437f3c5b0 fix: potential leak in experimental file watcher 2024-03-02 18:56:18 -08:00
TheNordicMule
29a06fcc90
feat: add ability to alter lsp file operation timeout (#317)
* feat: add ability to alter lsp file operation timeout

* change default

* fix table

* add missing

* move inside table

* remove duplicate

* reuse default

* change message

* refactor: rename autosave config option

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-03-02 09:02:42 -08: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
Steven Arcangeli
6953c2c17d fix: actions.open_external uses explorer.exe in WSL (#273) 2024-02-20 17:30:56 -08:00
Steven Arcangeli
bcfe7d1ec5 feat: experimental option to watch directory for changes (#292) 2024-02-19 23:27:27 -08:00
Reinder van Bochove
e27cc4e138
feat: add border config for SSH and keymaps help window (#299)
* feat: add config for ssh window border

* chore: add documentation for ssh window border

* feat: add config for keymaps help window border

* chore: add documentatoin for keymaps help window border
2024-02-19 20:00:49 -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
Steven Arcangeli
f0315c101f doc: document some configuration options (#283) 2024-01-21 09:34:44 -08:00
Steven Arcangeli
ec24334471 fix(lsp_rename): handle absolute path glob filters (#279) 2024-01-16 05:55:11 +00:00
TheLeoP
e71b6caa95
perf(windows): use a single powershell process for trash operations (#271)
* perf(trash_windows): use a single powershell instance for operations

* refactor(trash_windows): encapsulate powershell connection logic

* refactor(windows_trash): better name for functions

* fix(windows_trash): set connection error on initializatino if needed

* refactor(windows_trash): simplify initialization code

* refactor: extract some powershell logic into separate file

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-01-15 17:22:11 -08:00
Steven Arcangeli
a1af7a1b59 fix: diagnostic float would not open if scope=cursor (#275) 2024-01-14 12:35:35 -08:00
Steven Arcangeli
c4cc8240f1 fix: crash when LSP client workspace_folders is nil (#269) 2024-01-07 12:13:37 -08:00
Steven Arcangeli
49b2b3f4a5 fix(trash): mac error deleting dangling symbolic links to trash (#251) 2024-01-07 12:13:37 -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
5d9e4368d4 fix(trash): error deleting dangling symbolic links to trash (#251) 2023-12-26 18:03:00 +00:00
Steven Arcangeli
22ab2ce1d5 fix: handle opening oil from buffers with foreign schemes (#256) 2023-12-24 11:32:26 -05:00
Steven Arcangeli
71b1ef5edf feat: constrain_cursor option (closes #257) 2023-12-23 19:16:53 -05:00
Steven Arcangeli
a60c6d10fd fix: constrain cursor when entering insert mode
The main use case for this is hitting `I` from normal mode will now put
the cursor in insert mode at the beginning of the first editable column.
2023-12-23 19:02:09 -05:00
Steven Arcangeli
250e0af7a5
feat: support all LSP workspace file operations (#264) 2023-12-23 14:08:11 -08:00
Jack Tubbenhauer
48d8ea8f4a
feat: option to auto-save files affected by will_rename_files (#218)
* save buffers changed by will_rename_files

* prevent closing already open buffers

* chore: move to config option

* chore: fixes

* fix: a crash and some formatting

---------

Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
2023-12-23 08:00:25 -08:00
Luckas
24027ed8d7
fix: willRename source path (#248)
* fix: willRename source path

* update: path matching handling

* lint: apply stylua

---------

Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
2023-12-10 11:41:12 -08:00
umlx5h
ea612fe926
feat: add 'update_on_cursor_moved' option to preview window (#250) 2023-12-09 19:02:04 -08: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
Yi Ming
82834573bb
feat: refresh action also clears search highlight (#228) 2023-12-03 17:39:25 -08:00
Steven Arcangeli
636989b603 fix: oil.select respects splitbelow and splitright (#233) 2023-11-30 23:55:43 -08:00
Steven Arcangeli
e89a8f8ade fix: crash in ssh and trash adapter detail columns (#235) 2023-11-24 14:13:56 -08:00
Steven Arcangeli
05cb8257cb fix: bug copying file multiple times 2023-11-19 23:58:40 -08:00
Steven Arcangeli
303f31895e fix: buffer data cleared when setting buflisted = false
For posterity: this was a very painful lesson. Turns out "BufDelete"
doesn't mean "buffer was deleted", it means "buffer was deleted from the
buffer list". If you set nobuflisted, BufDelete will be triggered even
though the buffer is still loaded and active.
2023-11-19 21:10:41 -08:00
Steven Arcangeli
6566f457e4 fix: preserve buflisted when re-opening oil buffers (#220) 2023-11-19 21:02:06 -08:00