Commit graph

253 commits

Author SHA1 Message Date
Steven Arcangeli
aa0c00c7fd fix(ssh): bad argument when editing files over ssh (#370) 2024-05-13 11:35:50 -06:00
pn-watin
010b44a79d
refactor: preview window uses Yes/No instead of Ok/Cancel (#344)
NOTE: the `o` and `c` keymaps will continue to work. This only changes
the text labels and adds new keymaps for `y` and `n`.

* chore: replace ok and cancel with yes and no in confirmation window

* chore: allow to configure labels and keymaps for confirmation window

* chore: remove potential duplicate cancel keymaps

* chore: update README and oil.txt

* chore: nowait on confirm mappings and cleanup

* refactor: fully transition to yes/no

* move the config from under the `confirmation` key to the `preview`
  key, which is already in use for customizing the window
* fully default to yes/no, keeping the o/c keybindings for backwards
  compatibility
* make all of the `cancel` keybindings explicit (q, C-c, esc)
* more dynamically choose highlighting of the action labels

* refactor: just use yes/no and abandon configuration

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-05-06 12:03:30 -07:00
Oleg Kovalev
752563c59d
fix: icon column highlight parameter (#366)
* fix: icon column highlight

* fix: support icon highlight function

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-05-06 11:43:00 -07:00
ericguin
3abb6077d7
fix(ssh): config option to pass extra args to SCP (#340)
* Adding in SCP options configuration

This changeset adds in additional SCP options to the config. This allows
the user to specify a list of flags to send to the SCP command that will
be expanded into each shell command.

The primary driver for this is from newe boxes SSHing into pre 9 openSSH
boxes. New openSSH uses sftp server under the hood, rather than the
older SCP protocol. If you go into a system that does not have these
changes, SCP fails to work. The '-O' command line flag was introduced to
resolve this.

Using this change, the user can now pass in `extra_scp_options = {"-O"}`
to resolve the issue.

* Replacing table.unpack with global unpack

* lint: apply stylua

* refactor: change option name and shuffle config around

---------

Co-authored-by: Eric Guinn <eric_guinn@selinc.com>
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-05-06 10:42:23 -07:00
Steven Arcangeli
bcfc0a2e01 fix(ssh): garbled output when directory has broken symlinks
The stderr was interleaving with the stdout when performing one of the
ls operations. This was causing the parsing to sometimes fail and crash.
2024-05-01 16:10:10 -07:00
Matthew Wilding
f3a31eba24
fix(windows): navigating into drive letter root directories (#341)
* Fixed drive browsing on windows

* Fixed naming

* fix: Uppercase drive letter only

* updated: Filter out network drives on windows

* Update files.lua

* Update files.lua

* fixed: mapped drives

* addslash to check for double slash

* Fixed indents

* Reverted addslash change

* Fixed windows initial buffer name

* Reverted formatting

* Cleaned up callback

* Fix addslash to handle \ too

* Allow running tests workflow from fork

* Fix workflow

* Test

* Tests

* refactor: readability and comments

* fix: convert buffer name to posix when hijacking directory

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-04-23 22:06:59 -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
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