Something went wrong. Try again.
mix of nix-managed dotfiles
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798-- if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- 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 LazySpecreturn { "AstroNvim/astrocore", ---@type AstroCoreOpts opts = { -- Configure core features of AstroNvim features = { large_buf = { size = 1024 * 256, 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 = 2, -- 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 = { virtual_text = true, underline = true, }, -- User commands registered through AstroCore commands = { Scratch = { function(opts) require("scratch").open(opts.fargs[1]) end, desc = "Open a scratchpad. Optional filetype arg enables LSP (e.g. :Scratch json)", nargs = "?", complete = "filetype", }, }, -- vim options can be configured here options = { opt = { -- vim.opt.<key> relativenumber = true, -- sets vim.opt.relativenumber number = true, -- sets vim.opt.number spell = false, -- sets vim.opt.spell signcolumn = "yes", -- sets vim.opt.signcolumn to yes wrap = true, -- sets vim.opt.wrap }, g = { -- vim.g.<key> -- 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. -- NOTE: keycodes follow the casing in the vimdocs. For example, `<Leader>` must be capitalized mappings = { -- first key is the mode n = { -- second key is the lefthand side of the map
-- open an unsaved scratchpad buffer for ad-hoc text editing ["<Leader>bs"] = { function() require("scratch").open_prompt() end, desc = "New scratchpad buffer", },
-- toggle between the light (latte) and dark (mocha) catppuccin themes ["<Leader>uT"] = { function() local target = vim.g.colors_name:match "latte" and "mocha" or "latte" vim.o.background = target == "latte" and "light" or "dark" vim.cmd.colorscheme("catppuccin-" .. target) end, desc = "Toggle catppuccin latte/mocha", },
-- navigate buffer tabs ["]b"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" }, ["[b"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
-- mappings seen under group name "Buffer" ["<Leader>bd"] = { function() require("astroui.status.heirline").buffer_picker( function(bufnr) require("astrocore.buffer").close(bufnr) end ) end, desc = "Close buffer from tabline", },
-- tables with just a `desc` key will be registered with which-key if it's installed -- this is useful for naming menus -- ["<Leader>b"] = { desc = "Buffers" },
-- setting a mapping to false will disable it -- ["<C-S>"] = false, }, }, },}