diff --git a/clang-tools-extra/clangd/schema/config.json b/clang-tools-extra/clangd/schema/config.json new file mode 100644 --- /dev/null +++ b/clang-tools-extra/clangd/schema/config.json @@ -0,0 +1,272 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "type": "object", + "additionalProperties": false, + "properties": { + "If": { + "description": "Conditions in the If block restrict when a fragment applies.", + "type": "object", + "additionalProperties": false, + "properties": { + "PathMatch": { + "description": "The file being processed must fully match a regular expression.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "PathExclude": { + "description": "The file being processed must not fully match a regular expression.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + } + }, + "CompileFlags": { + "description": "Affects how a source file is parsed.", + "type": "object", + "additionalProperties": false, + "properties": { + "Add": { + "description": "List of flags to append to the compile command.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Remove": { + "description": "List of flags to remove from the compile command", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "CompilationDatabase": { + "description": "Directory to search for compilation database (compile_commands.json etc).", + "oneOf": [ + { + "type": "string" + }, + { + "enum": [ + "Ancestors", + "None" + ] + } + ] + }, + "Compiler": { + "description": "String to replace the executable name in the compile flags. The name controls flag parsing (clang vs clang-cl), target inference (gcc-arm-noneabi) etc.", + "type": "string" + } + } + }, + "Index": { + "description": "Controls how clangd understands code outside the current file.", + "type": "object", + "additionalProperties": false, + "properties": { + "Background": { + "description": "Whether files are built in the background to produce a project index. This is checked for translation units only, not headers they include.", + "type": "string", + "enum": [ + "Build", + "Skip" + ], + "default": "Build" + }, + "External": { + "description": "Used to define an external index source", + "oneOf": [ + { + "type": "string", + "pattern": "[nN][oO][nN][eE]" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "File": { + "type": "string" + } + }, + "required": [ + "File" + ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "Server": { + "type": "string" + }, + "MountPoint": { + "type": "string" + } + }, + "required": [ + "Server" + ] + } + ] + } + } + }, + "Style": { + "description": "Describes the style of the codebase, beyond formatting", + "type": "object", + "additionalProperties": false, + "properties": { + "FullyQualifiedNamespaces": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Diagnostics": { + "type": "object", + "additionalProperties": false, + "properties": { + "Suppress": { + "description": "Diagnostic codes that should be suppressed.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "ClangTidy": { + "description": "Configure how clang-tidy runs over your files. The settings are merged with any settings found in .clang-tidy configuration files with the ones from clangd configs taking precedence.", + "type": "object", + "additionalProperties": false, + "properties": { + "Add": { + "description": "List of checks to enable, can be globs.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "Remove": { + "description": "List of checks to disable, can be globs.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "CheckOptions": { + "description": "Key-value pairs of options for clang-tidy checks", + "type": "object" + }, + "UnusedIncludes": { + "description": "Enables Include Cleaner's unused includes diagnostics.", + "type": "string", + "enum": [ + "None", + "Strict" + ], + "default": "None" + } + } + } + } + }, + "Completion": { + "type": "object", + "additionalProperties": false, + "properties": { + "AllScopes": { + "description": "Whether code completion should include suggestions from scopes that are not visible. The required scope prefix will be inserted.", + "type": "boolean" + } + } + }, + "InlayHints": { + "description": "Configures the behaviour of the inlay-hints feature.", + "type": "object", + "additionalProperties": false, + "properties": { + "Enabled": { + "description": "A boolean that enables/disables the inlay-hints feature for all kinds, when disabled, configuration for specific kinds are ignored.", + "type": "boolean" + }, + "ParameterNames": { + "description": "A boolean that enables/disables inlay-hints for parameter names in function calls.", + "type": "boolean" + }, + "DeducedTypes": { + "description": "A boolean that enables/disables inlay-hints for deduced types.", + "type": "boolean" + }, + "Designators": { + "description": "A boolean that enables/disables inlay-hints for designators in aggregate initialization.", + "type": "boolean" + } + } + }, + "Hover": { + "description": "Configures contents of the hover cards.", + "type": "object", + "additionalProperties": false, + "properties": { + "ShowAKA": { + "description": "A boolean that controls printing of desugared types e.g: `vector::value_type (aka int)`", + "type": "boolean" + } + } + } + } +}