summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymaekers Luca <luca@spacehb.net>2025-03-17 15:47:37 +0100
committerRaymaekers Luca <luca@spacehb.net>2025-03-17 15:47:37 +0100
commit170e2f851302468961239644e0c4c3d899bcf07f (patch)
treecf9a610bcb7c5b277d5dbf7a7a31baabacf4f681
parent4e31578c1e4b9e989cec824e3e832ac2aa66efcd (diff)
parentda7035666495a278bfc7885e4d9f11557f210357 (diff)
Merge branch 'main' of autumn:nvim
-rw-r--r--Makefile2
-rw-r--r--lua/config/lazy.lua54
-rw-r--r--lua/config/map.lua2
3 files changed, 56 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6187cee..946cac8 100644
--- a/Makefile
+++ b/Makefile
@@ -3,5 +3,5 @@
LUA_FILES := $(shell find . -type f -name "*.lua")
check:
- luacheck --no-color --globals=vim -- $(LUA_FILES)
stylua $(LUA_FILES)
+ luacheck --no-color --globals=vim -- $(LUA_FILES)
diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua
index d29aa3a..1bd0b8a 100644
--- a/lua/config/lazy.lua
+++ b/lua/config/lazy.lua
@@ -19,7 +19,59 @@ require("lazy").setup({
"lewis6991/gitsigns.nvim",
"tpope/vim-vinegar",
"tpope/vim-eunuch",
- "mg979/vim-visual-multi",
+ -- "mg979/vim-visual-multi",
+ {
+ "brenton-leighton/multiple-cursors.nvim",
+ version = "*", -- Use the latest tagged version
+ opts = {
+ custom_key_maps = {
+ {
+ "n",
+ "<S-Tab>",
+ function()
+ require("multiple-cursors").align()
+ end,
+ },
+ },
+ },
+ keys = {
+ { "<C-j>", "<Cmd>MultipleCursorsAddDown<CR>", mode = { "n", "x" }, desc = "Add cursor and move down" },
+ { "<C-k>", "<Cmd>MultipleCursorsAddUp<CR>", mode = { "n", "x" }, desc = "Add cursor and move up" },
+
+ { "<C-Up>", "<Cmd>MultipleCursorsAddUp<CR>", mode = { "n", "i", "x" }, desc = "Add cursor and move up" },
+ {
+ "<C-Down>",
+ "<Cmd>MultipleCursorsAddDown<CR>",
+ mode = { "n", "i", "x" },
+ desc = "Add cursor and move down",
+ },
+
+ {
+ "<Leader>m",
+ "<Cmd>MultipleCursorsAddVisualArea<CR>",
+ mode = { "x" },
+ desc = "Add cursors to the lines of the visual area",
+ },
+
+ { "<Leader>a", "<Cmd>MultipleCursorsAddMatches<CR>", mode = { "n", "x" }, desc = "Add cursors to cword" },
+ {
+ "<Leader>A",
+ "<Cmd>MultipleCursorsAddMatchesV<CR>",
+ mode = { "n", "x" },
+ desc = "Add cursors to cword in previous area",
+ },
+
+ {
+ "<Leader>d",
+ "<Cmd>MultipleCursorsAddJumpNextMatch<CR>",
+ mode = { "n", "x" },
+ desc = "Add cursor and jump to next cword",
+ },
+ { "<Leader>D", "<Cmd>MultipleCursorsJumpNextMatch<CR>", mode = { "n", "x" }, desc = "Jump to next cword" },
+
+ { "<Leader>l", "<Cmd>MultipleCursorsLock<CR>", mode = { "n", "x" }, desc = "Lock virtual cursors" },
+ },
+ },
"jghauser/follow-md-links.nvim",
"stevearc/conform.nvim",
"norcalli/nvim-colorizer.lua",
diff --git a/lua/config/map.lua b/lua/config/map.lua
index a39f362..27c6bb9 100644
--- a/lua/config/map.lua
+++ b/lua/config/map.lua
@@ -112,3 +112,5 @@ vim.api.nvim_create_user_command("Scratch", function()
setlocal noswapfile
]])
end, {})
+
+map("n", "<M-b>", "<cmd>make<cr>", { desc = "Make" })