You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README-en.md
+52-2Lines changed: 52 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -40,11 +40,61 @@ free to contribute by modifying the [.vim/install.sh](.vim/install.sh) in this r
40
40
To test, run [.vim/package.sh](.vim/package.sh) to generate the installation script `vimrc-install.sh`.
41
41
Then run it in Docker or other corresponding environment to test.
42
42
43
-
# Manual Install (not recommended)
43
+
## FAQs
44
+
45
+
Q: I got error whenever starting Vim:
46
+
```
47
+
coc.nvim works best on vim >= 8.2.0750 and neovim >= 0.5.0, consider upgrade your vim.
48
+
You can add this to your vimrc to avoid this message:
49
+
let g:coc_disable_startup_warning = 1
50
+
Note that some features may behave incorrectly.
51
+
```
52
+
53
+
Please upgrade to Vim 8.2 or above for best experience.
54
+
55
+
Q: I got error when editing `.cpp` files in Vim:
56
+
```
57
+
[coc.nvim] Server languageserver.ccls failed to start: Error: invalid params of initialize: expected array for /workspaceFolders
58
+
```
59
+
60
+
A: This is a bug of ccls. Please do not directly edit `.cpp` files in `/home/YourName` or `/tmp`. Create `.cpp` files in sub-folders of `/home/YourName` instead, for example:
61
+
62
+
```bash
63
+
mkdir ~/MyProject
64
+
cd~/MyProject
65
+
vim MyFile.cpp
66
+
```
67
+
68
+
Q: How to set the project root folder?
69
+
70
+
A: My Vim configuration will regard the folder where `.tasks` or `.git` is found to be the project root.
71
+
So if you are already working in a git repo then it's root will be automatically considered to be project root.
72
+
Otherwise please manually create a dummy file `.tasks` to help it determine the project root:
73
+
74
+
```bash
75
+
cd~/MyProject
76
+
touch .tasks
77
+
```
78
+
79
+
Q: Why didn't Vim auto-completition recognize my compiler flags in `CMakeLists.txt`?
80
+
81
+
A: As I said above, it regards the folder where `.tasks` or `.git` is found to be the project root.
82
+
Also it only reads compiler flags from the specific path `build/compile_commands.json`.
83
+
So make sure **the `build` folder of CMake is located in the same directory as `.tasks` or `.git`**.
84
+
And make sure you have **specified the flag `-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON`** to make CMake
85
+
generate `compile_commands.json`. (But if you use `<F5>` shortcut of my vimrc, this flag is specified automatically).
coc.nvim works best on vim >= 8.2.0750 and neovim >= 0.5.0, consider upgrade your vim.
48
+
You can add this to your vimrc to avoid this message:
49
+
let g:coc_disable_startup_warning = 1
50
+
Note that some features may behave incorrectly.
51
+
```
52
+
53
+
Please upgrade to Vim 8.2 or above for best experience.
54
+
55
+
Q: I got error when editing `.cpp` files in Vim:
56
+
```
57
+
[coc.nvim] Server languageserver.ccls failed to start: Error: invalid params of initialize: expected array for /workspaceFolders
58
+
```
59
+
60
+
A: This is a bug of ccls. Please do not directly edit `.cpp` files in `/home/YourName` or `/tmp`. Create `.cpp` files in sub-folders of `/home/YourName` instead, for example:
61
+
62
+
```bash
63
+
mkdir ~/MyProject
64
+
cd~/MyProject
65
+
vim MyFile.cpp
66
+
```
67
+
68
+
Q: How to set the project root folder?
69
+
70
+
A: My Vim configuration will regard the folder where `.tasks` or `.git` is found to be the project root.
71
+
So if you are already working in a git repo then it's root will be automatically considered to be project root.
72
+
Otherwise please manually create a dummy file `.tasks` to help it determine the project root:
73
+
74
+
```bash
75
+
cd~/MyProject
76
+
touch .tasks
77
+
```
78
+
79
+
Q: Why didn't Vim auto-completition recognize my compiler flags in `CMakeLists.txt`?
80
+
81
+
A: As I said above, it regards the folder where `.tasks` or `.git` is found to be the project root.
82
+
Also it only reads compiler flags from the specific path `build/compile_commands.json`.
83
+
So make sure **the `build` folder of CMake is located in the same directory as `.tasks` or `.git`**.
84
+
And make sure you have **specified the flag `-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON`** to make CMake
85
+
generate `compile_commands.json`. (But if you use `<F5>` shortcut of my vimrc, this flag is specified automatically).
0 commit comments