From c58a05348a4e91865e26c88dbfc1678bf3a85405 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Fri, 4 Jul 2025 00:29:30 +0200 Subject: [PATCH] feat: Update astrocore config --- lua/plugins/astrocore.lua | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/lua/plugins/astrocore.lua b/lua/plugins/astrocore.lua index 2a7e70f..f50c976 100644 --- a/lua/plugins/astrocore.lua +++ b/lua/plugins/astrocore.lua @@ -39,7 +39,7 @@ return { options = { opt = { -- vim.opt. number = true, -- sets vim.opt.number - relativenumber = false, -- sets vim.opt.relativenumber + relativenumber = true, -- sets vim.opt.relativenumber spell = false, -- sets vim.opt.spell spelllang = "fr", -- Set spell language to french signcolumn = "yes", -- sets vim.opt.signcolumn to yes @@ -49,7 +49,6 @@ return { -- configure global vim variables (vim.g) -- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup` -- This can be found in the `lua/lazy_setup.lua` file - }, }, -- Mappings can be configured through AstroCore as well. @@ -82,15 +81,32 @@ return { -- Normal mode : Custom mappings [""] = { "Neotree toggle", desc = "File Explorer" }, -- F26 corresponds to on my keyboard - [""] = { function() require("astrocore").toggle_term_cmd({cmd="lazygit", direction="float"}) end, desc = "Lazygit terminal" }, -- F27 corresponds to on my keyboard - [""] = { function() require("astrocore").toggle_term_cmd({cmd="tig", direction="float"}) end, desc = "Tig terminal" }, -- F28 corresponds to on my keyboard + [""] = { + function() require("astrocore").toggle_term_cmd { cmd = "lazygit", direction = "float" } end, + desc = "Lazygit terminal", + }, + [""] = { + function() require("astrocore").toggle_term_cmd { cmd = "tig", direction = "float" } end, + desc = "Tig terminal", + }, }, -- Insert mode : Custom mappings i = { [""] = { "Neotree toggle", desc = "File Explorer" }, -- F26 corresponds to on my keyboard - [""] = { function() require("astrocore").toggle_term_cmd({cmd="lazygit", direction="float"}) end, desc = "Lazygit terminal" }, -- F27 corresponds to on my keyboard - [""] = { function() require("astrocore").toggle_term_cmd({cmd="tig", direction="float"}) end, desc = "Tig terminal" }, -- F28 corresponds to on my keyboard + [""] = { + function() require("astrocore").toggle_term_cmd { cmd = "lazygit", direction = "float" } end, + desc = "Lazygit terminal", + }, + [""] = { + function() require("astrocore").toggle_term_cmd { cmd = "tig", direction = "float" } end, + desc = "Tig terminal", + }, }, + -- INFO: + -- F26 corresponds to on my keyboard + -- F27 corresponds to on my keyboard + -- F28 corresponds to on my keyboard + -- Terminal mode : Custom mappings t = { -- Switch to normal mode in terminal mode @@ -102,10 +118,15 @@ return { [""] = false, [""] = false, -- My terms - [""] = { function() require("astrocore").toggle_term_cmd({cmd="lazygit", direction="float"}) end, desc = "Lazygit terminal" }, -- F27 corresponds to on my keyboard - [""] = { function() require("astrocore").toggle_term_cmd({cmd="tig", direction="float"}) end, desc = "Tig terminal" }, -- F28 corresponds to on my keyboard + [""] = { + function() require("astrocore").toggle_term_cmd { name = "LazyGit", cmd = "lazygit", direction = "float" } end, + desc = "Lazygit terminal", + }, -- F27 corresponds to on my keyboard + [""] = { + function() require("astrocore").toggle_term_cmd { name = "Tig", cmd = "tig", direction = "float" } end, + desc = "Tig terminal", + }, -- F28 corresponds to on my keyboard }, - }, }, }