Skip to content

Instantly share code, notes, and snippets.

@Charl13
Created June 21, 2021 14:40
Show Gist options
  • Save Charl13/34ed10f05bcb1e36d67bd5d4d3d7460b to your computer and use it in GitHub Desktop.
Save Charl13/34ed10f05bcb1e36d67bd5d4d3d7460b to your computer and use it in GitHub Desktop.
coc-config.json
{
"list.maxPreviewHeight": 30,
"list.height": 20,
"explorer.icon.enableNerdfont": true,
"explorer.keyMappings.global": {
"k": "nodePrev",
"j": "nodeNext",
"*": "toggleSelection",
"<tab>": "actionMenu",
"<left>": "collapse",
"<right>": "expand",
"J": ["toggleSelection", "normal:j"],
"K": ["toggleSelection", "normal:k"],
"gl": "expandRecursive",
"gh": "collapseRecursive",
"o": "expandOrCollapse",
"<cr>": "open",
"e": "open",
"E": "openInVsplit",
"t": "openInTab",
"<bs>": "gotoParent",
"y": "copyFilepath",
"Y": "copyFilename",
"c": "copyFile",
"x": "cutFile",
"p": "pasteFile",
"d": "delete",
"D": "deleteForever",
"a": "addFile",
"A": "addDirectory",
"r": "rename",
"?": "help",
"q": "quit",
"X": "systemExecute",
"gd": "listDrive",
"f": "search",
"F": "searchRecursive",
"gf": "gotoSource:file",
"gb": "gotoSource:buffer",
"[[": "sourcePrev",
"]]": "sourceNext",
"[d": "diagnosticPrev",
"]d": "diagnosticNext",
"[c": "gitPrev",
"]c": "gitNext",
"<<": "gitStage",
">>": "gitUnstage"
},
"diagnostic.errorSign": "✘",
"diagnostic.warningSign": "",
"diagnostic.infoSign": "",
"diagnostic.checkCurrentLine": true,
"diagnostic-languageserver.filetypes": {
"php": ["phpstan", "phpcs"],
"cpp": ["cppcheck", "cpplint"],
"c": ["cppcheck", "cpplint"],
"h": ["cppcheck", "cpplint"]
},
"diagnostic-languageserver.trace.server": "verbose",
"diagnostic-languageserver.linters": {
"phpstan": {
"command": "./vendor/bin/phpstan",
"debounce": 100,
"rootPatterns": [ "composer.json", "composer.lock", "vendor", ".git" ],
"args": [ "analyze", "--error-format", "raw", "--no-progress", "--level", "5", "%file" ],
"offsetLine": 0,
"offsetColumn": 0,
"sourceName": "phpstan",
"formatLines": 1,
"formatPattern": [
"^[^:]+:(\\d+):(.*)(\\r|\\n)*$",
{
"line": 1,
"message": 2
}
]
},
"psalm": {
"command": "psalm",
"debounce": 100,
"rootPatterns": ["composer.json", "composer.lock", "vendor", ".git"],
"args": ["--output-format=emacs", "--no-progress"],
"offsetLine": 0,
"offsetColumn": 0,
"sourceName": "psalm",
"formatLines": 1,
"formatPattern": [
"^[^:]+:(\\d):(\\d):(.*)\\s-\\s(.*)(\\r|\\n)*$",
{
"line": 1,
"column": 2,
"message": 4,
"security": 3
}
],
"securities": {
"error": "error",
"warning": "warning"
},
"requiredFiles": ["psalm.xml"]
},
"phpcs": {
"command": "phpcs",
"debounce": 100,
"rootPatterns": [ "composer.json", "composer.lock", "vendor", ".git" ],
"args": ["--standard=/Users/charlie/www/pxlwidgets-codesniffer-ruleset/standards/PXLWidgets", "--report=emacs", "-s", "%file"],
"offsetLine": 0,
"offsetColumn": 0,
"sourceName": "phpcs",
"formatLines": 1,
"formatPattern": [
"^.*:(\\d+):(\\d+):\\s+(.*)\\s+-\\s+(.*)(\\r|\\n)*$",
{
"line": 1,
"column": 2,
"message": 4,
"security": 3
}
],
"securities": {
"error": "error",
"warning": "warning"
}
},
"cpplint": {
"command": "cpplint",
"args": ["%file"],
"debounce": 100,
"sourceName": "cpplint",
"offsetLine": 0,
"isStderr": true,
"isStdout": true,
"offsetColumn": 0,
"formatPattern": [
"^[^:]+:(\\d+):(\\d+)?\\s+([^:]+?)\\s\\[(\\d)\\]$",
{
"line": 1,
"endLine": 1,
"column": 2,
"message": 3,
"security": 4
}
],
"securities": {
"1": "info",
"2": "warning",
"3": "warning",
"4": "error",
"5": "error"
}
},
"cppcheck": {
"command": "cppcheck",
"args": [
"--template={line}:{column} {message} [{severity}]",
"--enable=style",
"--inconclusive",
"--quiet",
"%file"
],
"debounce": 100,
"sourceName": "cppcheck",
"isStderr": true,
"isStdout": false,
"offsetLine": 0,
"offsetColumn": 0,
"formatPattern": [
"^(\\d+):(\\d+)\\s([^\\[]+)\\s\\[(.*)\\]$",
{
"line": 1,
"endLine": 1,
"column": 2,
"message": 3,
"security": 4
}
],
"securities": {
"style": "info",
"portability": "warning",
"warning": "warning",
"performance": "warning"
}
}
},
"languageserver": {
"ccls": {
"command": "ccls",
"args": ["--log-file=/tmp/ccls.log", "-v=1"],
"filetypes": ["c", "cc", "cpp", "c++", "objc", "objcpp"],
"rootPatterns": [".ccls", "compile_commands.json"],
"initializationOptions": {
"cache": {
"directory": "/tmp/ccls"
},
"client": {
"snippetSupport": true
},
"highlight": { "lsRanges" : true },
"index": {
"onChange": true
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment