Compare commits

..
2 Commits
3 changed files with 3 additions and 8 deletions

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
local ns = vim.api.nvim_create_namespace('git_status') 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) local function show(buf_id, items, query)
MiniPick.default_show(buf_id, items, query) MiniPick.default_show(buf_id, items, query)
@@ -13,7 +13,7 @@ end
return { return {
status = function() 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 if vim.v.shell_error ~= 0 then
return vim.notify('Not a git repository', vim.log.levels.WARN) return vim.notify('Not a git repository', vim.log.levels.WARN)
end end
+1 -2
View File
@@ -10,10 +10,9 @@ local function open(cmd)
height = h, height = h,
row = math.floor((lines - h) / 2), row = math.floor((lines - h) / 2),
col = math.floor((vim.o.columns - w) / 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 end
return { open = open } return { open = open }
-4
View File
@@ -125,10 +125,6 @@ nmap_leader('<Tab>d', vim.cmd.tabclose, 'Close tab')
nmap_leader('<Tab>]', vim.cmd.tabnext, 'Next tab') nmap_leader('<Tab>]', vim.cmd.tabnext, 'Next tab')
nmap_leader('<Tab>[', vim.cmd.tabprevious, 'Previous tab') nmap_leader('<Tab>[', vim.cmd.tabprevious, 'Previous tab')
-- Brackets
vim.keymap.set('n', ']d', function() vim.diagnostic.jump({ count = 1 }) end, { desc = 'Next diagnostic' })
vim.keymap.set('n', '[d', function() vim.diagnostic.jump({ count = -1 }) end, { desc = 'Previous diagnostic' })
-- Overwrites -- Overwrites
vim.keymap.set('n', '<Esc>', vim.cmd.nohlsearch, { desc = 'Clear highlights', silent = true }) vim.keymap.set('n', '<Esc>', vim.cmd.nohlsearch, { desc = 'Clear highlights', silent = true })
vim.keymap.set('t', '<C-w>', '<C-\\><C-n><C-w>', { desc = 'Terminal window navigation', silent = true }) vim.keymap.set('t', '<C-w>', '<C-\\><C-n><C-w>', { desc = 'Terminal window navigation', silent = true })