-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
139 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "nvchad"] | ||
path = nvchad | ||
url = https://github.com/NvChad/NvChad.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
## Prerequisites | ||
|
||
This project is based on [Nvchad](https://github.com/NvChad/NvChad), and the | ||
following conditions need to be met before usage: | ||
|
||
1. [Neovim 0.9.4+](https://github.com/neovim/neovim/releases/tag/v0.9.4) | ||
2. Terminal font should be [Nerd Font](https://www.nerdfonts.com/) | ||
3. gcc | ||
4. make | ||
5. [Ripgrep](https://github.com/BurntSushi/ripgrep) (optional) | ||
|
||
## Usage | ||
|
||
### Windows Platform | ||
|
||
- Install `Neovim`, `gcc`, `make`, `ripgrep` | ||
|
||
```shell | ||
scoop install neovim gcc make ripgrep | ||
``` | ||
|
||
- Configure terminal font to be `Nerd Font` | ||
- Backup the original configuration | ||
|
||
```powersehll | ||
git clone --recurse-submodules https://github.com/resticDOG/nvim-nvchad-config.git | ||
``` | ||
|
||
- Create a symbolic link Run `powershell` (or `pwsh`) with administrator | ||
privileges: | ||
|
||
```powershell | ||
cd nvim-nvchad-config | ||
./setup.ps1 | ||
``` | ||
|
||
- Initialize | ||
|
||
```shell | ||
nvim | ||
``` | ||
|
||
### Linux Platform (TODO) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
## 前置条件 | ||
|
||
本项目基于 [Nvchad](https://github.com/NvChad/NvChad) ,使用前需要满足以下条件 | ||
|
||
1. [Neovim 0.9.4+](https://github.com/neovim/neovim/releases/tag/v0.9.4) | ||
2. 终端字体使用 [Nerd Font](https://www.nerdfonts.com/) | ||
3. gcc | ||
4. make | ||
5. [Ripgrep](https://github.com/BurntSushi/ripgrep) (可选) | ||
|
||
## 使用方式 | ||
|
||
### Windows 平台 | ||
|
||
- 安装 `Neovim`、`gcc`、`make`、`ripgrep` | ||
|
||
```shell | ||
scoop install neovim gcc make ripgrep | ||
``` | ||
|
||
- 配置终端字体为 `Nerd Font` | ||
- 备份原有配置 | ||
|
||
```powershell | ||
Test-Path $ENV:USERPROFILE\AppData\Local\nvim && Copy-Item -Recurse -Path $ENV:USERPROFILE\AppData\Local\nvim -Destination $ENV:USERPROFILE\AppData\Local\nvim-back | ||
``` | ||
|
||
- 克隆仓库 | ||
|
||
```shell | ||
git clone --recurse-submodules https://github.com/resticDOG/nvim-nvchad-config.git | ||
``` | ||
|
||
- 建立软连接 使用管理员权限打开 `powershell`(或者 `pwsh`) | ||
|
||
```powershell | ||
cd nvim-nvchad-config | ||
./setup.ps1 | ||
``` | ||
|
||
- 初始化 | ||
|
||
```shell | ||
nvim | ||
``` | ||
|
||
### Linux 平台 (TODO) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# check if run as Administrator | ||
$Current = [System.Security.Principal.WindowsIdentity]::GetCurrent() | ||
$CurrenPrincipal = New-Object System.Security.Principal.WindowsPrincipal($Current) | ||
if ( -Not $CurrenPrincipal.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)) | ||
{ | ||
Write-Host "Please run as Administrator" | ||
exit | ||
} | ||
|
||
$NvimConfigPath = "$ENV:USERPROFILE\AppData\Local\nvim" | ||
$WorkPath = "$(Get-Location)" | ||
# remove old nvim config | ||
if (Test-Path $NvimConfigPath) | ||
{ | ||
Remove-Item -Recurse -Force $NvimConfigPath | ||
} | ||
|
||
# create symbolic link | ||
New-Item -ItemType SymbolicLink -Verbose -Path $NvimConfigPath -Target "$WorkPath\nvchad" | ||
if (-Not (Test-Path $NvimConfigPath\ftplugin)) | ||
{ | ||
New-Item -ItemType SymbolicLink -Verbose -Path $NvimConfigPath\ftplugin -Target "$WorkPath\ftplugin" | ||
} | ||
if (-Not (Test-Path $NvimConfigPath\lua\custom)) | ||
{ | ||
New-Item -ItemType SymbolicLink -Verbose -Path $NvimConfigPath\lua\custom -Target "$WorkPath\lua\custom" | ||
} |