From 47268fc49f0bf12167864e1be9aa4d4a863c220b Mon Sep 17 00:00:00 2001 From: Job Jobse Date: Wed, 23 Sep 2026 20:11:23 +0200 Subject: [PATCH] refactor: simplify git and terminal --- lua/git.lua | 4 ++-- lua/terminal.lua | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lua/git.lua b/lua/git.lua index 3a2d636..f29d531 100644 --- a/lua/git.lua +++ b/lua/git.lua @@ -1,5 +1,5 @@ local ns = vim.api.nvim_create_namespace('git_status') -local hls = { M = 'DiagnosticWarn', ['?'] = 'DiagnosticInfo', A = 'DiagnosticOk', D = 'DiagnosticError', R = 'DiagnosticWarn' } +local hls = { M = 'DiagnosticWarn', ['?'] = 'DiagnosticInfo', D = 'DiagnosticError' } local function show(buf_id, items, query) MiniPick.default_show(buf_id, items, query) @@ -13,7 +13,7 @@ end return { status = function() - local lines = vim.fn.systemlist('git status -s -u') + local lines = vim.fn.systemlist('git -c core.quotepath=false status -s -u') if vim.v.shell_error ~= 0 then return vim.notify('Not a git repository', vim.log.levels.WARN) end diff --git a/lua/terminal.lua b/lua/terminal.lua index 7f6e902..af1c193 100644 --- a/lua/terminal.lua +++ b/lua/terminal.lua @@ -10,10 +10,9 @@ local function open(cmd) height = h, row = math.floor((lines - h) / 2), col = math.floor((vim.o.columns - w) / 2), - border = 'rounded', }) - vim.fn.termopen(cmd, { on_exit = function() pcall(vim.api.nvim_win_close, win, true) end }) + vim.fn.jobstart(cmd, { term = true, on_exit = function() pcall(vim.api.nvim_win_close, win, true) end }) end return { open = open }