Update astronvim to v4
This commit is contained in:
parent
7b47fb4725
commit
cc39076825
30 changed files with 487 additions and 403 deletions
75
.config/nvim/lua/plugins/astrocore.lua
Normal file
75
.config/nvim/lua/plugins/astrocore.lua
Normal file
|
@ -0,0 +1,75 @@
|
|||
-- 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 = {
|
||||
-- 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 = 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 = {
|
||||
virtual_text = true,
|
||||
underline = true,
|
||||
},
|
||||
-- vim options can be configured here
|
||||
options = {
|
||||
opt = { -- vim.opt.<key>
|
||||
clipboard = "",
|
||||
relativenumber = true,
|
||||
number = true,
|
||||
shiftwidth = 2,
|
||||
spell = false,
|
||||
signcolumn = "yes",
|
||||
wrap = false,
|
||||
},
|
||||
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
|
||||
git_worktrees = {
|
||||
{
|
||||
toplevel = vim.env.HOME,
|
||||
gitdir = vim.env.HOME .. "/.local/share/yadm/repo.git",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- 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
|
||||
|
||||
-- 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" },
|
||||
|
||||
-- Keep cursor centered
|
||||
["<C-d>"] = { "<C-d>zz" },
|
||||
["<C-u>"] = { "<C-u>zz" },
|
||||
|
||||
-- Sibling swap
|
||||
["g>"] = {
|
||||
function() require("sibling-swap").swap_with_right() end,
|
||||
desc = "Swap with right",
|
||||
},
|
||||
["g<"] = {
|
||||
function() require("sibling-swap").swap_with_left() end,
|
||||
desc = "Swap with left",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue