aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorDamjan 9000 <damjan.9000@gmail.com>2023-10-22 12:16:17 +0200
committerDamjan 9000 <damjan.9000@gmail.com>2023-11-03 21:01:49 +0100
commit79e010e68130a639be0cbfaf9db35f8e975897a9 (patch)
tree16dcac413f2c31c3388bee7aac0fa639b1d718f6 /init.lua
parent7070190fa9cd058159034dc700d48f316200f424 (diff)
Added lua/keymaps.lua
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua28
1 files changed, 2 insertions, 26 deletions
diff --git a/init.lua b/init.lua
index fa3cdfa..d7c519f 100644
--- a/init.lua
+++ b/init.lua
@@ -53,26 +53,8 @@ require('lazy-plugins')
-- Set options
require('options')
--- [[ Basic Keymaps ]]
-
--- Keymaps for better default experience
--- See `:help vim.keymap.set()`
-vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
-
--- Remap for dealing with word wrap
-vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
-vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
-
--- [[ Highlight on yank ]]
--- See `:help vim.highlight.on_yank()`
-local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
-vim.api.nvim_create_autocmd('TextYankPost', {
- callback = function()
- vim.highlight.on_yank()
- end,
- group = highlight_group,
- pattern = '*',
-})
+-- Configure keymaps
+require('keymaps')
-- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()`
@@ -178,12 +160,6 @@ vim.defer_fn(function()
}
end, 0)
--- Diagnostic keymaps
-vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' })
-vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' })
-vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
-vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
-
-- [[ Configure LSP ]]
-- This function gets run when an LSP connects to a particular buffer.
local on_attach = function(_, bufnr)