Skip to content

bowers-illinois-edu/astronvim-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AstroNvim Configuration

Personal AstroNvim v5+ configuration built on lazy.nvim, tailored for R language development with secondary support for Lua.

Installation

Back up any existing Neovim configuration

mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
mv ~/.local/state/nvim ~/.local/state/nvim.bak
mv ~/.cache/nvim ~/.cache/nvim.bak

Clone and launch

git clone git@github.com:bowers-illinois-edu/astronvim-config.git ~/.config/nvim
nvim

On first launch, lazy.nvim bootstraps itself (via init.lua) and installs all plugins automatically. Mason will then install lua-language-server, stylua, debugpy, and tree-sitter-cli. This takes a minute or two on the first run.

lazy-lock.json is not tracked, so new installs pull the latest compatible plugin versions. Compiled spell files (spell/*.spl) are also excluded — Neovim regenerates them from the spell/*.add source files automatically.

Architecture

init.lua bootstraps lazy.nvim, then calls lua/lazy_setup.lua which imports specs in this order:

  1. AstroNvim base (astronvim.plugins) — core framework
  2. AstroCommunity (lua/community.lua) — community language packs and colorschemes
  3. User plugins (lua/plugins/) — custom overrides and additions

lazy.nvim merges specs that share the same plugin name, so a user plugin file can override community or base defaults by targeting the same "Owner/Repo" string.

Key Files

File Purpose
lua/lazy_setup.lua Main lazy.nvim config; sets leader keys and import order
lua/community.lua AstroCommunity imports (Lua pack, colorschemes)
lua/plugins/astrocore.lua Vim options, keymaps, diagnostics, features
lua/plugins/astrolsp.lua LSP config: format-on-save, codelens, semantic tokens
lua/plugins/r-nvim.lua R.nvim + neotest-testthat
lua/plugins/user.lua Snacks.nvim (dashboard, picker, explorer, etc.), LuaSnip, autopairs
lua/plugins/none-ls.lua none-ls with write_good diagnostics
lua/plugins/mason.lua Mason auto-install: lua-language-server, stylua, debugpy, tree-sitter-cli

Key Customizations

  • Leader: Space / Local leader: Backslash (keeps R.nvim's \rf, \l, etc. separate from AstroNvim mappings)
  • ]b/[b for buffer navigation, gD for LSP declaration
  • Format on save enabled (1000ms timeout)
  • Codelens with auto-refresh, virtual text diagnostics on
  • Line wrap on, absolute line numbers, large file threshold at 256KB / 10,000 lines

Language Support

  • R: R.nvim (main branch, not lazy-loaded) with neotest-testthat. Uses vim.ui.open for PDFs.
  • Lua: AstroCommunity Lua pack with lua-language-server via Mason
  • Prose: write_good diagnostics via none-ls
  • Treesitter parsers: lua, vim, markdown, markdown_inline, r, rnoweb, yaml, latex, csv

Colorschemes

Active: astrodark. Available: catppuccin, solarized-osaka, monokai-pro, NeoSolarized.

Development

stylua lua/          # Format all Lua files
selene lua/          # Lint all Lua files (install selene separately)
nvim --headless "+Lazy! sync" +qa   # Sync plugins non-interactively
  • Formatter: StyLua — 120 column width, 2-space indent, no call parentheses (.stylua.toml)
  • Linter: Selene with std = "neovim" (selene.toml)

About

AstroNvim v5 user configuration for R development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages