This abstraction is overly generic for what it does. It's only ever used
to help us conditionally perform a fs_stat for the local files adapter.
We can replace that with a much dumber, much simpler bit of logic.
* feat: hidden highlights
* feat: OilHidden for hidden highlights instead of Comment
* fix: add the new combinatoric highlight groups
* perf: get rid of a call to is_hidden_file
* fix: tweak the default highlight group links
* fix: update function call in unit tests
---------
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>
* Initial implementation of scratch based preview
* Fix call to buf is valid in loop
* Fixing call to be made only from the main event loop
* Improve handling of large files from @pkazmier
* Better error handling and simplifying the code
* Default to old behavior
* Add documentation
* Fix readfile
* Fix the configuration
* refactor: single config enum and load real buffer on BufEnter
* doc: regenerate documentation
---------
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
* replace cwd path in actual path
* move get_title to utils
* add documentation
* rename
* add method doc
* add comment
* fallback to 0 for winid
* add missing property definition for relative_win_title
* only replace when at the start of the path
* simplify
* minor change
* add entry point to customize floating window title for oil-buffer
* remove config parameter
* cleanup
* add documentation
* move get_win_title to top and pass winid as parameter
* add get_win_title to type definition for oil.setup
* remove empty line
* adjust comment
---------
Co-authored-by: Philipp Oeschger <philippoeschger@Philipps-Air.fritz.box>
Allows to switch character case with ~ (tilde) in visual mode while
preserving existing ~ :tcd functionality.
Related to [1].
[1]: https://github.com/stevearc/oil.nvim/issues/397 "bug: ~ not respected"
* Added check for filetype before setting win_options in initialize
* refactor: use nvim_buf_call to set window options
---------
Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
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>
This allows for using get_current_dir in cases where currently hovered
buffer is not the desired Oil buffer (e.g. displaying directories for
multiple different Oil buffers)
This leaves the `pcall` just so (1) we load the plugin if it is lazy
loaded by the user and (2) we get LSP completion/validation with that
type as well.