Merge branch 'main' of labs.scarif.space:chris/nvim

This commit is contained in:
Chris
2026-08-21 11:59:34 +01:00
2 changed files with 30 additions and 28 deletions
+10 -2
View File
@@ -57,7 +57,15 @@ vim.keymap.set('v', '<C-S-D>', function()
vim.cmd.normal 'v`x'
end, { desc = 'Select surrounding treesitter node' })
local swappable_nodes = { 'argument', 'array_element_initializer', 'simple_parameter', 'string', 'integer', 'member_call_expression', 'method_declaration' }
local swappable_nodes = {
'argument',
'array_element_initializer',
'simple_parameter',
'string',
'integer',
'member_call_expression',
'method_declaration',
}
local function closest_swappable_node(node)
while node and not vim.list_contains(swappable_nodes, node:type()) and (not node:next_named_sibling() or not node:prev_named_sibling()) do
@@ -373,7 +381,6 @@ local test_maps = {
local neotest = require 'neotest'
local bufnr = vim.api.nvim_get_current_buf()
local row = vim.api.nvim_win_get_cursor(0)[1] - 1
local adapters = neotest.state.adapter_ids()
local found = false
@@ -414,6 +421,7 @@ vim.keymap.set('n', '<Leader>tc', function()
end, { desc = 'Close test panels' })
vim.keymap.set('i', '<Tab>', function()
local ls = require 'luasnip'
if ls.jumpable(1) then
vim.api.nvim_echo({ { 'Jumping in snippet' } }, false, {})
ls.jump()