From f6051a1f2918d3508b2e96a8d8b3f76afc3edc4f Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 17 Feb 2025 01:30:26 -0300 Subject: [PATCH] chore(neovim): format --- modules/home-manager/programs/neovim/init.lua | 4 +- .../programs/neovim/lua/lazy_setup.lua | 4 +- .../programs/neovim/lua/plugins/astrocore.lua | 34 +++--- .../programs/neovim/lua/plugins/nvim-ufo.lua | 2 +- .../neovim/lua/plugins/treesitter.lua | 104 +++++++++--------- 5 files changed, 74 insertions(+), 74 deletions(-) diff --git a/modules/home-manager/programs/neovim/init.lua b/modules/home-manager/programs/neovim/init.lua index 2ce1cdd..f05f9e8 100644 --- a/modules/home-manager/programs/neovim/init.lua +++ b/modules/home-manager/programs/neovim/init.lua @@ -11,8 +11,8 @@ vim.opt.rtp:prepend(lazypath) if not pcall(require, "lazy") then -- stylua: ignore vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {}) - vim.fn.getchar() - vim.cmd.quit() + vim.fn.getchar() + vim.cmd.quit() end require "lazy_setup" diff --git a/modules/home-manager/programs/neovim/lua/lazy_setup.lua b/modules/home-manager/programs/neovim/lua/lazy_setup.lua index 3fb71f7..2abb3b7 100644 --- a/modules/home-manager/programs/neovim/lua/lazy_setup.lua +++ b/modules/home-manager/programs/neovim/lua/lazy_setup.lua @@ -3,8 +3,8 @@ require("lazy").setup({ "AstroNvim/AstroNvim", --version = "^4", -- Remove version tracking to elect for nighly AstroNvim import = "astronvim.plugins", - opts = { -- AstroNvim options must be set here with the `import` key - mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up + opts = { -- AstroNvim options must be set here with the `import` key + mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available) pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override diff --git a/modules/home-manager/programs/neovim/lua/plugins/astrocore.lua b/modules/home-manager/programs/neovim/lua/plugins/astrocore.lua index c558b1c..ed325ae 100644 --- a/modules/home-manager/programs/neovim/lua/plugins/astrocore.lua +++ b/modules/home-manager/programs/neovim/lua/plugins/astrocore.lua @@ -11,11 +11,11 @@ return { -- Configure core features of AstroNvim features = { large_buf = { size = 1024 * 500, lines = 10000 }, -- set global limits for large files for disabling features like treesitter - autopairs = true, -- enable autopairs at start - cmp = true, -- enable completion at start - diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on) - highlighturl = true, -- highlight URLs at start - notifications = true, -- enable notifications at start + autopairs = true, -- enable autopairs at start + cmp = true, -- enable completion at start + diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on) + highlighturl = true, -- highlight URLs at start + notifications = true, -- enable notifications at start }, -- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on diagnostics = { @@ -24,20 +24,20 @@ return { }, -- vim options can be configured here options = { - opt = { -- vim.opt. - autoindent = true, -- indents automatically based on context - expandtab = true, -- use spaces instead of tabs + opt = { -- vim.opt. + autoindent = true, -- indents automatically based on context + expandtab = true, -- use spaces instead of tabs grepprg = "rg --vimgrep", -- use ripgrep on grep actions - number = true, -- sets vim.opt.number - relativenumber = true, -- sets vim.opt.relativenumber - shiftwidth = 2, -- how many spaces after indentation - signcolumn = "auto", -- sets vim.opt.signcolumn to auto - smartindent = true, -- smartly indent - spell = false, -- sets vim.opt.spell - tabstop = 2, -- how many spaces to indent when pressing tab - wrap = false, -- sets vim.opt.wrap + number = true, -- sets vim.opt.number + relativenumber = true, -- sets vim.opt.relativenumber + shiftwidth = 2, -- how many spaces after indentation + signcolumn = "auto", -- sets vim.opt.signcolumn to auto + smartindent = true, -- smartly indent + spell = false, -- sets vim.opt.spell + tabstop = 2, -- how many spaces to indent when pressing tab + wrap = false, -- sets vim.opt.wrap }, - g = { -- vim.g. + g = { -- vim.g. -- 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 diff --git a/modules/home-manager/programs/neovim/lua/plugins/nvim-ufo.lua b/modules/home-manager/programs/neovim/lua/plugins/nvim-ufo.lua index bc14746..a72804a 100644 --- a/modules/home-manager/programs/neovim/lua/plugins/nvim-ufo.lua +++ b/modules/home-manager/programs/neovim/lua/plugins/nvim-ufo.lua @@ -9,7 +9,7 @@ return { } local function handleFallbackException(bufnr, err, providerName) - if type(err) == "string" and err:match("UfoFallbackException") then + if type(err) == "string" and err:match "UfoFallbackException" then return require("ufo").getFolds(bufnr, providerName) else return require("promise").reject(err) diff --git a/modules/home-manager/programs/neovim/lua/plugins/treesitter.lua b/modules/home-manager/programs/neovim/lua/plugins/treesitter.lua index ea0dec6..27a8891 100644 --- a/modules/home-manager/programs/neovim/lua/plugins/treesitter.lua +++ b/modules/home-manager/programs/neovim/lua/plugins/treesitter.lua @@ -2,57 +2,57 @@ ---@type LazySpec return { - "nvim-treesitter/nvim-treesitter", - ---@param _ LazyPlugin - ---@param opts TSConfig - opts = function(_, opts) - -- disable automatically installing parsers - opts.auto_install = false + "nvim-treesitter/nvim-treesitter", + ---@param _ LazyPlugin + ---@param opts TSConfig + opts = function(_, opts) + -- disable automatically installing parsers + opts.auto_install = false - -- add more things to the ensure_installed table protecting against community packs modifying it - opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed --[[@as string[]], { - -- Programming - "c", - "c_sharp", - "cmake", - "cpp", - "css", - "gdscript", - "godot_resource", - "html", - "hyprlang", - "javascript", - "jsdoc", - "lua", - "nim", - "nim_format_string", - "objc", - "proto", - "python", - "razor", - "svelte", - "tsx", - "typescript", - "vue", - -- Scripting - "bash", - "fish", - "glsl", - -- Configuring - "dockerfile", - "json", - "jsonc", - "nix", - "vhs", - "yaml", - -- Misc - "cuda", - "markdown", - "markdown_inline", - "query", - -- VIM - "vim", - "vimdoc", - }) - end, + -- add more things to the ensure_installed table protecting against community packs modifying it + opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed --[[@as string[]], { + -- Programming + "c", + "c_sharp", + "cmake", + "cpp", + "css", + "gdscript", + "godot_resource", + "html", + "hyprlang", + "javascript", + "jsdoc", + "lua", + "nim", + "nim_format_string", + "objc", + "proto", + "python", + "razor", + "svelte", + "tsx", + "typescript", + "vue", + -- Scripting + "bash", + "fish", + "glsl", + -- Configuring + "dockerfile", + "json", + "jsonc", + "nix", + "vhs", + "yaml", + -- Misc + "cuda", + "markdown", + "markdown_inline", + "query", + -- VIM + "vim", + "vimdoc", + }) + end, }