diff options
author | Squibid <me@zacharyscheiman.com> | 2025-05-18 22:32:28 -0400 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2025-05-18 22:33:36 -0400 |
commit | f9311db805dc29ed96b009c836231cd87b43b861 (patch) | |
tree | 1f84fe270ac110b0122ce1fb6ea39bc67c4957c2 /lua/conf/plugins/oil.lua | |
parent | d0155fcc7c734c1e3506e59cbb17ec3fb2a4b541 (diff) | |
download | nvim-f9311db805dc29ed96b009c836231cd87b43b861.tar.gz nvim-f9311db805dc29ed96b009c836231cd87b43b861.tar.bz2 nvim-f9311db805dc29ed96b009c836231cd87b43b861.zip |
try and make everything confined to 80chars
Diffstat (limited to 'lua/conf/plugins/oil.lua')
-rw-r--r-- | lua/conf/plugins/oil.lua | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lua/conf/plugins/oil.lua b/lua/conf/plugins/oil.lua index d985105..62f452b 100644 --- a/lua/conf/plugins/oil.lua +++ b/lua/conf/plugins/oil.lua @@ -6,7 +6,8 @@ local function parse_output(proc) local result = proc:wait() local ret = {} if result.code == 0 then - for line in vim.gsplit(result.stdout, "\n", { plain = true, trimempty = true }) do + for line in vim.gsplit(result.stdout, "\n", { + plain = true, trimempty = true }) do -- Remove trailing slash line = line:gsub("/$", "") ret[line] = true @@ -20,16 +21,20 @@ local function new_git_status() return setmetatable({}, { __index = function(self, key) local ignore_proc = vim.system( - { "git", "ls-files", "--ignored", "--exclude-standard", "--others", "--directory" }, + { "git", "ls-files", "--ignored", "--exclude-standard", "--others", + "--directory" }, + { + cwd = key, + text = true, + } + ) + local tracked_proc = vim.system({ "git", "ls-tree", "HEAD", + "--name-only" }, { cwd = key, text = true, } ) - local tracked_proc = vim.system({ "git", "ls-tree", "HEAD", "--name-only" }, { - cwd = key, - text = true, - }) local ret = { ignored = parse_output(ignore_proc), tracked = parse_output(tracked_proc), |