commit 75982935dfa4a78207db7524d37759784f080fa4
parent 0fc1956e7cceb533ee5a3f110a5fd38bd0f2c6a5
Author: Alex Balgavy <alexander.balgavy@spaceapplications.com>
Date: Sat, 14 Dec 2024 15:52:38 +0100
nvim: misc keybinds
Diffstat:
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/nvim/init.lua b/nvim/init.lua
@@ -56,23 +56,26 @@ vim.api.nvim_create_autocmd('TextYankPost', {
-- Diagnostic keymaps
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)
-vim.keymap.set('n', ']e', function() vim.diagnostic.jump({ count = 1, float = true, severity = vim.diagnostic.severity.ERROR }) end)
-vim.keymap.set('n', '[e', function() vim.diagnostic.jump({ count = -1, float = true, severity = vim.diagnostic.severity.ERROR }) end)
+vim.keymap.set('n', ']e',
+ function() vim.diagnostic.jump({ count = 1, float = true, severity = vim.diagnostic.severity.ERROR }) end)
+vim.keymap.set('n', '[e',
+ function() vim.diagnostic.jump({ count = -1, float = true, severity = vim.diagnostic.severity.ERROR }) end)
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float)
vim.keymap.set('n', '<leader>q', function() vim.diagnostic.setloclist({ severity = vim.diagnostic.severity.ERROR }) end)
-- 'i' that indents correctly on empty lines
vim.keymap.set('n', 'i', function()
- if #vim.fn.getline(".") == 0 then
- return [["_cc]]
- else
- return "i"
- end
-end, {expr = true})
+ if #vim.fn.getline(".") == 0 then
+ return [["_cc]]
+ else
+ return "i"
+ end
+end, { expr = true })
require('llm')
+require('netrw_target')
-vim.cmd ([[
+vim.cmd([[
nnoremap <leader><C-e><C-u> :<c-u>exe "vsplit ~/.vim/snippets/"..&filetype..".snippets"<CR>
]])