The compilation database acts in a similar way to the compilation database (compile_commands.json) used by clang-tidy, i.e. it provides additional information about the compilation of project files to help the language server. The main piece of information provided by the PDLL compilation database in this commit is the set of include directories used when processing the input .pdll file. This allows for the server to properly process .pdll files that use includes anchored by the include directories set up in the build system. The structure of the textual form of a compilation database is a yaml file containing documents of the following form: ``` --- !FileInfo: filepath: <string> - Absolute file path of the file. includes: <string> - Semi-colon delimited list of include directories. ``` This commit also adds support to cmake for automatically generating a `pdll_compile_commands.yml` file at the top-level of the build directory. Differential Revision: https://reviews.llvm.org/D124076
157 lines
3.8 KiB
JSON
157 lines
3.8 KiB
JSON
{
|
|
"name": "vscode-mlir",
|
|
"displayName": "MLIR",
|
|
"description": "MLIR Language Extension",
|
|
"version": "0.0.6",
|
|
"publisher": "llvm-vs-code-extensions",
|
|
"homepage": "https://mlir.llvm.org/",
|
|
"icon": "icon.png",
|
|
"engines": {
|
|
"vscode": "^1.52.0"
|
|
},
|
|
"categories": [
|
|
"Programming Languages"
|
|
],
|
|
"keywords": [
|
|
"LLVM",
|
|
"MLIR",
|
|
"PDLL"
|
|
],
|
|
"activationEvents": [
|
|
"onLanguage:mlir",
|
|
"onLanguage:pdll"
|
|
],
|
|
"main": "./out/extension",
|
|
"scripts": {
|
|
"vscode:prepublish": "tsc -p ./",
|
|
"compile": "tsc -watch -p ./",
|
|
"format": "clang-format -i --glob=\"{src,test}/*.ts\"",
|
|
"package": "vsce package",
|
|
"publish": "vsce publish",
|
|
"git-clang-format": "git-clang-format"
|
|
},
|
|
"dependencies": {
|
|
"chokidar": "3.5.2",
|
|
"vscode-languageclient": "^5.2.1",
|
|
"vscode-languageserver-types": "3.16.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/mocha": "^5.2.0",
|
|
"@types/node": "^8.0.0",
|
|
"@types/vscode": "1.52.*",
|
|
"clang-format": "1.4.0",
|
|
"tslint": "^5.16.0",
|
|
"typescript": "^3.5.1",
|
|
"vsce": "^1.75.0",
|
|
"vscode-test": "^1.3.0"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/llvm/vscode-mlir.git"
|
|
},
|
|
"contributes": {
|
|
"languages": [
|
|
{
|
|
"id": "mlir",
|
|
"aliases": [
|
|
"MLIR",
|
|
"mlir"
|
|
],
|
|
"extensions": [
|
|
".mlir"
|
|
],
|
|
"configuration": "./language-configuration.json"
|
|
},
|
|
{
|
|
"id": "mlir-injection"
|
|
},
|
|
{
|
|
"id": "pdll",
|
|
"aliases": [
|
|
"PDLL",
|
|
"pdll"
|
|
],
|
|
"extensions": [
|
|
".pdll"
|
|
],
|
|
"configuration": "./pdll-language-configuration.json"
|
|
}
|
|
],
|
|
"grammars": [
|
|
{
|
|
"language": "mlir",
|
|
"scopeName": "source.mlir",
|
|
"path": "./grammar.json"
|
|
},
|
|
{
|
|
"language": "mlir-injection",
|
|
"scopeName": "markdown.mlir.codeblock",
|
|
"path": "markdown-grammar.json",
|
|
"injectTo": [
|
|
"text.html.markdown"
|
|
],
|
|
"embeddedLanguages": {
|
|
"meta.embedded.block.mlir": "mlir"
|
|
}
|
|
},
|
|
{
|
|
"scopeName": "source.cpp.mlir",
|
|
"path": "./cpp-grammar.json",
|
|
"injectTo": [
|
|
"source.cpp"
|
|
],
|
|
"embeddedLanguages": {
|
|
"source.mlir": "mlir"
|
|
}
|
|
},
|
|
{
|
|
"language": "pdll",
|
|
"scopeName": "source.pdll",
|
|
"path": "./pdll-grammar.json"
|
|
}
|
|
],
|
|
"configuration": {
|
|
"type": "object",
|
|
"title": "MLIR",
|
|
"properties": {
|
|
"mlir.server_path": {
|
|
"scope": "resource",
|
|
"type": "string",
|
|
"description": "The file path of the mlir-lsp-server executable."
|
|
},
|
|
"mlir.pdll_server_path": {
|
|
"scope": "resource",
|
|
"type": "string",
|
|
"description": "The file path of the mlir-pdll-lsp-server executable."
|
|
},
|
|
"mlir.pdll_compilation_databases": {
|
|
"scope": "resource",
|
|
"type": "array",
|
|
"description": "A list of `pdll_compile_commands.yml` database files containing information about .pdll files processed by the server."
|
|
},
|
|
"mlir.onSettingsChanged": {
|
|
"type": "string",
|
|
"default": "prompt",
|
|
"description": "Action taken when a setting change requires a server restart to take effect.",
|
|
"enum": [
|
|
"prompt",
|
|
"restart",
|
|
"ignore"
|
|
],
|
|
"enumDescriptions": [
|
|
"Prompt the user for restarting the server",
|
|
"Automatically restart the server",
|
|
"Do nothing"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"commands": [
|
|
{
|
|
"command": "mlir.restart",
|
|
"title": "mlir: Restart language server"
|
|
}
|
|
]
|
|
}
|
|
}
|