Skip to content

Commit 89b05a0

Browse files
committed
feat(vim): add github copilot plugin for AI suggestions
Install copilot steps: 1) brew uninstall neovim; brew install --HEAD luajit; brew install --HEAD neovim 2) Start Neovim and invoke `:Copilot setup` https://copilot.github.com/#faqs
1 parent 8884753 commit 89b05a0

2 files changed

Lines changed: 29 additions & 17 deletions

File tree

REQUIREMENTS.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,26 @@ Install requirements for vimhack/dotfiles.
66

77
### Vim/Neovim
88

9-
- Vim 8.2+ and [Neovim 0.4.0+](https://github.com/neovim/neovim)
9+
- [Vim 8.2+](https://github.com/vim/vim)
1010

11-
```bash
11+
```sh
1212
brew install cmake python poetry mono go ruby lua@5.3 nodejs yarn ctags rg
1313

1414
brew install macvim
15+
```
16+
17+
- [Neovim 0.6+](https://github.com/neovim/neovim)
18+
19+
```sh
20+
brew uninstall neovim
1521

16-
brew install neovim
17-
pip3 install neovim
22+
brew install --HEAD luajit
23+
brew install --HEAD neovim
1824
```
1925

2026
- xkbswitch-macosx
2127

22-
```bash
28+
```sh
2329
git clone --depth=1 https://github.com/myshov/xkbswitch-macosx.git
2430
cp xkbswitch-macosx/bin/xkbswitch /usr/local/bin/
2531

@@ -29,7 +35,7 @@ cp libxkbswitch-macosx/bin/libxkbswitch.dylib /usr/local/lib/
2935

3036
- ale linters
3137

32-
```bash
38+
```sh
3339
brew install golangci-lint lua luarocks tidy-html5 shellcheck jq
3440

3541
luarocks install luacheck
@@ -47,7 +53,7 @@ sudo gem install mdl
4753

4854
- ale fixers
4955

50-
```bash
56+
```sh
5157
npm install -g prettier importjs lua-fmt
5258
pip3 install black isort
5359
go get mvdan.cc/sh/v3/cmd/shfmt
@@ -57,20 +63,20 @@ go get mvdan.cc/sh/v3/cmd/shfmt
5763

5864
- [tmux 3.0+](https://github.com/tmux/tmux)
5965

60-
```bash
66+
```sh
6167
brew install tmux
6268
```
6369

6470
- iStats
6571

66-
```bash
72+
```sh
6773
# For showing cpu temperature and fan speed in the tmux status bar.
6874
sudo gem install iStats
6975
```
7076

7177
- switchaudio-osx
7278

73-
```bash
79+
```sh
7480
# For showing audio volume status in the tmux status bar.
7581
brew install switchaudio-osx
7682
```
@@ -79,20 +85,20 @@ brew install switchaudio-osx
7985

8086
- [oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh)
8187

82-
```bash
88+
```sh
8389
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
8490
```
8591

8692
- zsh-autosuggestions
8793

88-
```bash
94+
```sh
8995
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions \
9096
${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
9197
```
9298

9399
- zsh-syntax-highlighting
94100

95-
```bash
101+
```sh
96102
git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git \
97103
${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
98104
```
@@ -108,13 +114,13 @@ ln -sf ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k/p10k.zsh $HOM
108114

109115
- [fzf](https://github.com/junegunn/fzf)
110116

111-
```bash
117+
```sh
112118
brew install fzf
113119
# To install useful key bindings and fuzzy completion:
114120
$(brew --prefix)/opt/fzf/install
115121
```
116122

117-
```bash
123+
```sh
118124
# For replace ls
119125
# doc: https://the.exa.website
120126
brew install exa
@@ -124,13 +130,13 @@ brew install exa
124130

125131
- [alacritty 0.8.0+](https://github.com/alacritty/alacritty)
126132

127-
```bash
133+
```sh
128134
brew install alacritty
129135
```
130136

131137
- Install fonts
132138

133-
```bash
139+
```sh
134140
git clone --depth=1 https://github.com/vimhack/nerd-fonts-patched.git
135141

136142
cd nerd-fonts-patched

vim/vimrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,12 @@ Plug 'Raimondi/delimitMate'
280280
" 自动补全各种括号引号以及代码的条件或循环语句的结束部分等.
281281
Plug 'cohama/lexima.vim'
282282

283+
" 著名的 AI 补全插件.
284+
" doc: https://copilot.github.com
285+
" Start Neovim and invoke :Copilot setup
286+
" NOTE: 只支持 neovim 0.6+ 版本.
287+
Plug 'github/copilot.vim'
288+
283289
" }}
284290

285291
" 代码检查 Code Static Check {{

0 commit comments

Comments
 (0)