idk what all...

This commit is contained in:
2026-06-22 22:06:23 +00:00
parent 97dd524fa3
commit f21da90f44
6 changed files with 56 additions and 18 deletions
+14
View File
@@ -7,3 +7,17 @@ vim.diagnostic.config {
virtual_lines = false,
jump = { float = true },
}
local function open_line_diagnostics()
vim.diagnostic.open_float {
scope = 'line',
focusable = true,
border = 'rounded',
source = 'always',
max_width = math.floor(vim.o.columns * 0.8),
max_height = math.floor(vim.o.lines * 0.5),
}
end
vim.api.nvim_create_user_command('Diag', open_line_diagnostics, { desc = 'Show diagnostics for the current line' })
vim.keymap.set('n', '<leader>d', open_line_diagnostics, { desc = 'Show line [D]iagnostics' })
+19 -1
View File
@@ -8,7 +8,25 @@ vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left wind
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
vim.keymap.set('n', '<C-q>', '<cmd>close<CR>', { desc = 'Close window' })
vim.keymap.set('n', '<C-q>', function()
local wins = vim.tbl_filter(function(win)
return vim.api.nvim_win_get_config(win).relative == ''
end, vim.api.nvim_tabpage_list_wins(0))
if #wins > 1 then
vim.cmd('close')
else
local buffers = vim.tbl_filter(function(buf)
return vim.api.nvim_buf_is_valid(buf) and vim.bo[buf].buflisted
end, vim.api.nvim_list_bufs())
if #buffers > 1 then
vim.cmd('bdelete')
else
vim.cmd('q')
end
end
end, { desc = 'Close split, buffer, or exit' })
vim.keymap.set('n', '<C-\\>', '<cmd>vsplit<CR>', { desc = 'Vertical split' })
vim.keymap.set('n', '<C-S-\\>', '<cmd>split<CR>', { desc = 'Horizontal split' })
vim.keymap.set('n', '<leader>po', '<cmd>only<CR>', { desc = 'Only pane' })
+1 -1
View File
@@ -21,7 +21,7 @@ vim.o.softtabstop = 4
vim.o.expandtab = true
vim.o.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
vim.opt.listchars = { tab = ' ', trail = '·', nbsp = '' }
vim.o.inccommand = 'split'
vim.o.cursorline = true