Snippets
This commit is contained in:
@@ -26,6 +26,15 @@ vim.keymap.set('v', 'p', '"zdP', { desc = 'Paste over selection without yanking
|
||||
-- or just use <C-\><C-n> to exit terminal mode
|
||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||
|
||||
vim.keymap.set('n', '<Leader>c', function()
|
||||
local node = require('nvim-treesitter.ts_utils').get_node_at_cursor()
|
||||
if node then
|
||||
print(node:type())
|
||||
else
|
||||
print 'No node found at cursor'
|
||||
end
|
||||
end, { desc = 'Log node' })
|
||||
|
||||
-- Keybinds to make split navigation easier.
|
||||
-- Use CTRL+<hjkl> to switch between windows
|
||||
--
|
||||
@@ -37,12 +46,14 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
|
||||
|
||||
vim.keymap.set({ 'i' }, '<C-J>', function()
|
||||
local ls = require 'luasnip'
|
||||
print('jj')
|
||||
if ls.choice_active() then
|
||||
ls.change_choice(1)
|
||||
end
|
||||
end, { silent = true })
|
||||
vim.keymap.set({ 'i' }, '<C-k>', function()
|
||||
local ls = require 'luasnip'
|
||||
print('kk')
|
||||
if ls.choice_active() then
|
||||
ls.change_choice(-1)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user