98e5968

Branches > main > 98e5968 > files / nvim / pack / plugins / opt

Add nvim

Grahp, 2026-01-30

Commit: 98e5968a0ddd1f6f40967b43596ce1e6991ef1ed
Parent: 0112da8

85 changed files:

.gitignore modified (view file)

@@ -1,2 +1,2 @@-*+/* !nvim/

nvim/init.lua added (view file)

@@ -0,0 +1,35 @@+vim.loader.enable()++require("colors")+require("ui")+require("center")++require("opts")+vim.schedule(function() require("keybindings") end)+++--- Still to do:+--- REPL (Conjure)+--- Parens (Parinfer)+--- Undotree+--- LSP+--- Formatting (better formatting anyway :p)+--- Surround?++--- Also:+--- Looking at java stuff (where does that come from and how could I improve it?)+--- Fuzzy finder (full screen like oil):+--- Fuzzy find file names+--- Fuzzy find inside files+--- Fuzzy find code actions++--- Paren Editing:+--- Could use s for bindings!++--- Bindings I'd want:+--- drag elements (or map pairs)+--- drag forms+--- Text object around form+--- Text object inner form+--- (insert?) before form+--- (insert?) after form

nvim/lua/center.lua added (view file)

@@ -0,0 +1,65 @@+--- Keeps the current line centered on the screen always,+---  including when at the top of a buffer.+--- It does this by adding a bunch of fake virtual lines above the first line of the buf,+---  and scrolling the screen to the correct place+local api = vim.api+local ac = vim.api.nvim_create_autocmd+local ag = vim.api.nvim_create_augroup+local fn = vim.fn++local ns = api.nvim_create_namespace("dev.grahp.nvim.padding_lines")++local function set_padding_lines(lines)+   api.nvim_buf_clear_namespace(0, ns, 0, -1)+   api.nvim_buf_set_extmark(0, ns, 0, 0, {+      virt_lines = lines,+      virt_lines_above = true+   })+end++--- Needed for first paint otherwise it'd be in utils :p+local function replicate(n, x)+   local tbl = {}+   if n > 0 then+      for i = 1, n do+         table.insert(tbl, x)+      end+   end+   return tbl+end++--- Centers the cursor on the screen+--- Normally, the screen cannot go above the first line of the buffer,+---  so this adds enough virtual lines above the top of the buffer to allow you to scroll past the top of the buffer+--- Centers the screen, and then feeds enough <C-y>s to scroll the cursor to the very center of the screen+--- If you're completely past the top of the buffer, just `zz` works and it won't scroll anything.+local function center()+   local win_height = api.nvim_win_get_height(0)+   local padding_lines = math.ceil(win_height / 2)++   local blank_line = {{""}}++   set_padding_lines(replicate(win_height, blank_line))++   local _, lnum, col, off, curswant = unpack(fn.getcurpos())+   --- TODO explain this schedule+   vim.schedule(function()+      vim.cmd("norm! zz")++      local line_number = fn.line(".")+      local offset = padding_lines - line_number + 1+      if offset > 0 then+        vim.cmd("norm! " .. offset .. "")+      end++      -- Reset cursor back to the column it was at before+      fn.cursor({vim.fn.getcurpos()[2], col, off, curswant})+   end)+end++--- When moving the cursor, entering a buffer, etc., center the screen+ag("TopPad", {clear = true})+ac({ "BufWinEnter", "BufEnter", "WinResized", "WinScrolled", "CursorMoved", "CursorMovedI"}, {+  group = "TopPad",+  callback = center,+})

nvim/lua/colors.lua added (view file)

@@ -0,0 +1,138 @@+--- Grahp's colorscheme+--- Colors from https://github.com/bluz71/vim-moonfly-colors :).++local hl = vim.api.nvim_set_hl+--- Colorscheme++--- Comments: Yellow+--- Punctuation: Gray+--- Globals: Blue+--- Strings: Green+--- Numbers: Orange+--- Identifiers: Pink+--- Booleans: Red+--- Also special: Red?++local red    = "#ff5d5d"+local orange = "#de935f"+--- Less tanny more greeny I think?+local yellow = "#c6c684"+local blue   = "#74b2ff"+--- Slightly darker+local green  = "#36c692"+local pink   = "#cf87e8"++local black  = "#000000"+local gray   = "#4e4e4e"+local white  = "#ffffff"++local bg = black+local highlight_bg = "#323437"++hl(0, "Red",    {fg = red,    bg = bg})+hl(0, "Orange", {fg = orange, bg = bg})+hl(0, "Blue",   {fg = blue,   bg = bg})+hl(0, "Green",  {fg = green,  bg = bg})+hl(0, "Pink",   {fg = pink,   bg = bg})+hl(0, "Yellow", {fg = yellow, bg = bg})++hl(0, "White",  {fg = white,  bg = bg})+hl(0, "Gray",   {fg = gray,   bg = bg})++hl(0, "Punctuation", {link = "Gray"})+hl(0, "Delimiter", {link = "Punctuation"})++hl(0, "Comment", {link = "Yellow"})+hl(0, "String", {link = "Green"})+hl(0, "Boolean", {link = "Red"})+hl(0, "Function", {link = "Blue"})+hl(0, "Number", {link = "Orange"})+++hl(0, "Special", {link = "White"})++hl(0, "Statement", {link = "Pink"})+hl(0, "Identifier", {link = "Pink"})+hl(0, "Type", {link = "Green"})++--- Vim stuff++-- Background color+hl(0, "Normal", {bg = bg})+hl(0, "NormalFloat", {link = "Normal"})++hl(0, "Search", {bg = highlight_bg})+hl(0, "CurSearch", {link = "Search"})+hl(0, "IncSearch", {link = "Search"})++hl(0, "StatusLine", {bg = highlight_bg, fg = white})+hl(0, "StatusLineNC", {link = "StatusLine"})+hl(0, "StatusLineTerm", {link = "StatusLine"})+hl(0, "StatusLineTermNC", {link = "StatusLine"})+hl(0, "TabLine", {link = "StatusLine"})+hl(0, "TabLineSel", {bg = gray, fg = white})+hl(0, "TabLineSelSymbol", {link = "TablineSel"})+hl(0, "TabLineFill", {link = "DarkGray"})++hl(0, "Visual", {bg = highlight_bg})+hl(0, "MatchParen", {link = "Visual"})++hl(0, "Error", {link = "Red"})+hl(0, "ErrorMsg", {link = "Red"})+hl(0, "WarningMsg", {link = "Yellow"})++hl(0, "VertSplit", {fg = gray, bg = gray})+hl(0, "VisualNOS", {link = "Visual"})+hl(0, "VisualNonText", {bg = gray, fg = gray})+hl(0, "Pmenu", {link = "White"})+hl(0, "PmenuSel", {link = "Visual"})+hl(0, "PmenuSbar", {link = "Gray"})+hl(0, "PmenuThumb", {link = "Gray"})+hl(0, "WildMenu", {link = "White"})+hl(0, "SpellBad", {bg = "NONE", undercurl = true, sp = red})+hl(0, "SpellCap", {bg = "NONE", undercurl = true, sp = yellow})+hl(0, "SpellRare", {bg = "NONE", undercurl = true, sp = green})+hl(0, "SpellLocal", {bg = "NONE", undercurl = true, sp = blue})+hl(0, "Question", {link = "Lime"})+hl(0, "MoreMsg", {link = "Red"})+hl(0, "Cursor", {fg = bg, bg = gray})+hl(0, "lCursor", {link = "Cursor"})

Show all 139 lines

nvim/lua/format.lua added (view file)

@@ -0,0 +1,12 @@+local ac = vim.api.nvim_create_autocmd+local ag = vim.api.nvim_create_augroup++local function format(cmd)+  vim.schedule(function() vim.cmd("silent !" .. cmd .. " %") end)+end++local format_group = ag("Format", {clear = true})+ac("BufWritePost",+   {callback = function() format("cljfmt fix") end,+    group = format_group,+    pattern = "*.clj"})

nvim/lua/jump.lua added (view file)

@@ -0,0 +1,229 @@+local ns = vim.api.nvim_create_namespace("dev.grahp.nvim.jump")+local utils = require("utils")++--- Name meanings:+--- Jump target: Somewhere you can jump to - Union of Match and table of optional Disambiguator+--- Disambiguator: A third character used to differentiate jump targets when there are multiple+--- Match: Union Pos and a table of Char+--- Row: The number of lines into the buffer line is? (0-based?) TODO rename?+--- Col: The number of characters into the line? (1-based?)+--- Pos: table of row, col+--- Char: A character used for jumping, entered by the user+--- Label: A hint painted to the screen to show where jump targets are, and what disambiguator you might need to press++--- ALL CAPS++--- Blocks and reads one char of user input.+--- Returns the char or nil+local function read_char()+  local char = vim.fn.getcharstr()+  if char == "" then+    return nil+  else+    return char+  end+end++local function smart_case_find_index(s, pattern, pos)+  if not pattern:match("%u") then+    s = s:lower()+  end++  local match_start, match_end = string.find(s, pattern, pos, true)+  if match_start and match_end then+    return match_end+  end+end++local function string_get(s, i)+  return s:sub(i, i)+end+++local function lines()+  local bufnr = vim.api.nvim_get_current_buf()+  return vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)+end++--- Returns all matches on the screen that start with "char".+local function find_matches(char)+  local lines = lines()++  local out = {}++  local start_line = vim.fn.line("w0")+  local end_line   = vim.fn.line("w$")++  for row, line in ipairs(lines) do+    -- I miss filter lol+    if row >= start_line and row <= end_line then+      local i = 1++      while true do+        local pos = smart_case_find_index(line, char, i)+        if not pos then+          break+        end++        local char = string_get(line, pos + 1)+        if char then+          table.insert(out, {row = row,+          col = pos,+          char = char})+        end++        i = pos + 1+      end+    end+  end++  return out+end++--- Returns a table of chars to the number of times those chars appear in the entire table of matches+--- All matches will map to at least 1 and will not be nil.+local function char_counts(matches)+  local counts = {}+  for _, m in ipairs(matches) do+    local char = m.char:lower()+    counts[char] = (counts[char] or 0) + 1+  end+  return counts+end++--- Takes a table of matches and adds a unique disambiguator to each match+--- If a match's char is unique across the entire matches table,+---  the match will have no diambiguator, otherwise it will be picked from 'disambiguators' (a table of disambiguators)+--- May return fewer matches than provided if all disambiguators are exhausted+local function assign_disambiguators(matches, disambiguators)+  local next_disambiguator = utils.seq_iterator(disambiguators)

Show all 230 lines

nvim/lua/keybindings.lua added (view file)

@@ -0,0 +1,85 @@+local keymap = vim.keymap.set++keymap("n", "<C-h>", "<C-w><C-h>")+keymap("n", "<C-l>", "<C-w><C-l>")+keymap("n", "<C-j>", "<C-w><C-j>")+keymap("n", "<C-k>", "<C-w><C-k>")++keymap("n", "U", "<C-r>")++keymap({"n", "v"}, "<C-left>", "b")+keymap({"n", "v"}, "<C-right>", "w")++keymap({"n", "v", "o"}, "H", "_")+keymap({"n", "v", "o"}, "L", "$")++keymap({"n", "v"}, "<Space>y", "\"+y")+keymap({"n", "v"}, "<Space>p", "\"+p")+keymap({"n", "v"}, "<Space>P", "\"+P")+keymap({"n", "v"}, "<Space>d", "\"+d")++keymap({"n", "v", "o"}, "J", "<C-d>")+keymap({"n", "v", "o"}, "K", "<C-u>")++keymap({"n", "v"}, "<C-d>", "<Nop>")+keymap({"n", "v"}, "<C-u>", "<Nop>")++keymap({"n", "v"}, "j", "gj")+keymap({"n", "v"}, "k", "gk")++keymap({"n", "v"}, "<Space>j", "J")++keymap("n", "<Esc>", "<CMD>noh<CR>")++keymap("n", "<Space>u", function()+  vim.cmd("packadd oil.nvim")+  require("oil").setup({skip_confirm_for_simple_edits = true,+                        default_file_explorer = true,+                        watch_for_changes = true,+                        view_options = {show_hidden = true}})+  vim.cmd("Oil")+  keymap("n", "<Space>u", "<cmd>Oil<cr>")+end)++keymap("n", ";", function() require("jump").jump() end)++--- Either nil, "f/t", or "space"+local last_n_type = nil++vim.api.nvim_create_autocmd("CmdlineLeave", {+  callback = function()+    local t = vim.fn.getcmdtype()+    if t == "/" or t == "?" then+      last_n_type = "search"+    end+  end})++for _, key in ipairs({"f", "F", "t", "T"}) do+  vim.keymap.set({"n", "x", "o"}, key, function()+    last_n_type = "f/t"+    return key+  end, {expr = true, noremap = true})+end+++local function smart_n(reverse)+  if last_n_type == nil then+    return ""+  elseif last_n_type == "f/t" then+    local cs = vim.fn.getcharsearch()+    if reverse then+      return cs.forward == 1 and "," or ";"+    else+      return cs.forward == 1 and ";" or ","+    end+  elseif last_n_type == "search" then+    if reverse then+      return vim.v.searchforward == 1 and "N" or "n"+    else+      return vim.v.searchforward == 1 and "n" or "N"+    end+  end+end++vim.keymap.set({"n", "v", "o"}, "n", function() return smart_n(false) end, {expr = true, noremap = true})+vim.keymap.set({"n", "v", "o"}, "N", function() return smart_n(true) end, {expr = true, noremap = true})

nvim/lua/opts.lua added (view file)

@@ -0,0 +1,28 @@+local o = vim.opt+local g = vim.g+local ac = vim.api.nvim_create_autocmd+local ag = vim.api.nvim_create_augroup++g.loaded_netrw = 1+g.loaded_netrwPlugin = 1++o.shiftwidth = 2+o.tabstop = 2+o.softtabstop = 2+o.expandtab = true++o.swapfile = false+o.backup = false+o.undofile = true++--- Prevents o/<CR> on comments from starting a new comment+ac("Filetype", {pattern = "*", callback = function()+  o.formatoptions = ""+end})++--- Completion+o.completeopt = {"menu", "menuone", "fuzzy"}++--- Loads shada after initialization :p+o.shada = ""+vim.schedule(function() vim.cmd("rshada") end)

nvim/lua/ui.lua added (view file)

@@ -0,0 +1,25 @@+o = vim.opt++--- Disables the welcome screen :p+o.shortmess:append("I")++--- Turns the command line into 0 ch tall and only shows on ':'+o.laststatus = 0+o.cmdheight = 0+o.showcmd = false++o.signcolumn = "no"+o.ruler = false+--- Search+o.hlsearch = false+o.incsearch = true+o.ignorecase = true+o.smartcase = true++o.list = true+o.listchars = {tab = "» ", nbsp = "␣"}++o.wrap = false+o.inccommand = "split"++o.fillchars = {eob = " "}

nvim/lua/utils.lua added (view file)

@@ -0,0 +1,9 @@+local function seq_iterator(t)+  local i = 0+  return function()+    i = i + 1+    return t[i]+  end+end++return {seq_iterator = seq_iterator}

nvim/pack/plugins/opt/oil.nvim/.envrc added (view file)

@@ -0,0 +1,3 @@+export VIRTUAL_ENV=venv+layout python+python -c 'import pyparsing' 2>/dev/null || pip install -r scripts/requirements.txt

nvim/pack/plugins/opt/oil.nvim/.luacheckrc added (view file)

@@ -0,0 +1,19 @@+max_comment_line_length = false+codes = true++exclude_files = {+  "tests/treesitter",+}++ignore = {+  "212", -- Unused argument+  "631", -- Line is too long+  "122", -- Setting a readonly global+  "542", -- Empty if branch+}++read_globals = {+  "vim",+  "a",+  "assert",+}

nvim/pack/plugins/opt/oil.nvim/.luarc.json added (view file)

@@ -0,0 +1,9 @@+{+  "runtime": {+    "version": "LuaJIT",+    "pathStrict": true+  },+  "type": {+    "checkTableShape": true+  }+}

nvim/pack/plugins/opt/oil.nvim/.stylua.toml added (view file)

@@ -0,0 +1,5 @@+column_width = 100+indent_type = "Spaces"+indent_width = 2+[sort_requires]+enabled = true

nvim/pack/plugins/opt/oil.nvim/CHANGELOG.md added (view file)

@@ -0,0 +1,530 @@+# Changelog++## [2.15.0](https://github.com/stevearc/oil.nvim/compare/v2.14.0...v2.15.0) (2025-02-13)+++### Features++* add support for bufnr in column rendering functions ([#575](https://github.com/stevearc/oil.nvim/issues/575)) ([8abc58b](https://github.com/stevearc/oil.nvim/commit/8abc58b038f84078121ab1cac6ecad0163fe1635))+* API to automatically open preview window after opening oil ([#339](https://github.com/stevearc/oil.nvim/issues/339)) ([57528bf](https://github.com/stevearc/oil.nvim/commit/57528bf9c58080ca891e8d362d0a578895c136ce))+* can selectively add entries to quickfix ([#564](https://github.com/stevearc/oil.nvim/issues/564)) ([b594b9a](https://github.com/stevearc/oil.nvim/commit/b594b9a9052618669ccf6520b2d0c0d942eb8118))+* floating window max width/height can be percentages ([#553](https://github.com/stevearc/oil.nvim/issues/553)) ([1df90fa](https://github.com/stevearc/oil.nvim/commit/1df90faf927e78f5aacf278abd0bfdcb5f45e825))+* most moves and copies will copy the undofile ([#583](https://github.com/stevearc/oil.nvim/issues/583)) ([32dd3e3](https://github.com/stevearc/oil.nvim/commit/32dd3e378d47673679e76a773451f82f971a66df))+* pass oil bufnr to custom filename highlight function ([#552](https://github.com/stevearc/oil.nvim/issues/552)) ([f5c563a](https://github.com/stevearc/oil.nvim/commit/f5c563a074a38cee5a09f98e98b74dcd2c322490))+++### Bug Fixes++* crash in preview on nvim 0.8 ([81b2c5f](https://github.com/stevearc/oil.nvim/commit/81b2c5f04ae24a8c83b20ecbd017fecac15faca0))+* directory rendering with custom highlights ([#551](https://github.com/stevearc/oil.nvim/issues/551)) ([a6a4f48](https://github.com/stevearc/oil.nvim/commit/a6a4f48b14b4a51fded531c86f6c04b4503a2ef8))+* disable_preview respected when preview_method != "load" ([#577](https://github.com/stevearc/oil.nvim/issues/577)) ([7cde5aa](https://github.com/stevearc/oil.nvim/commit/7cde5aab10f564408e9ac349d457d755422d58cd))+* error when non-current oil buffer has validation errors ([#561](https://github.com/stevearc/oil.nvim/issues/561)) ([8d11a2a](https://github.com/stevearc/oil.nvim/commit/8d11a2abf3039b1974d4acd65fbc83ada2ca1084))+* gracefully handle fs_stat failures ([#558](https://github.com/stevearc/oil.nvim/issues/558)) ([7c26a59](https://github.com/stevearc/oil.nvim/commit/7c26a59ac0061b199bf9f44b19d45cfadd9b14f5))+* guard against nil metadata values ([#548](https://github.com/stevearc/oil.nvim/issues/548)) ([254bc66](https://github.com/stevearc/oil.nvim/commit/254bc6635cb3f77e6e9a89155652f368e5535160))+* more consistent cursor position when entering a new directory ([#536](https://github.com/stevearc/oil.nvim/issues/536)) ([c80fa5c](https://github.com/stevearc/oil.nvim/commit/c80fa5c415b882c1c694a32748cea09b7dafc2c5))+* more robust parsing of custom column timestamp formats ([#582](https://github.com/stevearc/oil.nvim/issues/582)) ([5313690](https://github.com/stevearc/oil.nvim/commit/5313690956d27cc6b53d5a2583df05e717c59b16))+* open files in correct window from floating oil ([#560](https://github.com/stevearc/oil.nvim/issues/560)) ([83ac518](https://github.com/stevearc/oil.nvim/commit/83ac5185f79ab8d869bccea792dc516ad02ad06e))+* preview sometimes causes oil buffers to be stuck in unloaded state ([#563](https://github.com/stevearc/oil.nvim/issues/563)) ([1488f0d](https://github.com/stevearc/oil.nvim/commit/1488f0d96b1cb820dd12f05a7bf5283a631a7c4d))+* stat files if fs_readdir doesn't provide a type ([#543](https://github.com/stevearc/oil.nvim/issues/543)) ([c6a39a6](https://github.com/stevearc/oil.nvim/commit/c6a39a69b2df7c10466f150dde0bd23e49c1fba3))+* support permissions checks on windows and virtual filesystems ([#555](https://github.com/stevearc/oil.nvim/issues/555)) ([7041528](https://github.com/stevearc/oil.nvim/commit/7041528bdedb350ad66e650684deec8456e053cc))+* work around incorrect link detection on windows ([#557](https://github.com/stevearc/oil.nvim/issues/557)) ([09fa1d2](https://github.com/stevearc/oil.nvim/commit/09fa1d22f5edf0730824d2b222d726c8c81bbdc9))++## [2.14.0](https://github.com/stevearc/oil.nvim/compare/v2.13.0...v2.14.0) (2024-12-21)+++### Features++* add `win_options` to `preview_win` ([#514](https://github.com/stevearc/oil.nvim/issues/514)) ([bbeed86](https://github.com/stevearc/oil.nvim/commit/bbeed86bde134da8d09bed64b6aa0d65642e6b23))+* add highlight group for orphaned links ([#502](https://github.com/stevearc/oil.nvim/issues/502)) ([740b8fd](https://github.com/stevearc/oil.nvim/commit/740b8fd425a2b77f7f40eb5ac155ebe66ff9515c))+* better merging of action desc when overriding keymaps ([f2b3249](https://github.com/stevearc/oil.nvim/commit/f2b324933f4d505cff6f7d445fd61fad02dcd9ae))+* config option to customize filename highlight group ([#508](https://github.com/stevearc/oil.nvim/issues/508)) ([99ce32f](https://github.com/stevearc/oil.nvim/commit/99ce32f4a2ecf76263b72fcc31efb163faa1a941))+* config option to disable previewing a file ([3fa3161](https://github.com/stevearc/oil.nvim/commit/3fa3161aa9515ff6a7cf7e44458b6a2114262870))+* disable preview for large files ([#511](https://github.com/stevearc/oil.nvim/issues/511)) ([c23fe08](https://github.com/stevearc/oil.nvim/commit/c23fe08e0546d9efc242e19f0d829efa7e7b2743))+* highlight groups for hidden files ([#459](https://github.com/stevearc/oil.nvim/issues/459)) ([60e6896](https://github.com/stevearc/oil.nvim/commit/60e68967e51ff1ecd264c29e3de0d52bfff22df3))+* option to quite vim if oil is closed as last buffer ([#491](https://github.com/stevearc/oil.nvim/issues/491)) ([81cc9c3](https://github.com/stevearc/oil.nvim/commit/81cc9c3f62ddbef3687931d119e505643496fa0a))+* use scratch buffer for file previews ([#467](https://github.com/stevearc/oil.nvim/issues/467)) ([21705a1](https://github.com/stevearc/oil.nvim/commit/21705a1debe6d85a53c138ab944484b685432b2b))+++### Bug Fixes++* cursor sometimes does not hover previous file ([8ea40b5](https://github.com/stevearc/oil.nvim/commit/8ea40b5506115b6d355e304dd9ee5089f7d78601))+* don't take over the preview window until it's opened for oil ([#532](https://github.com/stevearc/oil.nvim/issues/532)) ([78ab7ca](https://github.com/stevearc/oil.nvim/commit/78ab7ca1073731ebdf82efa474202defa028d5a4))+* handle files with newlines in the name ([#534](https://github.com/stevearc/oil.nvim/issues/534)) ([dba0375](https://github.com/stevearc/oil.nvim/commit/dba037598843973b8c54bc5ce0318db4a0da439d))+* image.nvim previews with preview_method=scratch ([5acab3d](https://github.com/stevearc/oil.nvim/commit/5acab3d8a9bc85a571688db432f2702dd7d901a4))+* improper file name escaping ([#530](https://github.com/stevearc/oil.nvim/issues/530)) ([7a55ede](https://github.com/stevearc/oil.nvim/commit/7a55ede5e745e31ea8e4cb5483221524922294bf))+* set alternate when using floating windows ([#526](https://github.com/stevearc/oil.nvim/issues/526)) ([c5f7c56](https://github.com/stevearc/oil.nvim/commit/c5f7c56644425e2b77e71904da98cda0331b3342))+* work around performance issue with treesitter, folds, and large directories ([da93d55](https://github.com/stevearc/oil.nvim/commit/da93d55e32d73a17c447067d168d80290ae96590))+++### Performance Improvements++* change default view_options.natural_order behavior to disable on large directories ([01b0b9d](https://github.com/stevearc/oil.nvim/commit/01b0b9d8ef79b7b631e92f6b5fed1c639262d570))+* only sort entries after we have them all ([792f0db](https://github.com/stevearc/oil.nvim/commit/792f0db6ba8b626b14bc127e1ce7247185b3be91))+* optimize rendering cadence ([c96f93d](https://github.com/stevearc/oil.nvim/commit/c96f93d894cc97e76b0871bec4058530eee8ece4))+* replace vim.endswith and vim.startswith with string.match ([4de3025](https://github.com/stevearc/oil.nvim/commit/4de30256c32cd272482bc6df0c6de78ffc389153))++## [2.13.0](https://github.com/stevearc/oil.nvim/compare/v2.12.2...v2.13.0) (2024-11-11)+++### Features++* config option to customize floating window title ([#482](https://github.com/stevearc/oil.nvim/issues/482)) ([5d2dfae](https://github.com/stevearc/oil.nvim/commit/5d2dfae655b9b689bd4017b3bdccd52cbee5b92f))+* config option to disable lsp file methods ([#477](https://github.com/stevearc/oil.nvim/issues/477)) ([f60bb7f](https://github.com/stevearc/oil.nvim/commit/f60bb7f793477d99ef1acf39e920bf2ca4e644de))+++### Bug Fixes++* actions.preview accepts options ([#497](https://github.com/stevearc/oil.nvim/issues/497)) ([cca1631](https://github.com/stevearc/oil.nvim/commit/cca1631d5ea450c09ba72f3951a9e28105a3632c))+* add trailing slash to directories on yank_entry ([#504](https://github.com/stevearc/oil.nvim/issues/504)) ([42333bb](https://github.com/stevearc/oil.nvim/commit/42333bb46e34dd47e13927010b1dcd30e6e4ca96))+* don't deep merge keymaps ([#510](https://github.com/stevearc/oil.nvim/issues/510)) ([709403c](https://github.com/stevearc/oil.nvim/commit/709403ccd6f22d859c2e42c780ab558ae89284d9))+* guard against nil keymaps ([621f8ba](https://github.com/stevearc/oil.nvim/commit/621f8ba4fa821724e9b646732a26fb2e795fe008))+* only map ~ for normal mode ([#484](https://github.com/stevearc/oil.nvim/issues/484)) ([ccab9d5](https://github.com/stevearc/oil.nvim/commit/ccab9d5e09e2d0042fbbe5b6bd05e82426247067))+* sort keymap help entries by description ([#506](https://github.com/stevearc/oil.nvim/issues/506)) ([52cc8a1](https://github.com/stevearc/oil.nvim/commit/52cc8a1fb35ea6ce1df536143add7ce7215c63c0)), closes [#376](https://github.com/stevearc/oil.nvim/issues/376)++## [2.12.2](https://github.com/stevearc/oil.nvim/compare/v2.12.1...v2.12.2) (2024-09-10)+++### Bug Fixes++* ensure win_options are being set on correct window ([#469](https://github.com/stevearc/oil.nvim/issues/469)) ([30e0438](https://github.com/stevearc/oil.nvim/commit/30e0438ff08f197d7ce4a417445ab97ee72efe2d))+* wrap git rm callback in schedule_wrap ([#475](https://github.com/stevearc/oil.nvim/issues/475)) ([b053744](https://github.com/stevearc/oil.nvim/commit/b05374428e5136d9b6c8e1e8e62a75f82283b1f8))+++### Performance Improvements+

Show all 531 lines

nvim/pack/plugins/opt/oil.nvim/LICENSE added (view file)

@@ -0,0 +1,21 @@+MIT License++Copyright (c) 2022 Steven Arcangeli++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.

nvim/pack/plugins/opt/oil.nvim/Makefile added (view file)

@@ -0,0 +1,66 @@+## help: print this help message+.PHONY: help+help:+	@echo 'Usage:'+	@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' |  sed -e 's/^/ /'++## all: generate docs, lint, and run tests+.PHONY: all+all: doc lint test++venv:+	python3 -m venv venv+	venv/bin/pip install -r scripts/requirements.txt++## doc: generate documentation+.PHONY: doc+doc: scripts/nvim_doc_tools venv+	venv/bin/python scripts/main.py generate+	venv/bin/python scripts/main.py lint++## test: run tests+.PHONY: test+test:+	./run_tests.sh++## lint: run linters and LuaLS typechecking+.PHONY: lint+lint: scripts/nvim-typecheck-action fastlint+	./scripts/nvim-typecheck-action/typecheck.sh --workdir scripts/nvim-typecheck-action lua++## fastlint: run only fast linters+.PHONY: fastlint+fastlint: scripts/nvim_doc_tools venv+	venv/bin/python scripts/main.py lint+	luacheck lua tests --formatter plain+	stylua --check lua tests++## profile: use LuaJIT profiler to profile the plugin+.PHONY: profile+profile: scripts/benchmark.nvim+	nvim --clean -u perf/bootstrap.lua -c 'lua jit_profile()'++## flame_profile: create a trace in the chrome profiler format+.PHONY: flame_profile+flame_profile: scripts/benchmark.nvim+	nvim --clean -u perf/bootstrap.lua -c 'lua flame_profile()'++## benchmark: benchmark performance opening directory with many files+.PHONY: benchmark+benchmark: scripts/benchmark.nvim+	nvim --clean -u perf/bootstrap.lua -c 'lua benchmark()'+	@cat perf/tmp/benchmark.txt++scripts/nvim_doc_tools:+	git clone https://github.com/stevearc/nvim_doc_tools scripts/nvim_doc_tools++scripts/nvim-typecheck-action:+	git clone https://github.com/stevearc/nvim-typecheck-action scripts/nvim-typecheck-action++scripts/benchmark.nvim:+	git clone https://github.com/stevearc/benchmark.nvim scripts/benchmark.nvim++## clean: reset the repository to a clean state+.PHONY: clean+clean:+	rm -rf scripts/nvim_doc_tools scripts/nvim-typecheck-action venv .testenv perf/tmp profile.json

nvim/pack/plugins/opt/oil.nvim/README.md added (view file)

@@ -0,0 +1,448 @@+# oil.nvim++A [vim-vinegar](https://github.com/tpope/vim-vinegar) like file explorer that lets you edit your filesystem like a normal Neovim buffer.++https://user-images.githubusercontent.com/506791/209727111-6b4a11f4-634a-4efa-9461-80e9717cea94.mp4++<!-- TOC -->++- [Requirements](#requirements)+- [Installation](#installation)+- [Quick start](#quick-start)+- [Options](#options)+- [Adapters](#adapters)+- [Recipes](#recipes)+- [Third-party extensions](#third-party-extensions)+- [API](#api)+- [FAQ](#faq)++<!-- /TOC -->++## Requirements++- Neovim 0.8++- Icon provider plugin (optional)+  - [mini.icons](https://github.com/nvim-mini/mini.nvim/blob/main/readmes/mini-icons.md) for file and folder icons+  - [nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons) for file icons++## Installation++oil.nvim supports all the usual plugin managers++<details>+  <summary>lazy.nvim</summary>++```lua+{+  'stevearc/oil.nvim',+  ---@module 'oil'+  ---@type oil.SetupOpts+  opts = {},+  -- Optional dependencies+  dependencies = { { "nvim-mini/mini.icons", opts = {} } },+  -- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons+  -- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.+  lazy = false,+}+```++</details>++<details>+  <summary>Packer</summary>++```lua+require("packer").startup(function()+  use({+    "stevearc/oil.nvim",+    config = function()+      require("oil").setup()+    end,+  })+end)+```++</details>++<details>+  <summary>Paq</summary>++```lua+require("paq")({+  { "stevearc/oil.nvim" },+})+```++</details>++<details>+  <summary>vim-plug</summary>++```vim+Plug 'stevearc/oil.nvim'+```++</details>++<details>+  <summary>dein</summary>++```vim+call dein#add('stevearc/oil.nvim')+```++</details>++<details>+  <summary>Pathogen</summary>++```sh

Show all 449 lines

nvim/pack/plugins/opt/oil.nvim/doc/api.md added (view file)

@@ -0,0 +1,205 @@+# API++<!-- TOC -->++- [get_entry_on_line(bufnr, lnum)](#get_entry_on_linebufnr-lnum)+- [get_cursor_entry()](#get_cursor_entry)+- [discard_all_changes()](#discard_all_changes)+- [set_columns(cols)](#set_columnscols)+- [set_sort(sort)](#set_sortsort)+- [set_is_hidden_file(is_hidden_file)](#set_is_hidden_fileis_hidden_file)+- [toggle_hidden()](#toggle_hidden)+- [get_current_dir(bufnr)](#get_current_dirbufnr)+- [open_float(dir, opts, cb)](#open_floatdir-opts-cb)+- [toggle_float(dir, opts, cb)](#toggle_floatdir-opts-cb)+- [open(dir, opts, cb)](#opendir-opts-cb)+- [close(opts)](#closeopts)+- [open_preview(opts, callback)](#open_previewopts-callback)+- [select(opts, callback)](#selectopts-callback)+- [save(opts, cb)](#saveopts-cb)+- [setup(opts)](#setupopts)++<!-- /TOC -->++<!-- API -->++## get_entry_on_line(bufnr, lnum)++`get_entry_on_line(bufnr, lnum): nil|oil.Entry` \+Get the entry on a specific line (1-indexed)++| Param | Type      | Desc |+| ----- | --------- | ---- |+| bufnr | `integer` |      |+| lnum  | `integer` |      |++## get_cursor_entry()++`get_cursor_entry(): nil|oil.Entry` \+Get the entry currently under the cursor+++## discard_all_changes()++`discard_all_changes()` \+Discard all changes made to oil buffers+++## set_columns(cols)++`set_columns(cols)` \+Change the display columns for oil++| Param | Type               | Desc |+| ----- | ------------------ | ---- |+| cols  | `oil.ColumnSpec[]` |      |++## set_sort(sort)++`set_sort(sort)` \+Change the sort order for oil++| Param | Type             | Desc                                                                                  |+| ----- | ---------------- | ------------------------------------------------------------------------------------- |+| sort  | `oil.SortSpec[]` | List of columns plus direction. See :help oil-columns to see which ones are sortable. |++**Examples:**+```lua+require("oil").set_sort({ { "type", "asc" }, { "size", "desc" } })+```++## set_is_hidden_file(is_hidden_file)++`set_is_hidden_file(is_hidden_file)` \+Change how oil determines if the file is hidden++| Param          | Type                                             | Desc                                         |+| -------------- | ------------------------------------------------ | -------------------------------------------- |+| is_hidden_file | `fun(filename: string, bufnr: integer): boolean` | Return true if the file/dir should be hidden |++## toggle_hidden()++`toggle_hidden()` \+Toggle hidden files and directories+++## get_current_dir(bufnr)++`get_current_dir(bufnr): nil|string` \+Get the current directory++| Param | Type           | Desc |+| ----- | -------------- | ---- |+| bufnr | `nil\|integer` |      |++## open_float(dir, opts, cb)++`open_float(dir, opts, cb)` \+Open oil browser in a floating window+

Show all 206 lines

nvim/pack/plugins/opt/oil.nvim/doc/oil.txt added (view file)

@@ -0,0 +1,778 @@+*oil.txt*+*Oil* *oil* *oil.nvim*+--------------------------------------------------------------------------------+CONTENTS                                                            *oil-contents*++  1. Config                                                       |oil-config|+  2. Options                                                     |oil-options|+  3. Api                                                             |oil-api|+  4. Columns                                                     |oil-columns|+  5. Actions                                                     |oil-actions|+  6. Highlights                                               |oil-highlights|+  7. Trash                                                         |oil-trash|++--------------------------------------------------------------------------------+CONFIG                                                                *oil-config*++>lua+    require("oil").setup({+      -- Oil will take over directory buffers (e.g. `vim .` or `:e src/`)+      -- Set to false if you want some other plugin (e.g. netrw) to open when you edit directories.+      default_file_explorer = true,+      -- Id is automatically added at the beginning, and name at the end+      -- See :help oil-columns+      columns = {+        "icon",+        -- "permissions",+        -- "size",+        -- "mtime",+      },+      -- Buffer-local options to use for oil buffers+      buf_options = {+        buflisted = false,+        bufhidden = "hide",+      },+      -- Window-local options to use for oil buffers+      win_options = {+        wrap = false,+        signcolumn = "no",+        cursorcolumn = false,+        foldcolumn = "0",+        spell = false,+        list = false,+        conceallevel = 3,+        concealcursor = "nvic",+      },+      -- Send deleted files to the trash instead of permanently deleting them (:help oil-trash)+      delete_to_trash = false,+      -- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits)+      skip_confirm_for_simple_edits = false,+      -- Selecting a new/moved/renamed file or directory will prompt you to save changes first+      -- (:help prompt_save_on_select_new_entry)+      prompt_save_on_select_new_entry = true,+      -- Oil will automatically delete hidden buffers after this delay+      -- You can set the delay to false to disable cleanup entirely+      -- Note that the cleanup process only starts when none of the oil buffers are currently displayed+      cleanup_delay_ms = 2000,+      lsp_file_methods = {+        -- Enable or disable LSP file operations+        enabled = true,+        -- Time to wait for LSP file operations to complete before skipping+        timeout_ms = 1000,+        -- Set to true to autosave buffers that are updated with LSP willRenameFiles+        -- Set to "unmodified" to only save unmodified buffers+        autosave_changes = false,+      },+      -- Constrain the cursor to the editable parts of the oil buffer+      -- Set to `false` to disable, or "name" to keep it on the file names+      constrain_cursor = "editable",+      -- Set to true to watch the filesystem for changes and reload oil+      watch_for_changes = false,+      -- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap+      -- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })+      -- Additionally, if it is a string that matches "actions.<name>",+      -- it will use the mapping at require("oil.actions").<name>+      -- Set to `false` to remove a keymap+      -- See :help oil-actions for a list of all available actions+      keymaps = {+        ["g?"] = { "actions.show_help", mode = "n" },+        ["<CR>"] = "actions.select",+        ["<C-s>"] = { "actions.select", opts = { vertical = true } },+        ["<C-h>"] = { "actions.select", opts = { horizontal = true } },+        ["<C-t>"] = { "actions.select", opts = { tab = true } },+        ["<C-p>"] = "actions.preview",+        ["<C-c>"] = { "actions.close", mode = "n" },+        ["<C-l>"] = "actions.refresh",+        ["-"] = { "actions.parent", mode = "n" },+        ["_"] = { "actions.open_cwd", mode = "n" },+        ["`"] = { "actions.cd", mode = "n" },+        ["g~"] = { "actions.cd", opts = { scope = "tab" }, mode = "n" },+        ["gs"] = { "actions.change_sort", mode = "n" },+        ["gx"] = "actions.open_external",+        ["g."] = { "actions.toggle_hidden", mode = "n" },+        ["g\\"] = { "actions.toggle_trash", mode = "n" },+      },+      -- Set to false to disable all of the above keymaps+      use_default_keymaps = true,+      view_options = {+        -- Show files and directories that start with "."+        show_hidden = false,+        -- This function defines what is considered a "hidden" file+        is_hidden_file = function(name, bufnr)+          local m = name:match("^%.")+          return m ~= nil+        end,+        -- This function defines what will never be shown, even when `show_hidden` is set+        is_always_hidden = function(name, bufnr)+          return false+        end,+        -- Sort file names with numbers in a more intuitive order for humans.+        -- Can be "fast", true, or false. "fast" will turn it off for large directories.+        natural_order = "fast",+        -- Sort file and directory names case insensitive+        case_insensitive = false,+        sort = {+          -- sort order can be "asc" or "desc"+          -- see :help oil-columns to see which columns are sortable+          { "type", "asc" },+          { "name", "asc" },+        },+        -- Customize the highlight group for the file name+        highlight_filename = function(entry, is_hidden, is_link_target, is_link_orphan)+          return nil+        end,+      },+      -- Extra arguments to pass to SCP when moving/copying files over SSH+      extra_scp_args = {},+      -- Extra arguments to pass to aws s3 when creating/deleting/moving/copying files using aws s3+      extra_s3_args = {},+      -- EXPERIMENTAL support for performing file operations with git+      git = {+        -- Return true to automatically git add/mv/rm files+        add = function(path)+          return false+        end,+        mv = function(src_path, dest_path)+          return false+        end,+        rm = function(path)+          return false+        end,+      },+      -- Configuration for the floating window in oil.open_float+      float = {+        -- Padding around the floating window+        padding = 2,+        -- max_width and max_height can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)+        max_width = 0,+        max_height = 0,+        border = nil,+        win_options = {+          winblend = 0,+        },+        -- optionally override the oil buffers window title with custom function: fun(winid: integer): string+        get_win_title = nil,+        -- preview_split: Split direction: "auto", "left", "right", "above", "below".+        preview_split = "auto",+        -- This is the config that will be passed to nvim_open_win.+        -- Change values here to customize the layout+        override = function(conf)+          return conf+        end,+      },+      -- Configuration for the file preview window+      preview_win = {+        -- Whether the preview window is automatically updated when the cursor is moved+        update_on_cursor_moved = true,+        -- How to open the preview window "load"|"scratch"|"fast_scratch"+        preview_method = "fast_scratch",+        -- A function that returns true to disable preview on a file e.g. to avoid lag+        disable_preview = function(filename)+          return false+        end,+        -- Window-local options to use for preview window buffers+        win_options = {},+      },+      -- Configuration for the floating action confirmation window+      confirmation = {+        -- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)+        -- min_width and max_width can be a single value or a list of mixed integer/float types.+        -- max_width = {100, 0.8} means "the lesser of 100 columns or 80% of total"+        max_width = 0.9,+        -- min_width = {40, 0.4} means "the greater of 40 columns or 40% of total"+        min_width = { 40, 0.4 },+        -- optionally define an integer/float for the exact width of the preview window+        width = nil,+        -- Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)+        -- min_height and max_height can be a single value or a list of mixed integer/float types.+        -- max_height = {80, 0.9} means "the lesser of 80 columns or 90% of total"+        max_height = 0.9,+        -- min_height = {5, 0.1} means "the greater of 5 columns or 10% of total"+        min_height = { 5, 0.1 },+        -- optionally define an integer/float for the exact height of the preview window+        height = nil,+        border = nil,+        win_options = {+          winblend = 0,+        },+      },+      -- Configuration for the floating progress window+      progress = {+        max_width = 0.9,+        min_width = { 40, 0.4 },+        width = nil,+        max_height = { 10, 0.9 },+        min_height = { 5, 0.1 },+        height = nil,+        border = nil,+        minimized_border = "none",+        win_options = {+          winblend = 0,+        },+      },+      -- Configuration for the floating SSH window+      ssh = {+        border = nil,+      },+      -- Configuration for the floating keymaps help window+      keymaps_help = {+        border = nil,+      },+    })+<++--------------------------------------------------------------------------------+OPTIONS                                                              *oil-options*+++skip_confirm_for_simple_edits                  *oil.skip_confirm_for_simple_edits*+    type: `boolean` default: `false`+    Before performing filesystem operations, Oil displays a confirmation popup to ensure+    that all operations are intentional. When this option is `true`, the popup will be+    skipped if the operations:+        * contain no deletes+        * contain no cross-adapter moves or copies (e.g. from local to ssh)+        * contain at most one copy or move+        * contain at most five creates++prompt_save_on_select_new_entry              *oil.prompt_save_on_select_new_entry*+    type: `boolean` default: `true`+    There are two cases where this option is relevant:+    1. You copy a file to a new location, then you select it and make edits before+       saving.+    2. You copy a directory to a new location, then you enter the directory and make+       changes before saving.++    In case 1, when you edit the file you are actually editing the original file because+    oil has not yet moved/copied it to its new location. This means that the original+    file will, perhaps unexpectedly, also be changed by any edits you make.++    Case 2 is similar; when you edit the directory you are again actually editing the+    original location of the directory. If you add new files, those files will be+    created in both the original location and the copied directory.++    When this option is `true`, Oil will prompt you to save before entering a file or+    directory that is pending within oil, but does not exist on disk.++--------------------------------------------------------------------------------+API                                                                      *oil-api*++get_entry_on_line({bufnr}, {lnum}): nil|oil.Entry          *oil.get_entry_on_line*+    Get the entry on a specific line (1-indexed)++    Parameters:+      {bufnr} `integer`+      {lnum}  `integer`++get_cursor_entry(): nil|oil.Entry                           *oil.get_cursor_entry*+    Get the entry currently under the cursor+++discard_all_changes()                                    *oil.discard_all_changes*+    Discard all changes made to oil buffers+++set_columns({cols})                                              *oil.set_columns*+    Change the display columns for oil++    Parameters:+      {cols} `oil.ColumnSpec[]`++set_sort({sort})                                                    *oil.set_sort*+    Change the sort order for oil++    Parameters:+      {sort} `oil.SortSpec[]` List of columns plus direction. See :help oil-+             columns to see which ones are sortable.++    Examples: >lua+      require("oil").set_sort({ { "type", "asc" }, { "size", "desc" } })+<++set_is_hidden_file({is_hidden_file})                      *oil.set_is_hidden_file*+    Change how oil determines if the file is hidden++    Parameters:+      {is_hidden_file} `fun(filename: string, bufnr: integer): boolean` Return+                       true if the file/dir should be hidden++toggle_hidden()                                                *oil.toggle_hidden*+    Toggle hidden files and directories+++get_current_dir({bufnr}): nil|string                         *oil.get_current_dir*+    Get the current directory++    Parameters:+      {bufnr} `nil|integer`++open_float({dir}, {opts}, {cb})                                   *oil.open_float*+    Open oil browser in a floating window++    Parameters:+      {dir}  `nil|string` When nil, open the parent of the current buffer, or+             the cwd if current buffer is not a file+      {opts} `nil|oil.OpenOpts`+          {preview} `nil|oil.OpenPreviewOpts` When present, open the preview+                    window after opening oil+              {vertical}   `nil|boolean` Open the buffer in a vertical split+              {horizontal} `nil|boolean` Open the buffer in a horizontal split+              {split}      `nil|"aboveleft"|"belowright"|"topleft"|"botright"` S+                           plit modifier+      {cb}   `nil|fun()` Called after the oil buffer is ready++toggle_float({dir}, {opts}, {cb})                               *oil.toggle_float*+    Open oil browser in a floating window, or close it if open++    Parameters:+      {dir}  `nil|string` When nil, open the parent of the current buffer, or+             the cwd if current buffer is not a file+      {opts} `nil|oil.OpenOpts`+          {preview} `nil|oil.OpenPreviewOpts` When present, open the preview+                    window after opening oil+              {vertical}   `nil|boolean` Open the buffer in a vertical split+              {horizontal} `nil|boolean` Open the buffer in a horizontal split+              {split}      `nil|"aboveleft"|"belowright"|"topleft"|"botright"` S+                           plit modifier+      {cb}   `nil|fun()` Called after the oil buffer is ready++open({dir}, {opts}, {cb})                                               *oil.open*+    Open oil browser for a directory++    Parameters:+      {dir}  `nil|string` When nil, open the parent of the current buffer, or+             the cwd if current buffer is not a file+      {opts} `nil|oil.OpenOpts`+          {preview} `nil|oil.OpenPreviewOpts` When present, open the preview+                    window after opening oil+              {vertical}   `nil|boolean` Open the buffer in a vertical split+              {horizontal} `nil|boolean` Open the buffer in a horizontal split+              {split}      `nil|"aboveleft"|"belowright"|"topleft"|"botright"` S+                           plit modifier+      {cb}   `nil|fun()` Called after the oil buffer is ready++close({opts})                                                          *oil.close*+    Restore the buffer that was present when oil was opened++    Parameters:+      {opts} `nil|oil.CloseOpts`+          {exit_if_last_buf} `nil|boolean` Exit vim if this oil buffer is the+                             last open buffer++open_preview({opts}, {callback})                                *oil.open_preview*+    Preview the entry under the cursor in a split++    Parameters:+      {opts}     `nil|oil.OpenPreviewOpts`+          {vertical}   `nil|boolean` Open the buffer in a vertical split+          {horizontal} `nil|boolean` Open the buffer in a horizontal split+          {split}      `nil|"aboveleft"|"belowright"|"topleft"|"botright"` Split+                       modifier+      {callback} `nil|fun(err: nil|string)` Called once the preview window has+                 been opened++select({opts}, {callback})                                            *oil.select*+    Select the entry under the cursor++    Parameters:+      {opts}     `nil|oil.SelectOpts`+          {vertical}   `nil|boolean` Open the buffer in a vertical split+          {horizontal} `nil|boolean` Open the buffer in a horizontal split+          {split}      `nil|"aboveleft"|"belowright"|"topleft"|"botright"` Split+                       modifier+          {tab}        `nil|boolean` Open the buffer in a new tab+          {close}      `nil|boolean` Close the original oil buffer once+                       selection is made+          {handle_buffer_callback} `nil|fun(buf_id: integer)` If defined, all+                       other buffer related options here would be ignored. This+                       callback allows you to take over the process of opening+                       the buffer yourself.+      {callback} `nil|fun(err: nil|string)` Called once all entries have been+                 opened++save({opts}, {cb})                                                      *oil.save*+    Save all changes++    Parameters:+      {opts} `nil|table`+          {confirm} `nil|boolean` Show confirmation when true, never when false,+                    respect skip_confirm_for_simple_edits if nil+      {cb}   `nil|fun(err: nil|string)` Called when mutations complete.++    Note:+      If you provide your own callback function, there will be no notification for errors.++setup({opts})                                                          *oil.setup*+    Initialize oil++    Parameters:+      {opts} `oil.setupOpts|nil`++--------------------------------------------------------------------------------+COLUMNS                                                              *oil-columns*++Columns can be specified as a string to use default arguments (e.g. `"icon"`),+or as a table to pass parameters (e.g. `{"size", highlight = "Special"}`)++type                                                                 *column-type*+    Adapters: *+    Sortable: this column can be used in view_props.sort+    The type of the entry (file, directory, link, etc)++    Parameters:+      {highlight} `string|fun(value: string): string` Highlight group, or+                  function that returns a highlight group+      {align}     `"left"|"center"|"right"` Text alignment within the column+      {icons}     `table<string, string>` Mapping of entry type to icon++icon                                                                 *column-icon*+    Adapters: *+    An icon for the entry's type (requires nvim-web-devicons)++    Parameters:+      {highlight}    `string|fun(value: string): string` Highlight group, or+                     function that returns a highlight group+      {align}        `"left"|"center"|"right"` Text alignment within the column+      {default_file} `string` Fallback icon for files when nvim-web-devicons+                     returns nil+      {directory}    `string` Icon for directories+      {add_padding}  `boolean` Set to false to remove the extra whitespace after+                     the icon++size                                                                 *column-size*+    Adapters: files, ssh, s3+    Sortable: this column can be used in view_props.sort+    The size of the file++    Parameters:+      {highlight} `string|fun(value: string): string` Highlight group, or+                  function that returns a highlight group+      {align}     `"left"|"center"|"right"` Text alignment within the column++permissions                                                   *column-permissions*+    Adapters: files, ssh+    Editable: this column is read/write+    Access permissions of the file++    Parameters:+      {highlight} `string|fun(value: string): string` Highlight group, or+                  function that returns a highlight group+      {align}     `"left"|"center"|"right"` Text alignment within the column++ctime                                                               *column-ctime*+    Adapters: files+    Sortable: this column can be used in view_props.sort+    Change timestamp of the file++    Parameters:+      {highlight} `string|fun(value: string): string` Highlight group, or+                  function that returns a highlight group+      {align}     `"left"|"center"|"right"` Text alignment within the column+      {format}    `string` Format string (see :help strftime)++mtime                                                               *column-mtime*+    Adapters: files+    Sortable: this column can be used in view_props.sort+    Last modified time of the file++    Parameters:+      {highlight} `string|fun(value: string): string` Highlight group, or+                  function that returns a highlight group+      {align}     `"left"|"center"|"right"` Text alignment within the column+      {format}    `string` Format string (see :help strftime)++atime                                                               *column-atime*+    Adapters: files+    Sortable: this column can be used in view_props.sort+    Last access time of the file++    Parameters:+      {highlight} `string|fun(value: string): string` Highlight group, or+                  function that returns a highlight group+      {align}     `"left"|"center"|"right"` Text alignment within the column+      {format}    `string` Format string (see :help strftime)++birthtime                                                       *column-birthtime*+    Adapters: files, s3+    Sortable: this column can be used in view_props.sort+    The time the file was created++    Parameters:+      {highlight} `string|fun(value: string): string` Highlight group, or+                  function that returns a highlight group+      {align}     `"left"|"center"|"right"` Text alignment within the column+      {format}    `string` Format string (see :help strftime)++--------------------------------------------------------------------------------+ACTIONS                                                              *oil-actions*++The `keymaps` option in `oil.setup` allow you to create mappings using all the same parameters as |vim.keymap.set|.+>lua+    keymaps = {+        -- Mappings can be a string+        ["~"] = "<cmd>edit $HOME<CR>",+        -- Mappings can be a function+        ["gd"] = function()+            require("oil").set_columns({ "icon", "permissions", "size", "mtime" })+        end,+        -- You can pass additional opts to vim.keymap.set by using+        -- a table with the mapping as the first element.+        ["<leader>ff"] = {+            function()+                require("telescope.builtin").find_files({+                    cwd = require("oil").get_current_dir()+                })+            end,+            mode = "n",+            nowait = true,+            desc = "Find files in the current directory"+        },+        -- Mappings that are a string starting with "actions." will be+        -- one of the built-in actions, documented below.+        ["`"] = "actions.tcd",+        -- Some actions have parameters. These are passed in via the `opts` key.+        ["<leader>:"] = {+            "actions.open_cmdline",+            opts = {+                shorten_path = true,+                modify = ":h",+            },+            desc = "Open the command line with the current directory as an argument",+        },+    }++Below are the actions that can be used in the `keymaps` section of config+options. You can refer to them as strings (e.g. "actions.<action_name>") or you+can use the functions directly with+`require("oil.actions").action_name.callback()`++cd                                                                    *actions.cd*+    :cd to the current oil directory++    Parameters:+      {scope}  `nil|"tab"|"win"` Scope of the directory change (e.g. use |:tcd|+               or |:lcd|)+      {silent} `boolean` Do not show a message when changing directories++change_sort                                                  *actions.change_sort*+    Change the sort order++    Parameters:+      {sort} `oil.SortSpec[]` List of columns plus direction (see+             |oil.set_sort|) instead of interactive selection++close                                                              *actions.close*+    Close oil and restore original buffer++    Parameters:+      {exit_if_last_buf} `boolean` Exit vim if oil is closed as the last buffer++copy_to_system_clipboard                        *actions.copy_to_system_clipboard*+    Copy the entry under the cursor to the system clipboard++open_cmdline                                                *actions.open_cmdline*+    Open vim cmdline with current entry as an argument++    Parameters:+      {modify}       `string` Modify the path with |fnamemodify()| using this as+                     the mods argument+      {shorten_path} `boolean` Use relative paths when possible++open_cwd                                                        *actions.open_cwd*+    Open oil in Neovim's current working directory++open_external                                              *actions.open_external*+    Open the entry under the cursor in an external program++open_terminal                                              *actions.open_terminal*+    Open a terminal in the current directory++parent                                                            *actions.parent*+    Navigate to the parent path++paste_from_system_clipboard                  *actions.paste_from_system_clipboard*+    Paste the system clipboard into the current oil directory++    Parameters:+      {delete_original} `boolean` Delete the original file after copying++preview                                                          *actions.preview*+    Open the entry under the cursor in a preview window, or close the preview+    window if already open++    Parameters:+      {horizontal} `boolean` Open the buffer in a horizontal split+      {split}      `"aboveleft"|"belowright"|"topleft"|"botright"` Split+                   modifier+      {vertical}   `boolean` Open the buffer in a vertical split++preview_scroll_down                                  *actions.preview_scroll_down*+    Scroll down in the preview window++preview_scroll_left                                  *actions.preview_scroll_left*+    Scroll left in the preview window++preview_scroll_right                                *actions.preview_scroll_right*+    Scroll right in the preview window++preview_scroll_up                                      *actions.preview_scroll_up*+    Scroll up in the preview window++refresh                                                          *actions.refresh*+    Refresh current directory list++    Parameters:+      {force} `boolean` When true, do not prompt user if they will be discarding+              changes++select                                                            *actions.select*+    Open the entry under the cursor++    Parameters:+      {close}      `boolean` Close the original oil buffer once selection is+                   made+      {horizontal} `boolean` Open the buffer in a horizontal split+      {split}      `"aboveleft"|"belowright"|"topleft"|"botright"` Split+                   modifier+      {tab}        `boolean` Open the buffer in a new tab+      {vertical}   `boolean` Open the buffer in a vertical split++send_to_qflist                                            *actions.send_to_qflist*+    Sends files in the current oil directory to the quickfix list, replacing the+    previous entries.++    Parameters:+      {action} `"r"|"a"` Replace or add to current quickfix list (see+               |setqflist-action|)+      {only_matching_search} `boolean` Whether to only add the files that+               matches the last search. This option only applies when search+               highlighting is active+      {target} `"qflist"|"loclist"` The target list to send files to++show_help                                                      *actions.show_help*+    Show default keymaps++toggle_hidden                                              *actions.toggle_hidden*+    Toggle hidden files and directories++toggle_trash                                                *actions.toggle_trash*+    Jump to and from the trash for the current directory++yank_entry                                                    *actions.yank_entry*+    Yank the filepath of the entry under the cursor to a register++    Parameters:+      {modify} `string` Modify the path with |fnamemodify()| using this as the+               mods argument++--------------------------------------------------------------------------------+HIGHLIGHTS                                                        *oil-highlights*++OilEmpty                                                             *hl-OilEmpty*+    Empty column values++OilHidden                                                           *hl-OilHidden*+    Hidden entry in an oil buffer++OilDir                                                                 *hl-OilDir*+    Directory names in an oil buffer++OilDirHidden                                                     *hl-OilDirHidden*+    Hidden directory names in an oil buffer++OilDirIcon                                                         *hl-OilDirIcon*+    Icon for directories++OilSocket                                                           *hl-OilSocket*+    Socket files in an oil buffer++OilSocketHidden                                               *hl-OilSocketHidden*+    Hidden socket files in an oil buffer++OilLink                                                               *hl-OilLink*+    Soft links in an oil buffer++OilOrphanLink                                                   *hl-OilOrphanLink*+    Orphaned soft links in an oil buffer++OilLinkHidden                                                   *hl-OilLinkHidden*+    Hidden soft links in an oil buffer++OilOrphanLinkHidden                                       *hl-OilOrphanLinkHidden*+    Hidden orphaned soft links in an oil buffer++OilLinkTarget                                                   *hl-OilLinkTarget*+    The target of a soft link++OilOrphanLinkTarget                                       *hl-OilOrphanLinkTarget*+    The target of an orphaned soft link++OilLinkTargetHidden                                       *hl-OilLinkTargetHidden*+    The target of a hidden soft link++OilOrphanLinkTargetHidden                           *hl-OilOrphanLinkTargetHidden*+    The target of an hidden orphaned soft link++OilFile                                                               *hl-OilFile*+    Normal files in an oil buffer++OilFileHidden                                                   *hl-OilFileHidden*+    Hidden normal files in an oil buffer++OilCreate                                                           *hl-OilCreate*+    Create action in the oil preview window++OilDelete                                                           *hl-OilDelete*+    Delete action in the oil preview window++OilMove                                                               *hl-OilMove*+    Move action in the oil preview window++OilCopy                                                               *hl-OilCopy*+    Copy action in the oil preview window++OilChange                                                           *hl-OilChange*+    Change action in the oil preview window++OilRestore                                                         *hl-OilRestore*+    Restore (from the trash) action in the oil preview window++OilPurge                                                             *hl-OilPurge*+    Purge (Permanently delete a file from trash) action in the oil preview+    window++OilTrash                                                             *hl-OilTrash*+    Trash (delete a file to trash) action in the oil preview window++OilTrashSourcePath                                         *hl-OilTrashSourcePath*+    Virtual text that shows the original path of file in the trash++--------------------------------------------------------------------------------+TRASH                                                                  *oil-trash*+++Oil has built-in support for using the system trash. When+`delete_to_trash = true`, any deleted files will be sent to the trash instead+of being permanently deleted. You can browse the trash for a directory using+the `toggle_trash` action (bound to `g\` by default). You can view all files+in the trash with `:Oil --trash /`.++To restore files, simply move them from the trash to the desired destination,+the same as any other file operation. If you delete files from the trash they+will be permanently deleted (purged).++Linux:+    Oil supports the FreeDesktop trash specification.+    https://specifications.freedesktop.org/trash-spec/1.0/+    All features should work.++Mac:+    Oil has limited support for MacOS due to the proprietary nature of the+    implementation. The trash bin can only be viewed as a single dir+    (instead of being able to see files that were trashed from a directory).++Windows:+    Oil supports the Windows Recycle Bin. All features should work.++================================================================================+vim:tw=80:ts=2:ft=help:norl:syntax=help:

nvim/pack/plugins/opt/oil.nvim/doc/recipes.md added (view file)

@@ -0,0 +1,127 @@+# Recipes++Have a cool recipe to share? Open a pull request and add it to this doc!++<!-- TOC -->

Show all 128 lines

nvim/pack/plugins/opt/oil.nvim/lua/oil/actions.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/adapters/files.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/adapters/files/permissions.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/adapters/s3.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/adapters/s3/s3fs.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/adapters/ssh.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/adapters/ssh/connection.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/adapters/ssh/sshfs.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/adapters/test.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/adapters/trash.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/adapters/trash/freedesktop.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/adapters/trash/mac.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/adapters/trash/windows.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/adapters/trash/windows/powershell-connection.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/adapters/trash/windows/powershell-trash.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/cache.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/clipboard.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/columns.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/config.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/constants.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/fs.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/git.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/init.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/keymap_util.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/layout.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/loading.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/log.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/lsp/helpers.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/lsp/workspace.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/mutator/confirmation.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/mutator/init.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/mutator/parser.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/mutator/progress.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/mutator/trie.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/pathutil.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/ringbuf.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/shell.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/util.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/oil/view.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/lua/resession/extensions/oil.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/perf/bootstrap.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/run_tests.sh added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/scripts/generate.py added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/scripts/main.py added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/scripts/requirements.txt added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/syntax/oil.vim added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/syntax/oil_preview.vim added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/altbuf_spec.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/files_spec.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/manual_progress.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/minimal_init.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/move_rename_spec.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/mutator_spec.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/parser_spec.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/path_spec.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/preview_spec.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/regression_spec.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/select_spec.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/test_util.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/tmpdir.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/trash_spec.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/url_spec.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/util_spec.lua added (view file)

Show diff

nvim/pack/plugins/opt/oil.nvim/tests/win_options_spec.lua added (view file)

Show diff