-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcoc-settings.jsonc
130 lines (114 loc) · 3.88 KB
/
coc-settings.jsonc
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
// configuration file for `coc.nvim` - https://github.com/neoclide/coc.nvim
//
// defaults - https://github.com/neoclide/coc.nvim/blob/main/data/schema.json
//
// this file must be symlinked to `$HOME/.config/nvim/coc-settings.json`
// this symlinking should occur through the install script
//
// can also be done manually:
// `ln -s $DOTFILES/neovim/coc-settings.jsonc $HOME/.config/nvim/coc-settings.json`
{
// "coc.preferences.bracketEnterImprove", // how is this supposed to work
"coc.preferences.formatOnSaveFiletypes": [
"css",
"graphql",
"javascript",
"javascriptreact",
"json",
"jsonc",
"markdown",
"nix",
"python",
"rust",
"sh",
"typescript",
"typescriptreact"
],
// "coc.preferences.jumpCommand": "drop", // or something else
"coc.preferences.rootPatterns": [
".git",
".projectroot",
".vim",
"tsconfig.json"
],
// "coc.source.around" // TODO: understand sources better (buffer source?)
// how to disable LS suggestions in comments like possible for other sources?
// ref - https://github.com/neoclide/coc.nvim/wiki/Completion-with-sources
"coc.source.file.ignoreHidden": false,
// virtual text listing references & implementations
"codeLens.enable": true,
"codeLens.separator": " ‣ ",
"diagnostic.errorSign": "◉",
"diagnostic.hintSign": "◉",
"diagnostic.infoSign": "◉",
"diagnostic.virtualText": true,
"diagnostic.virtualTextPrefix": " ~ ",
"diagnostic.warningSign": "◉",
"list.indicator": "λ",
"list.nextKeymap": "<C-k>",
"list.previousKeymap": "<C-l>",
"suggest.enablePreview": true,
// <<<<<<<< extension/language server specific settings >>>>>>>>
// <<<<<<< coc-diagnostic (linting & formatting) >>>>>>>
// extension - https://github.com/iamcco/coc-diagnostic
// language server - https://github.com/iamcco/diagnostic-languageserver
"diagnostic-languageserver.filetypes": {
"sh": "shellcheck"
},
"diagnostic-languageserver.formatters": {
"shfmt": {
"command": "shfmt",
// note: `-i 2` is a single arg but must be separated to work here
"args": ["-i", "2", "-bn", "-ci", "-sr"]
}
},
"diagnostic-languageserver.formatFiletypes": {
"sh": "shfmt"
},
// custom
"languageserver": {
"nix": {
"command": "rnix-lsp",
"filetypes": ["nix"]
}
},
// <<<< eslint >>>>
// TODO: re-enable these
/* "eslint.autoFix": true, */
/* "eslint.autoFixOnSave": true, */
"eslint.filetypes": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
// <<<< python >>>>
// ref - https://github.com/neoclide/coc-python#options
// enables Microsoft PLS
// ref - https://github.com/neoclide/coc-python#optional-steps
// TODO: revisit these settings - fix auto-installing `mypy`/`black` issues
"python.formatting.provider": "black",
"python.jediEnabled": false,
"python.linting.mypyEnabled": true,
"python.linting.pylintEnabled": false,
"markdownlint.config": {
"MD005": false, // prevents indented ordered list items
"MD007": false, // unordered list endentation (prevents mixing list types)
"MD013": false, // line length
"MD014": false, // requires output for code blocks with `$` prompts
"MD024": false, // no duplicate heading
"MD026": false, // trailing punctuation
"MD032": false, // blanks around lists (also prevents mixing list types)
"MD034": false // no bare urls
},
// <<<< tsserver >>>>
// ref - https://github.com/neoclide/coc-tsserver#configuration-options
"tsserver.enableJavascript": false,
// <<<< rust-analyzer >>>>
// use `rust-analyzer` language server binary from "$PATH" for project-scoped
// installations
// refs
// - https://github.com/fannheyward/coc-rust-analyzer/issues/237
// - https://github.com/fannheyward/coc-rust-analyzer/commit/f41b29df0f26697932f364cb83f9aab2cf2a30e5
"rust-analyzer.serverPath": "rust-analyzer"
}