Astronvim配置

真真夜夜的博客 / 2024-04-27 / 原文

开箱即用,据说lunarvim作者跑路到astronvim了

安装

git clone --depth 1 https://github.com/AstroNvim/template ~/.config/nvim
# remove template's git connection to set up your own later
rm -rf ~/.config/nvim/.git
nvim
git clone --depth 1 https://github.com/AstroNvim/template $env:LOCALAPPDATA\nvim
# remove template's git connection to set up your own later
Remove-Item $env:LOCALAPPDATA\nvim\.git -Recurse -Force
nvim

配置

  1. 安装lsp
    :LspInstall clangd
    :LspInstall pyright
    :LspInstall rust_analyzer

  2. 安装语法解析
    TSInstall cpp
    TSInstall python
    TSInstall rust

  3. 安装调试器
    DapInstall codelldb
    DapInstall python

  4. 安装格式化工具
    NullLsInstall black

安装用户配置

git clone https://github.com/username/astronvim_config ~/.config/nvim
nvim --headless -c 'quitall'

其他好用的工具

  { import = "astrocommunity.utility.noice-nvim" },
  { import = "astrocommunity.completion.cmp-cmdline" },

nvim-notify.lua

return {
  "rcarriga/nvim-notify",
  opts = {
    stages = "static",
    render = "compact",
    max_width = "30",
    fps = 5,
    level = 1,
    timeout = 1500,
  },
}