From 4aa332ee0b4b24429773f90378ac41ed09cc8e04 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Tue, 13 Feb 2024 10:31:51 -0500 Subject: [PATCH] refactor!: options moved to AstroCore --- lua/config/lazy.lua | 6 ++++++ lua/config/options.lua | 12 ------------ lua/plugins/options.lua | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 12 deletions(-) delete mode 100644 lua/config/options.lua create mode 100644 lua/plugins/options.lua diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 7e9c56e..971a26f 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -14,6 +14,12 @@ if not lazy_loaded then vim.cmd.quit() end +-- must configure leader key before Lazy is set up +vim.g.mapleader = " " + +-- Set to false to disable icons (if no Nerd Font is available) +vim.g.icons_enabled = true + ---@type LazyConfig lazy.setup({ -- TODO: change `branch="v4"` to `version="^4"` on release diff --git a/lua/config/options.lua b/lua/config/options.lua deleted file mode 100644 index d775743..0000000 --- a/lua/config/options.lua +++ /dev/null @@ -1,12 +0,0 @@ --- Options are automatically loaded before lazy.nvim startup --- Default options that are always set: https://github.com/AstroNvim/AstroNvim/blob/main/lua/astronvim/options.lua --- Add any additional options here - --- vim.opt.relativenumber = true -- sets vim.opt.relativenumber --- vim.opt.number = true -- sets vim.opt.number --- vim.opt.spell = false -- sets vim.opt.spell --- vim.opt.signcolumn = "auto" -- sets vim.opt.signcolumn to auto --- vim.opt.wrap = false -- sets vim.opt.wrap - --- vim.g.mapleader = " " -- sets vim.g.mapleader --- vim.g.icons_enabled = false -- disable icons in the UI (disable if no nerd font is available) diff --git a/lua/plugins/options.lua b/lua/plugins/options.lua new file mode 100644 index 0000000..f1b84d2 --- /dev/null +++ b/lua/plugins/options.lua @@ -0,0 +1,17 @@ +if true then return {} end -- REMOVE THIS LINE TO ACTIVATE THIS FILE + +return { + "AstroNvim/astrocore", + ---@type AstroCoreOpts + opts = { + options = { + opt = { + relativenumber = true, -- sets vim.opt.relativenumber + number = true, -- sets vim.opt.number + spell = false, -- sets vim.opt.spell + signcolumn = "auto", -- sets vim.opt.signcolumn to auto + wrap = false, -- sets vim.opt.wrap + }, + }, + }, +}