@@ -7,10 +7,16 @@ function c_ins(){
7
7
sed -i " /plug#begin/aPlug 'sakhnik/nvim-gdb' , { 'branch': 'legacy' }" ~ /.config/nvim/init.vim
8
8
! ( grep -F " languageserver" ~ /.config/nvim/coc-settings.json ) && \
9
9
sed -i ' /suggest.timeout/i "languageserver": { \n "clangd": { \n "command": "clangd",\n"filetypes": ["c", "cpp", "objc", "objcpp"],\n"args": ["-background-index"]\n }\n },' ~ /.config/nvim/coc-settings.json
10
+
11
+ ! ( grep -F " leetcode_solution_filetype" ~ /.config/nvim/init.vim ) && \
12
+ cat >> ~ /.config/nvim/init.vim << END
13
+ let g:leetcode_solution_filetype='cpp'
14
+ END
15
+
10
16
}
11
17
12
18
function leetcode_ins(){
13
- ! (grep -F ' leetcode' ~ /.config/nvim/init.vim & > /dev/null ) && \
19
+ ! (grep -F ' ianding1/ leetcode' ~ /.config/nvim/init.vim & > /dev/null ) && \
14
20
pip3 install requests beautifulsoup4 && \
15
21
sed -i " /plug#begin/aPlug 'ianding1/leetcode.vim'" ~ /.config/nvim/init.vim
16
22
26
32
function python_ins(){
27
33
! ( grep -F " python.linting.enabled" ~ /.config/nvim/coc-settings.json ) && \
28
34
sed -i ' /suggest.timeout/i "python.linting.enabled": false,' ~ /.config/nvim/coc-settings.json
29
- ! ( grep -F " leetcode_solution_filetype" ~ /.config/nvim/init.vim ) && \
30
- cat >> ~ /.config/nvim/init.vim << END
31
- let g:leetcode_solution_filetype=python3
32
- END
33
-
34
35
}
36
+
35
37
function java_ins(){
36
38
! ( grep -F " leetcode_solution_filetype" ~ /.config/nvim/init.vim ) && \
37
39
cat >> ~ /.config/nvim/init.vim << END
38
- let g:leetcode_solution_filetype=java
40
+ let g:leetcode_solution_filetype=' java'
39
41
END
40
42
}
43
+
41
44
function lua_ins(){
42
45
! ( grep -F " languageserver" ~ /.config/nvim/coc-settings.json ) && \
43
46
sed -i ' /suggest.timeout/i "languageserver": {\n"lua": {\n"command": "lua-lsp",\n"filetypes": ["lua"]\n}\n },' ~ /.config/nvim/coc-settings.json
44
47
}
48
+
45
49
function bash_ins(){
46
50
! ( grep -F " languageserver" ~ /.config/nvim/coc-settings.json ) && \
47
51
sed -i ' /suggest.timeout/i "languageserver": {\n"bash": {\n"command": "bash-language-server",\n"args": ["start"],\n"filetypes": ["sh"]",ignoredRootPaths": ["~"]\n}\n},' ~ /.config/nvim/coc-settings.json
48
52
}
53
+
49
54
function fe_ins(){
50
55
echo " fe"
51
56
}
@@ -62,7 +67,7 @@ function go_ins(){
62
67
sed -i ' /suggest.timeout/i "languageserver": {\n"golang": {\n"command": "gopls",\n"filetypes": ["go"]\n}\n},' ~ /.config/nvim/coc-settings.json
63
68
! ( grep -F " leetcode_solution_filetype" ~ /.config/nvim/init.vim ) && \
64
69
cat >> ~ /.config/nvim/init.vim << END
65
- let g:leetcode_solution_filetype=golang
70
+ let g:leetcode_solution_filetype=' golang'
66
71
END
67
72
68
73
}
0 commit comments