-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcoc-settings.json
172 lines (158 loc) · 4.55 KB
/
coc-settings.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
{
// autocomplete
"suggest.autoTrigger": "always",
"suggest.fixInsertedWord": true,
"suggest.noselect": false,
"suggest.triggerCompletionWait": 500,
"suggest.completionItemKindLabels": {
"keyword": "\uf1de",
"variable": "\ue79b",
"value": "\uf89f",
"operator": "\u03a8",
"constructor": "\uf0ad",
"function": "\u0192",
"reference": "\ufa46",
"constant": "\uf8fe",
"method": "\uf09a",
"struct": "\ufb44",
"class": "\uf0e8",
"interface": "\uf417",
"text": "\ue612",
"enum": "\uf435",
"enumMember": "\uf02b",
"module": "\uf40d",
"color": "\ue22b",
"property": "\ue624",
"field": "\uf9be",
"unit": "\uf475",
"event": "\ufacd",
"file": "\uf723",
"folder": "\uf114",
"snippet": "\ue60b",
"typeParameter": "\uf728",
"default": "\uf29c"
},
// coc-prettier extension
// Config resoltion order: prettierrc, editorconfig, CocConfig
"prettier.formatterPriority": 1,
// Use only local binary, do not fallback to system-wide
"prettier.onlyUseLocalVersion": true,
// Use prettier to format JS|TS files only
"prettier.disableLanguages": [
"vue",
"json",
"graphql",
// for HTML use js-beautify instead, that has richer configuration
"html"
],
// coc-html extension
"html.format.enable": true,
"html.format.endWithNewline": true,
"html.format.wrapAttributes": "force-aligned",
"html.autoClosingTags": true,
// formatting
"coc.preferences.formatOnType": true,
"coc.preferences.formatOnInsertLeave": true,
"coc.preferences.formatOnSaveFiletypes": [],
"coc.preferences.formatOnTypeFiletypes": [
"javascript",
"typescript",
"javascriptreact",
"typescriptreact"
],
// gets triggered by coc#on_enter
"coc.preferences.bracketEnterImprove": true,
"coc.preferences.colorSupport": true,
// do not use session management from Coc
"session.saveOnVimLeave": false,
// disable completion from {around,buffer,file} sources inside comment and string
"coc.source.around.disableSyntaxes": [
"comment",
"string"
],
"coc.source.buffer.disableSyntaxes": [
"comment",
"string"
],
"coc.source.file.disableSyntaxes": [
"comment",
"string"
],
// diagnostics
"diagnostic.refreshOnInsertMode": true,
"diagnostic.checkCurrentLine": true,
"diagnostic.errorSign": "",
"diagnostic.warningSign": "",
"diagnostic.infoSign": "",
"diagnostic.displayByAle": false,
// coc-diagnostic + diagnostic-languageserver, configure linter program per file
"diagnostic-languageserver.filetypes": {
"vim": "vint",
"email": "languagetool",
"markdown": [ "write-good", "markdownlint" ],
"sh": "shellcheck",
"javascript": ["eslint"],
"javascriptreact": ["eslint"],
"scss": ["stylelint"],
"sass": ["stylelint"],
"less": ["stylelint"],
"css": ["stylelint"]
},
// lists
"list.alignColumns": true,
"list.height": 15,
"list.maxPreviewHeight": 15,
"list.normalMappings": {
"<C-c>": "do:exit"
},
"list.insertMappings": {
"<C-c>": "do:exit"
},
"list.source.symbols.excludes": ["**/node_modules/**/*.*"],
"list.source.mru.maxLength": 30,
"lists.disabledLists": [
"buffers",
"colors",
"helptags",
"maps",
"marks",
"tags",
"words",
"sessions",
"cmdhistory",
"filetypes",
"lines",
"files"
],
// coc-tsserver extensions
"tsserver.npm": "/usr/local/bin/npm",
"tsserver.log": "verbose",
"tsserver.trace.server": "off",
"typescript.format.enabled": true,
"javascript.format.enabled": true,
// coc-eslint extension
// TODO: coc-eslint or coc-diagnostics?
// Optimal "eslint + prettier" combo is (*)
// - prettier-eslint, runs code through Prettier -> eslint autofix
// - eslint-plugin-prettier, do not format, but report Prettier issues as ESLint rules
// - (*) eslint-config-prettier, disable all formatting-related ESLint rules.
"eslint.autoFixOnSave": false,
// coc-snippets extension
"coc.preferences.snippets.enable": true,
"snippets.userSnippetsDirectory": "~/.vim/UltiSnips",
"snippets.extends": {
"javascriptreact": ["javascript"],
"typescript": ["javascript"]
},
// coc-css extension
"css.enable": true,
// coc-sh extension
"sh.enable": true,
// anyway it fails to parse in most cases
"sh.highlightParsingErrors": false,
// have to specify it explicitly otherwise bash language server fails to start
"sh.commandPath": "~/.config/coc/extensions/node_modules/.bin/bash-language-server",
// coc-vimlsp extension
"vimlsp.indexes.gap": 400,
"vimlsp.indexes.count": 3
}