summaryrefslogtreecommitdiff
path: root/nvim/lua
diff options
context:
space:
mode:
authorJosh <joshott16@gmail.com>2025-07-22 13:17:40 -0400
committerJosh <joshott16@gmail.com>2025-07-22 13:17:40 -0400
commit795287e3ec351def221f9b44d358a182062e203a (patch)
tree865b52db0b2fb2392dafd0828440ea4492481b35 /nvim/lua
parent2feea510cb508d22345f3f6d3fc085613fccd6ac (diff)
downloaddotfiles-795287e3ec351def221f9b44d358a182062e203a.tar.gz
dotfiles-795287e3ec351def221f9b44d358a182062e203a.zip
toggleterm config + misc stuff
Diffstat (limited to 'nvim/lua')
-rw-r--r--nvim/lua/commands.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/nvim/lua/commands.lua b/nvim/lua/commands.lua
index 8714158..aea15ca 100644
--- a/nvim/lua/commands.lua
+++ b/nvim/lua/commands.lua
@@ -8,3 +8,21 @@ vim.api.nvim_create_autocmd("ColorScheme", {
}
end,
})
+
+vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, {
+ pattern = '*.jl',
+ callback = function(ev)
+ vim.keymap.set('n', '<leader>js', '<cmd>lua _jlrepl_open()<CR>', { noremap = true, silent = true , buffer = true })
+ end
+})
+
+vim.api.nvim_create_autocmd({'BufEnter', 'BufWinEnter'}, {
+ pattern = '*.tex',
+ callback = function(ev)
+ vim.keymap.set('i', '<C-f>', [[<Esc>: silent exec '.!inkscape-figures create "'.getline('.').'" "'.b:vimtex.root.'/figures/"'<CR><CR>:w<CR>]], { buffer = true})
+ vim.keymap.set('n', '<C-f>', [[: silent exec '!inkscape-figures edit "'.b:vimtex.root.'/figures/" > /dev/null 2>&1 &'<CR><CR>:redraw!<CR>]], { buffer = true})
+
+ vim.keymap.set('i', '<C-x>', [[<Esc>: silent exec '.!xoppdog shake "'.getline('.').'" "'.b:vimtex.root.'/figures/"'<CR><CR>:w<CR>]], { buffer = true})
+ vim.keymap.set('n', '<C-x>', [[: silent exec '!xoppdog fetch "'.b:vimtex.root.'/figures/" > /dev/null 2>&1 &'<CR><CR>:redraw!<CR>]], { buffer = true})
+ end
+})