-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoc-settings.json
234 lines (213 loc) · 5.87 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
{
"suggest.noselect": false,
"coc.preferences.formatOnSaveFiletypes": [
"javascript",
"typescript",
"typescriptreact",
"json",
"javascriptreact",
"typescript.tsx",
"graphql",
"css",
"markdown",
"scss",
"less",
"elixir",
"eelixir",
"terraform",
"tf",
"yaml",
"yml",
"python",
"docker",
"md",
"html",
"svg",
"prisma"
],
// snippets
"snippets.userSnippetsDirectory": "~/.config/nvim/snips",
"snippets.extends": {
"typescript": ["typescriptreact"],
"javascript": ["typescriptreact", "javascriptreact"],
"javascriptreact": ["typescriptreact"],
"vimwiki": ["markdown"]
},
"markdownlint.config": {
"MD013": false,
"MD033": false,
"MD041": false
},
// elixir
// point to release distribution for lsp to have the same elixir version as your project
// need to compile and create release using the correct elixir version
// https://www.youtube.com/watch?v=FXpsUh0Hs9Y
// https://arusahni.net/blog/2020/08/elixir-vim.html
"elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh",
"diagnostic-languageserver.filetypes": {
"elixir": ["mix credo", "mix_credo_compile"],
"eelixir": ["mix credo", "mix_credo_compile"]
},
"diagnostic-languageserver.formatFiletypes": {
"elixir": "mix format",
"eelixir": "mix format"
},
"diagnostic-languageserver.mergeConfig": true,
// tsserver
// should be shortest but on backend it keeps giving me alias path even though I've removed it
"typescript.preferences.importModuleSpecifier": "shortest",
//"typescript.preferences.importModuleSpecifier": "relative",
// use typescript from node_modules
"tsserver.tsdk": "node_modules/typescript/lib",
// use tsserver from ts module in workspace. Ignore tsserver.tsdk
"tsserver.useLocalTsdk": true,
"typescript.inlayHints.functionLikeReturnTypes.enabled": true,
"typescript.preferences.autoImportFileExcludePatterns": [
"@remix-run/server-runtime",
"@remix-run/router",
"react-router",
"@radix-ui"
],
// tw
"tailwindCSS.enable": true,
"tailwindCSS.emmetCompletions": true,
"tailwindCSS.hovers": true,
"tailwindCSS.includeLanguages": {
"javascript": "javascriptreact",
"typescript": "typescriptreact"
},
// I think this is for cva
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
],
// prettier config
"prettier.semi": false,
"prettier.singleQuote": true,
"prettier.jsxSingleQuote": true,
"prettier.useTabs": true,
// eslint
"eslint.autoFixOnSave": true,
"eslint.run": "onSave",
// bigger diagnostic windows
// https://github.com/neoclide/coc.nvim/blob/master/doc/coc.txt
"diagnostic.maxWindowHeight": 160,
"diagnostic.maxWindowWidth": 160,
"diagnostic.messageTarget": "float",
"diagnostic.virtualText": true,
"diagnostic.virtualTextCurrentLineOnly": false,
"suggest.detailMaxLength": 160,
"suggest.maxPreviewWidth": 160,
"signature.maxWindowWidth": 80,
"signature.maxWindowHeight": 8,
"coc.preferences.previewMaxHeight": 16,
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"typescript": "typescriptreact",
"eelixir": "html",
"elixir": "html"
},
// disables tabnine completion for elixir since do->end relies on lsp which is slow resulting in bad ux
// also tabnine completion for elixir isn't good in the first place
// we know use end-wise so might as well bring it back
//"tabnine.disable_file_regex": ["[.]ex$", "[.]exs$"],
// git lens
//"git.addGBlameToVirtualText": true,
"languageserver": {
"terraform": {
"command": "terraform-ls",
"args": ["serve"],
"filetypes": ["terraform", "tf", "hcl"],
"initializationOptions": {},
"settings": {}
},
"tflint": {
"command": "tflint",
"args": ["--langserver"],
"filetypes": ["terraform", "tf"],
"rootPatterns": ["main.tf", "Makefile", ".git"]
},
// already included in coc-sh
//"bash": {
//"command": "bash-language-server",
//"args": ["start"],
//"filetypes": ["sh"]
//},
// kinda clunky with monorepos
//"graphql": {
//"command": "graphql-lsp",
//"trace.server": "verbose",
//"args": ["server", "-m", "stream"],
//// customize filetypes to your needs
//"filetypes": [
//"typescript",
//"typescriptreact",
//"graphql",
//"javascript",
//"javascriptreact",
//"gql"
//]
//},
"dockerfile": {
"command": "docker-langserver",
"filetypes": ["dockerfile"],
"args": ["--stdio"]
}
// install failed
//"sql": {
//"command": "sql-language-server",
//"args": ["up", "--method", "stdio"],
//"filetypes": ["sql", "mysql"]
//}
},
// import-cost
// elixir @spec suggestions
"codeLens.enable": true
//"importCost.debug": true,
//"importCost.typescriptExtensions": [
//"\\.tsx?$",
//"\\.ts?$"
//],
// Which bundle size to display
//"importCost.bundleSizeDecoration": "both",
// Display the 'calculating' decoration
//"importCost.showCalculatingDecoration": true
// explorer
// "explorer.width": 30,
// "explorer.icon.enableNerdfont": true,
// "explorer.icon.enableVimDevicons": true,
// "explorer.previewAction.onHover": true,
// "explorer.position": "right",
// "explorer.keyMappings": {
// "yp": "copyFilepath",
// "yn": "copyFilename",
// "yy": "copyFile",
// "dd": "cutFile",
// "p": "pasteFile",
// "df": "delete",
// "dF": "deleteForever",
// "a": "addFile",
// "A": "addDirectory",
// "r": "rename",
// "zh": "toggleHidden",
// "g<dot>": "toggleHidden",
// "R": "refresh",
// "?": "help",
// "q": "quit",
// "<esc>": "esc",
// "X": "systemExecute",
// "gd": "listDrive",
// "f": "search",
// "F": "searchRecursive",
// "gf": "gotoSource:file",
// "gb": "gotoSource:buffer"
// },
// "explorer.keyMappings.global": {
// "<cr>": ["expandable?", "expand", "open"],
// "t": "open:vsplit",
// "s": "open:split"
// },
// "explorer.keyMappings.global": {
// "<cr>": ["expandable?", ["expanded?", "collapse", "expand"], "open"]
// },
// "explorer.file.showHiddenFiles": true
}