The .hexcfg¶
It is located in the user home directory, under ".hexal". The filename is .hexcfg.
At the time of writing, the default settings are:
{
"version": 1,
"centralRepositoryUrl": "https://github.com/navid-m/hexal-plugins",
"formatOnSave": false,
"trimTrailingWhitespaceOnSave": false,
"smartBackspace": true,
"autoDetectIndentationOnStartup": true,
"startupBenchmarker": false,
"syntaxHighlightPickerPreview": false,
"debugAdapter": true,
"showDiffLines": true,
"diagnosticLineHighlight": true,
"showGitIgnored": false,
"showModifiedIndicators": true,
"wordWrap": false,
"keepSidebarFocusOnOpen": true,
"confirmQuitWithoutSaving": true,
"searchMatchCaseEnabled": false
}
Note that centralRepositoryUrl is the location at which all custom, non-bundled plugins are to be placed. If you write a plugin, submit a PR to that repository to make it public.
Existing plugins can be observed under the <install-dir>/data/plugins/ directory.
The .hexdefs¶
A hexdef file is one that defines the level of support of the language, and the syntax/grammar of the language itself.
An example of a .hexdef, the omission of most keywords is intentional here to keep the example terse and brief.
{
"id": "cpp",
"name": "C++",
"extensions": [".cpp", ".cc", ".hpp", ".h"],
"fileNames": [],
"linePatterns": [],
"keywords": ["class", "struct", "namespace", "template"],
"controlStatements": ["if", "else", "for", "while", "return"],
"types": ["int", "char", "bool", "void"],
"constants": ["true", "false", "nullptr"],
"comments": {
"line": "//",
"blockStart": "/*",
"blockEnd": "*/"
},
"strings": {
"quoteCharacters": ["\"", "'"],
"escapeCharacter": "\\"
},
"numbers": true,
"indentation": {
"style": "spaces",
"width": 4,
"tabWidth": 4
},
"autoIndent": true,
"autoClose": true,
"traditionalMarkupLanguage": false,
"indentAfter": [":"],
"unindentBefore": ["}"],
"formatter": {
"command": "clang-format",
"arguments": ["--assume-filename={file}"],
"input": "stdin",
"output": "stdout",
"timeout": 15000
},
"fallbackFormatter": {
"command": "other-formatter",
"arguments": [],
"input": "stdin",
"output": "stdout"
},
"fallbackLsp": {
"name": "ccls",
"command": "ccls",
"arguments": [],
"languageId": "cpp"
},
"debugger": {
"adapter": "lldb-dap",
"arguments": [],
"configuration": {
"request": "launch",
"program": "${executable}",
"cwd": "${workspace}"
}
},
"formatOnSave": true
}