Skip to content

Commit c3ad995

Browse files
committed
chore(mention): remove unused old_files and get_git_changed_files
1 parent 8e2028e commit c3ad995

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

lua/opencode/ui/completion/files.lua

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -164,34 +164,6 @@ function M.get_recent_files()
164164
return recent_files
165165
end
166166

167-
---Get the list of old files in the current working directory
168-
---@return string[]
169-
function M.get_old_files()
170-
local result = {}
171-
for _, file in ipairs(vim.v.oldfiles) do
172-
if vim.startswith(vim.fn.fnamemodify(file, ':p'), vim.fn.getcwd()) then
173-
table.insert(result, vim.fn.fnamemodify(file, ':.'))
174-
end
175-
end
176-
return result
177-
end
178-
179-
---Get the list of changed files in git (staged, unstaged, untracked)
180-
---@return string[]|nil
181-
function M.get_git_changed_files()
182-
local results = run_systemlist('git status --porcelain')
183-
184-
local files = {}
185-
for _, line in ipairs(results or {}) do
186-
local file = line:sub(4)
187-
if file and file ~= '' and vim.trim(line:sub(1, 2)) ~= 'D' then
188-
table.insert(files, file)
189-
end
190-
end
191-
192-
return #files > 0 and files or nil
193-
end
194-
195167
---Get the file completion source
196168
---@return CompletionSource
197169
function M.get_source()

0 commit comments

Comments
 (0)