Merge branch 'main' of github.com:qwjyh/dotfiles

This commit is contained in:
qwjyh 2025-06-18 15:20:43 +09:00
commit 3c66d657f3
3 changed files with 62 additions and 0 deletions

View file

@ -361,6 +361,33 @@ vim.cmd.colorscheme "catppuccin-mocha"
-----------------------------------------------------------
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
local virt_lines_ns = vim.api.nvim_create_namespace 'on_diagnostic_jump'
--- @param diagnostic? vim.Diagnostic
--- @param bufnr integer
local function on_jump(diagnostic, bufnr)
if not diagnostic then return end
vim.diagnostic.show(
virt_lines_ns,
bufnr,
{ diagnostic },
{ virtual_lines = { current_line = true }, virtual_text = false }
)
end
-- vim.diagnostic.config({
-- jump = { on_jump = on_jump },
-- })
vim.keymap.set('n', ']d', function()
vim.diagnostic.jump({
count = 1,
float = true,
})
end)
vim.keymap.set('n', '[d', function()
vim.diagnostic.jump({
count = -1,
float = true,
})
end)
-- some terminalmode settings
vim.keymap.set('t', '<C-w>h', '<C-\\><C-N><C-w>h',
{ noremap = true, desc = "Exit terminal-mode and move to left window." })