aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/nvim/dir.lua
Commit message (Collapse)AuthorAge
* feat(dir): open entries in splits with a, o mappings #41834Barrett Ruth2026-09-11
|
* build: replace LuaLS with EmmyLuaLewis Russell2026-09-07
| | | | | | | | | | | | | | | Problem: LuaLS struggles with the generics used in Nvim's runtime, requiring broad diagnostic suppressions. Indexing is also slow. Solution: Use EmmyLua for type checks in the build and CI. It offers more sophisticated type checking, substantially better support for generics, and much better flow analysis. Correct the affected annotations. Use `@internal`, supported directly by EmmyLua, instead of `@nodoc` for shared internal declarations, and support it in the help parser. AI-assisted
* feat(dir): user can sort/filter listings, DirReadPost event #41138Barrett Ruth2026-08-14
| | | | | | | | | | | | Problem: Directory listing entries cannot be customized (filtered, reordered). Listings are read by a BufReadCmd, which suppresses BufReadPost, so they are the only buffers with no post-read event to hook. Solution: Introduce a post-render User autocmd `DirReadPost`, marking the dir buffer writable for the duration and before the cursor is placed, so handlers can sort or filter it with ordinary commands. Document common recipes
* fix(dir): do not swallow errors raised after the list callbackerdivartanovich2026-08-04
| | | | | | | | Problem: An error raised after the list handler ran (e.g. while rendering) unwinds through the pcall around provider.list() and is routed back into the now no-op handler: silently discarded. Solution: Re-raise the error when the handler has already run.
* fix(dir): keep a listing buffer when the initial listing failserdivartanovich2026-08-04
| | | | | | | | | | | | Problem: A failed initial directory listing discards the listing state: the user is left in an empty modifiable non-listing buffer, and the BufEnter autocmd retries the failing open, repeating the error on every re-entry. Solution: Render the failure as an empty listing with state and handlers intact: the error is reported once and "R" or :edit retries the listing. Keep the error on the listing state so a failed listing is distinguishable from an empty one; the next list clears it.
* feat(dir): provider framework #40738Barrett Ruth2026-07-22
| | | | | | | | | Problem: The core behaviors of `nvim.dir` cannot be reused by consumers such as the archive plugin, ssh browser, etc. Solution: - Define a basic "provider" shape. - Extract the filesystem provider.
* fix(dir): custom 3P directory-browser #40725Barrett Ruth2026-07-16
| | | | | | | | | | Problem: Third-party directory browsers do not have a documented way to take over local directory buffers from nvim.dir. Solution: Document deleting the nvim.dir augroup and handling FileType directory as the after-startup handoff, and avoid installing the built-in buffer-local "-" mapping when "-" is already mapped.
* refactor(api): omit optional paramJustin M. Keyes2026-07-13
|
* fix(filetype): ensure directory bufname ends w/ slash sep #40552Barrett Ruth2026-07-10
| | | | | | | | | | | | Problem: `vim.filetype.match()` needs a cheap way to recognize directory buffers without doing filesystem stat work. Solution: Ensure full buffer names for directories end in a trailing slash. Now directory buffers can proceed through the normal 'filetype' path. Note side-effects: session and ShaDa buffer-list restore behavior must be compatible, so those + corresponding tests must be updated.
* fix(dir): select origin on parent navigation #40658Barrett Ruth2026-07-09
|
* fix(dir): preserve alternate buffer #40659Barrett Ruth2026-07-09
|
* refactor(dir): use vim.fs.dir()Justin M. Keyes2026-07-01
|
* fix(dir): reload listing on :edit #40496Barrett Ruth2026-06-30
|
* fix(dir): remove loaded plugin guard #40489Barrett Ruth2026-06-30
|
* fix(dir): respect directory buffer lifetime #40453Barrett Ruth2026-06-27
| | | | | | | | | | Problem: dir.lua leaves previously-navigated directory buffers around. This is fine by default, but users need a simple way to opt out. Solution: 1. Respect `set hidden` (via `'bufhidden'`) as one way to make previously-navigated dir buffers from showing up. 2. Document a one-liner to hide these buffers
* feat(runtime): replace netrw with a very small script #39723Barrett Ruth2026-06-25
Problem: `:edit <dir>` and `nvim <dir>` currently rely on netrw to show local directory contents. Solution: - Provide `filetype=directory`. - Introduce dir.lua, a small plugin that provides directory listing, opening items, parent navigation, and refresh. - `netrw` remains available for `:Explore`, remote paths, archives, and file operations. To continue Co-authored-by: Justin M. Keyes <justinkz@gmail.com>