From c376c21b31aaee39acadc5e4148ae4d366d45f00 Mon Sep 17 00:00:00 2001 From: ottjk Date: Sat, 27 Jan 2024 15:34:03 -0500 Subject: sweep kanata config and nvim updates --- keybs/sweep.kbd | 28 ++++++++++++++++++++++++++++ nvim/lua/keymaps.lua | 10 ++++------ nvim/snips/tex/chunks.lua | 10 ++++++++++ 3 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 keybs/sweep.kbd diff --git a/keybs/sweep.kbd b/keybs/sweep.kbd new file mode 100644 index 0000000..7469c93 --- /dev/null +++ b/keybs/sweep.kbd @@ -0,0 +1,28 @@ +(defcfg + linux-dev-names-include ( + "Cradio Keyboard" + "ZMK Project Cradio Keyboard" + ) +) + +(defalias + mau (movemouse-accel-up 5 1000 1 5) + mal (movemouse-accel-left 5 1000 1 5) + mad (movemouse-accel-down 5 1000 1 5) + mar (movemouse-accel-right 5 1000 1 5) + + mwu (mwheel-up 1 1) + mwl (mwheel-left 1 1) + mwd (mwheel-down 1 1) + mwr (mwheel-right 1 1) +) + +(defsrc + f17 f18 f19 f20 + f21 f22 f23 f24 +) + +(deflayer mouse + @mwl @mwd @mwu @mwr + @mal @mad @mau @mar +) diff --git a/nvim/lua/keymaps.lua b/nvim/lua/keymaps.lua index 18b379d..1bef617 100644 --- a/nvim/lua/keymaps.lua +++ b/nvim/lua/keymaps.lua @@ -78,13 +78,11 @@ map('i', '', [[: silent exec '.!xoppdog shake "'.getline('.').'" "'.b: map('n', '', [[: silent exec '!xoppdog fetch "'.b:vimtex.root.'/figures/" > /dev/null 2>&1 &':redraw!]], opts) vim.cmd([[ -" press to expand or jump in a snippet. These can also be mapped separately -" via luasnip-expand-snippet and luasnip-jump-next. imap luasnip#expand_or_jumpable() ? 'luasnip-expand-or-jump' : '' -]]) +inoremap lua require'luasnip'.jump(-1) -map('i', '', [[lua require'luasnip'.jump(-1)]], opts) -map('s', '', [[lua require('luasnip').jump(1)]], opts) -map('s', '', [[lua require('luasnip').jump(-1)]], opts) +snoremap lua require('luasnip').jump(1) +snoremap lua require('luasnip').jump(-1) +]]) map('n', 'xx', function() require('trouble').toggle() end) diff --git a/nvim/snips/tex/chunks.lua b/nvim/snips/tex/chunks.lua index a48242e..7e6b8d1 100644 --- a/nvim/snips/tex/chunks.lua +++ b/nvim/snips/tex/chunks.lua @@ -207,4 +207,14 @@ return { ]], { n.i(0) }), { condition = h.in_text * h.line_begin }) + -- split display equation + n.s({trig="sld", snippetType="autosnippet"}, + n.fmta( + [[ + \[ \begin{split} + <> + \end{split} \] + ]], + { n.i(0) }), + { condition = h.in_text * h.line_begin }) } -- cgit v1.3