# my-lunarvim-configuration-lua **Repository Path**: brightmeows/my-lunarvim-configuration-lua ## Basic Information - **Project Name**: my-lunarvim-configuration-lua - **Description**: 不自己配neovim了,懒了,用lunarvim养老吧 - **Primary Language**: Lua - **License**: WTFPL - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-19 - **Last Updated**: 2024-10-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MiyakoMeow的LunarVim配置 (不自己配neovim了,懒了,用lunarvim养老吧) ## 相较于默认配置,主要更改点 - `Alt+hjkl`:切换光标窗口。 - `Alt+jknm`:`nvim-cmp`切换补全选项。 - 添加界面拆分相关快捷键。 - 自带C/C++、CMake、Rust环境配置。 - > (Rust侧需要运行`rustup add rust-analyzer`启用全部功能) - (废弃)Slint环境配置。 - [Neovide](https://neovide.dev/)下使用`ComicShannsMono Nerd Font`字体。 - > ArchLinux: package [`otf-comicshanns-nerd`](https://archlinux.org/packages/extra/any/otf-comicshanns-nerd/) in package group [`nerd-fonts`](https://archlinux.org/groups/any/nerd-fonts/). - > Windows: [下载地址](https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/ComicShannsMono.zip) - > [Nerd Fonts官网](https://www.nerdfonts.com/) ## 安装教程 ### 一、准备安装LunarVim 安装方式参考 and 所需依赖项:[LunarVim install](https://www.lunarvim.org/docs/installation) 官方文档中关于环境要求的描述: > Prerequisites > > Make sure you have installed the latest version of Neovim v0.9.0+. > Have `git`, `make`, `pip`, `python`, `npm`, `node`, `cargo` and `ripgrep` installed on your system. > Resolve EACCES permissions when installing packages globally to avoid error when installing packages with npm. > PowerShell 7+ (for Windows) > > Optional Feature Prerequisites > > Install lazygit. This enables gg to launch lazygit for intergrated and enhanced Git experience while in lvim. 满足以上要求即可。 如果需要修改安装位置,可以在安装前设置以下环境变量: - `LUNARVIM_RUNTIME_DIR` - `LUNARVIM_CONFIG_DIR` - `LUNARVIM_CACHE_DIR` - `LUNARVIM_BASE_DIR` ### 二、安装LunarVim:使用Gitee加速(1.3版本) 1. Windows下安装: ```powershell pwsh -c "`$LV_BRANCH='release-1.3/neovim-0.9'; iwr https://gitee.com/mirrors/lunarvim/raw/release-1.3/neovim-0.9/utils/installer/install.ps1 -UseBasicParsing | iex" ``` 2. Linux/MacOS下安装: ```sh LV_BRANCH='release-1.3/neovim-0.9' bash <(curl -s https://gitee.com/mirrors/lunarvim/raw/release-1.3/neovim-0.9/utils/installer/install.sh) ``` 3. Windows下卸载: ```powershell Invoke-WebRequest https://gitee.com/mirrors/lunarvim/raw/release-1.3/neovim-0.9/utils/installer/uninstall.ps1 -UseBasicParsing | Invoke-Expression ``` 4. Linux/MacOS下卸载: 使用本地文件: ```sh bash ~/.local/share/lunarvim/lvim/utils/installer/uninstall.sh ``` 使用Gitee: ```sh bash <(curl -s https://gitee.com/mirrors/lunarvim/raw/release-1.3/neovim-0.9/utils/installer/uninstall.sh) ``` ### 二、安装LunarVim:使用Gitee加速(1.4版本) 1. Windows下安装: ```powershell pwsh -c "`$LV_BRANCH='release-1.4/neovim-0.9'; iwr https://gitee.com/mirrors/lunarvim/raw/release-1.4/neovim-0.9/utils/installer/install.ps1 -UseBasicParsing | iex" ``` 2. Linux/MacOS下安装: ```sh LV_BRANCH='release-1.4/neovim-0.9' bash <(curl -s https://gitee.com/mirrors/lunarvim/raw/release-1.4/neovim-0.9/utils/installer/install.sh) ``` 3. Windows下卸载: ```powershell Invoke-WebRequest https://gitee.com/mirrors/lunarvim/raw/release-1.4/neovim-0.9/utils/installer/uninstall.ps1 -UseBasicParsing | Invoke-Expression ``` 4. Linux/MacOS下卸载: 使用本地文件: ```sh bash ~/.local/share/lunarvim/lvim/utils/installer/uninstall.sh ``` 使用Gitee: ```sh bash <(curl -s https://gitee.com/mirrors/lunarvim/raw/release-1.4/neovim-0.9/utils/installer/uninstall.sh) ``` ## 配置过程:网络加速 ### 生成SSH密钥 ```bash ssh-keygen -t rsa -C "xxx@xxx.com" ``` 然后复制`~/.ssh/id_rsa.pub`中的内容,在对应网站(如GitHub、Gitee)添加该公钥。 ### 测试SSH连接 以GitHub为例: ```bash ssh -T git@github.com ``` ### GitHub默认使用SSH进行存储库同步 ```bash git config --global --add url."git@github.com:".insteadOf "https://github.com/" ``` #### 撤销设置: 修改`~/.gitconfig`,删除相应内容即可。