From 02e3a6fd77ee0b8962454bb91a4cc4fb0d07f552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Wed, 28 Feb 2024 11:17:08 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(nvim):=20abbrv=20?= =?UTF-8?q?for=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lua/config/options.lua | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.config/nvim/lua/config/options.lua b/.config/nvim/lua/config/options.lua index f468070f..33ca6637 100644 --- a/.config/nvim/lua/config/options.lua +++ b/.config/nvim/lua/config/options.lua @@ -1,33 +1,34 @@ -- Options are automatically loaded before lazy.nvim startup -- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua -- Add any additional options here -local o = vim.g +local go = vim.g +local o = vim.opt -- Optimizations on startup vim.loader.enable() -- Define leader key -o.mapleader = " " -o.maplocalleader = "\\" +go.mapleader = " " +go.maplocalleader = "\\" -- Autoformat on save (Global) -o.autoformat = true +go.autoformat = true -- Font -o.gui_font_default_size = 10 -o.gui_font_size = o.gui_font_default_size -o.gui_font_face = "JetBrainsMono Nerd Font" +go.gui_font_default_size = 10 +go.gui_font_size = go.gui_font_default_size +go.gui_font_face = "JetBrainsMono Nerd Font" -- Enable EditorConfig integration -o.editorconfig = true +go.editorconfig = true -- Disable some repl providers for _, provider in ipairs({ "node", "perl", "python3", "ruby" }) do - vim.g["loaded_" .. provider .. "_provider"] = 0 + go["loaded_" .. provider .. "_provider"] = 0 end -- Root dir detection -vim.g.root_spec = { +go.root_spec = { "lsp", { ".git", "lua", ".obsidian", "package.json", "Makefile", "go.mod", "cargo.toml", "pyproject.toml", "src" }, "cwd",