-- AstroCore provides a central place to modify mappings, vim options, autocommands, and more! -- Configuration documentation can be found with `:h astrocore` -- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`) -- as this provides autocomplete and documentation while editing ---@type LazySpec return { "AstroNvim/astrocore", ---@type AstroCoreOpts opts = { -- vim options can be configured here options = { opt = { -- cmdheight = 1, -- Always show command line scrolloff = 0, -- Set scroll offset to zero so that zt and zb work as expected -- number = true, -- sets vim.opt.number relativenumber = false, -- sets vim.opt.relativenumber -- signcolumn = "auto", -- sets vim.opt.signcolumn to auto -- foldcolumn = "auto", -- sets vim.opt.foldcolumn to auto -- spell = false, -- sets vim.opt.spell spelllang = "fr", -- Set spell language to french -- wrap = false, -- sets vim.opt.wrap }, }, -- Mappings can be configured through AstroCore as well. -- NOTE: keycodes follow the casing in the vimdocs. For example, `` must be capitalized mappings = { -- Normal mode n = { -- ["bb"] = { "tabnew", desc = "New tab" }, -- ["bc"] = { "BufferLinePickClose", desc = "Pick to close" }, -- ["bj"] = { "BufferLinePick", desc = "Pick to jump" }, -- ["bt"] = { "BufferLineSortByTabs", desc = "Sort by tabs" }, -- Easy buffer navigation [""] = { "bnext", desc = "Switch to next buffer" }, [""] = { "bprevious", desc = "Switch to previous buffer" }, -- quick save -- [""] = { ":w!", desc = "Save File" }, -- change description but the same command -- My telescope keybindings ["gf"] = { "Telescope git_files", desc = "Find git files with Telescope" }, ["fq"] = { "Telescope quickfix", desc = "Find quickfixes with Telescope" }, ["fs"] = { "Telescope spell_suggest", desc = "Find spell suggestions with Telescope" }, ["fp"] = { "Telescope projects", desc = "Find projetcs with Telescope" }, -- My personal keybindings ["²"] = { name = "Personal" }, ["²t"] = { name = "Terminals" }, ["²tt"] = { "TermSelect", desc = "Select a terminal" }, ["²tg"] = { "terminal tig", desc = "Open tig in a new tab" }, ["²n"] = { name = "Neotree" }, ["²nb"] = { "Neotree toggle buffers left", desc = "Open Neotree Buffers" }, ["²ng"] = { "Neotree toggle git_status left", desc = "Open Neotree Git status" }, -- [""] = { "Telescope help_tags", desc = "Find help with Telescope" }, [""] = { "Neotree toggle", desc = "File Explorer" }, -- F26 corresponds to on my keyboard [""] = { function() require("astrocore").toggle_term_cmd "lazygit" end, desc = "Lazygit terminal" }, -- F27 corresponds to on my keyboard [""] = { function() require("astrocore").toggle_term_cmd "tig" end, desc = "Tig terminal" }, -- F28 corresponds to on my keyboard }, -- Insert mode i = { [""] = { "Neotree toggle", desc = "File Explorer" }, -- F26 corresponds to on my keyboard [""] = { function() require("astrocore").toggle_term_cmd "lazygit" end, desc = "Lazygit terminal" }, -- F27 corresponds to on my keyboard [""] = { function() require("astrocore").toggle_term_cmd "tig" end, desc = "Tig terminal" }, -- F28 corresponds to on my keyboard }, -- Terminal mode t = { -- setting a mapping to false will disable it -- [""] = false, -- Switch to normal mode in terminal mode [""] = { "" }, -- Clear Ctrl+l so that we can use it to clear the terminal [""] = false, [""] = false, -- Clear Ctrl-J and Ctrl-K so that we can use them to navigate the terminal (for lazygit) [""] = false, [""] = false, -- My terms [""] = { function() require("astrocore").toggle_term_cmd "lazygit" end, desc = "Lazygit terminal" }, -- F27 corresponds to on my keyboard [""] = { function() require("astrocore").toggle_term_cmd "tig" end, desc = "Tig terminal" }, -- F28 corresponds to on my keyboard }, }, }, }