Repository: twxs/vs.language.cmake
Branch: master
Commit: 8602a1399af2
Files: 12
Total size: 43.9 KB
Directory structure:
gitextract_4gbfqk8p/
├── .gitignore
├── .vscode/
│ ├── launch.json
│ ├── settings.json
│ └── tasks.json
├── .vscodeignore
├── LICENSE
├── README.md
├── extension.ts
├── package.json
├── syntaxes/
│ ├── CMake.tmLanguage
│ └── CMakeCache.tmLanguage
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
out
node_modules
.vscode/.browse.VC.db
*.vsix
.BROWSE.VC.DB*
================================================
FILE: .vscode/launch.json
================================================
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.1.0",
"configurations": [
{
"name": "Launch Extension",
"type": "extensionHost",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
"stopOnEntry": false,
"sourceMaps": true,
"outDir": "${workspaceRoot}/out",
"preLaunchTask": "npm",
"request": "launch"
}
]
}
================================================
FILE: .vscode/settings.json
================================================
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false,
"typings": false
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"out/": true
},
"typescript.tsdk": "./node_modules/typescript/lib"
}
================================================
FILE: .vscode/tasks.json
================================================
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process
// A task runner that calls a custom npm script that compiles the extension.
{
"version": "0.1.0",
// we want to run npm
"command": "npm",
// the command is a shell script
"isShellCommand": true,
// show the output window only if unrecognized errors occur.
"showOutput": "silent",
// we run the custom script "compile" as defined in package.json
"args": ["run", "compile"],
//"args": ["-w"],
// The tsc compiler is started in watching mode
"isWatching": true,
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
"problemMatcher": "$tsc-watch"
}
================================================
FILE: .vscodeignore
================================================
.vscode/**
typings/**
**/*.ts
**/*.map
.gitignore
tsconfig.json
vsc-extension-quickstart.md
npm-debug.log
screenshots/**
typings/**/*
.vscode/**/*
tsconfig.json
.gitignore
node_modules/.bin/**
node_modules/typescript/**
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2015 Nicolas MARTIN
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# CMake For VisualStudio Code
[](https://gitter.im/twxs/vs.language.cmake?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
This extension provides support for [CMake](http://www.cmake.org/) in [Visual Studio Code](https://code.visualstudio.com/).

## Features
- Colorization
- Completion Lists

- Code comments

- Snippets


- Quick Help

- Access To Online Help
## Options
The following Visual Studio Code settings are available for the Cmake extension. These can be set in user preferences (cmd+,) or workspace settings (.vscode/settings.json).
```json
{
"cmake.cmakePath": "/path/to/cmake"
}
```
## Commands
- `CMake: Online Help` to go to the CMake online documentation (according to the current cmake version).
## Acknowledgements
This extension based on the TextMate Syntax from [this project](https://github.com/zyxar/Sublime-CMakeLists).
## Contributors
- [Stanislav Ionascu](https://github.com/stanionascu)
- [Rostislav Kondratenko](https://github.com/rkondratenko)
Feel free to contribute...
## License
[MIT](LICENSE)
================================================
FILE: extension.ts
================================================
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import {workspace, window, languages, ExtensionContext, TextDocument, DocumentSelector, Position, commands, LanguageConfiguration, CompletionItemKind, CompletionItem, SnippetString, CompletionItemProvider, Hover, HoverProvider, Disposable, CancellationToken} from 'vscode';
import util = require('util');
import child_process = require("child_process");
/// strings Helpers
function strContains(word, pattern) {
return word.indexOf(pattern) > -1;
}
function strEquals(word, pattern) {
return word == pattern;
}
/// configuration helpers
function config<T>(key: string, defaultValue?: any): T {
const cmake_conf = workspace.getConfiguration('cmake');
return cmake_conf.get<T>(key, defaultValue);
}
// copied from https://stackoverflow.com/questions/13796594/how-to-split-string-into-arguments-and-options-in-javascript
function commandArgs2Array(text: string): string[] {
const re = /^"[^"]*"$/; // Check if argument is surrounded with double-quotes
const re2 = /^([^"]|[^"].*?[^"])$/; // Check if argument is NOT surrounded with double-quotes
let arr = [];
let argPart = null;
text && text.split(" ").forEach(function(arg) {
if ((re.test(arg) || re2.test(arg)) && !argPart) {
arr.push(arg);
} else {
argPart = argPart ? argPart + " " + arg : arg;
// If part is complete (ends with a double quote), we can add it to the array
if (/"$/.test(argPart)) {
arr.push(argPart);
argPart = null;
}
}
});
return arr;
}
/// Cmake process helpers
// Simple helper function that invoke the CMAKE executable
// and return a promise with stdout
let cmake = (args: string[]): Promise<string> => {
return new Promise(function (resolve, reject) {
let cmake_config = config<string>('cmakePath', 'cmake');
let cmake_args = commandArgs2Array(cmake_config)
let cmd = child_process.spawn(cmake_args[0], cmake_args.slice(1, cmake_args.length)
.concat(args.map(arg => { return arg.replace(/\r/gm, ''); })));
let stdout: string = '';
cmd.stdout.on('data', function (data) {
var txt: string = data.toString();
stdout += txt.replace(/\r/gm, '');
});
cmd.on("error", function (error) {
if (error && (<any>error).code === 'ENOENT') {
window.showInformationMessage('The "cmake" command is not found in PATH. Install it or use `cmake.cmakePath` in the workspace settings to define the CMake executable binary.');
}
reject();
});
cmd.on('exit', function (code) {
resolve(stdout);
});
});
}
function _extractVersion(output: string): string {
let re = /cmake\s+version\s+(\d+.\d+.\d+)/;
if (re.test(output)) {
let result = re.exec(output);
return result[1];
}
return '';
}
async function cmake_version(): Promise<string> {
let cmd_output = await cmake(['--version']);
let version = _extractVersion(cmd_output);
return version;
}
// Return the url for the online help based on the cmake executable binary used
async function cmake_help_url() {
let base_url = 'https://cmake.org/cmake/help';
let version = await cmake_version();
if (version.length > 0) {
if (version >= '3.0') {
let re = /(\d+.\d+).\d+/;
version = version.replace(re, '$1/');
} else {
let older_versions = [
'2.8.12', '2.8.11', '2.8.10', '2.8.9', '2.8.8', '2.8.7', '2.8.6', '2.8.5', '2.8.4', '2.8.3', '2.8.2', '2.8.1', '2.8.0', '2.6'
];
if (older_versions.indexOf(version) == -1) {
version = 'latest/';
} else {
version = version + '/cmake.html';
}
}
} else {
version = 'latest/';
}
return base_url + '/v' + version;
}
// return the cmake command list
function cmake_help_command_list(): Promise<string> {
return cmake(['--help-command-list']);
}
function cmake_help_command(name: string): Promise<string> {
return cmake_help_command_list()
.then(function (result: string) {
let contains = result.indexOf(name) > -1;
return new Promise(function (resolve, reject) {
if (contains) {
resolve(name);
} else {
reject('not found');
}
});
}, function (e) { })
.then(function (n: string) {
return cmake(['--help-command', n]);
}, null);
}
function cmake_help_variable_list(): Promise<string> {
return cmake(['--help-variable-list']);
}
function cmake_help_variable(name: string): Promise<string> {
return cmake_help_variable_list()
.then(function (result: string) {
let contains = result.indexOf(name) > -1;
return new Promise(function (resolve, reject) {
if (contains) {
resolve(name);
} else {
reject('not found');
}
});
}, function (e) { }).then(function (name: string) { return cmake(['--help-variable', name]); }, null);
}
function cmake_help_property_list(): Promise<string> {
return cmake(['--help-property-list']);
}
function cmake_help_property(name: string): Promise<string> {
return cmake_help_property_list()
.then(function (result: string) {
let contains = result.indexOf(name) > -1;
return new Promise(function (resolve, reject) {
if (contains) {
resolve(name);
} else {
reject('not found');
}
});
}, function (e) { }).then(function (name: string) { return cmake(['--help-property', name]); }, null);
}
function cmake_help_module_list(): Promise<string> {
return cmake(['--help-module-list']);
}
function cmake_help_module(name: string): Promise<string> {
return cmake_help_module_list()
.then(function (result: string) {
let contains = result.indexOf(name) > -1;
return new Promise(function (resolve, reject) {
if (contains) {
resolve(name);
} else {
reject('not found');
}
});
}, function (e) { }).then(function (name: string) { return cmake(['--help-module', name]); }, null);
}
function cmake_help_all() {
let promises = {
'function': (name: string) => {
return cmake_help_command(name);
},
'module': (name: string) => {
return cmake_help_module(name);
},
'variable': (name: string) => {
return cmake_help_variable(name);
}
,
'property': (name: string) => {
return cmake_help_property(name);
}
};
return promises;
}
async function cmake_online_help(search: string) {
let url = await cmake_help_url();
let v2x = url.endsWith('html'); // cmake < 3.0
return Promise.all([
cmCommandsSuggestionsExact(search),
cmVariablesSuggestionsExact(search),
cmModulesSuggestionsExact(search),
cmPropertiesSuggestionsExact(search),
]).then(function (results) {
var opener = require("opener");
var suggestions = Array.prototype.concat.apply([], results);
if (suggestions.length == 0) {
search = search.replace(/[<>]/g, '');
if (v2x || search.length == 0) {
opener(url);
} else {
opener(url + 'search.html?q=' + search + '&check_keywords=yes&area=default');
}
} else {
let suggestion = suggestions[0];
let type = cmakeTypeFromvscodeKind(suggestion.kind);
if (type == 'property') {
if (v2x) {
opener(url);
} else {
// TODO : needs to filter properties per scope to detect the right URL
opener(url + 'search.html?q=' + search + '&check_keywords=yes&area=default');
}
} else {
if (type == 'function') {
type = 'command';
}
search = search.replace(/[<>]/g, '');
if(v2x){
opener(url + '#' + type + ':' + search);
}else {
opener(url + type + '/' + search + '.html');
}
}
}
});
}
// this method is called when your extension is activated. activation is
// controlled by the activation events defined in package.json
export function activate(disposables: Disposable[]) {
commands.registerCommand('cmake.onlineHelp', () => {
// The code you place here will be executed every time your command is executed
// Display a message box to the user
var editor = window.activeTextEditor;
if (!editor) {
return; // No open text editor
}
var selection = editor.selection;
let document = editor.document;
let position = selection.start;
var currentWord = document.getText(selection);
let wordAtPosition = document.getWordRangeAtPosition(position);
var currentWord = '';
if (wordAtPosition && wordAtPosition.start.character < position.character) {
var word = document.getText(wordAtPosition);
currentWord = word;
}
window.showInputBox({ prompt: 'Search on Cmake online documentation', placeHolder: currentWord }).then(function (result) {
if (typeof result != 'undefined') { // Escape
if (result.length === 0) { //
result = currentWord;
}
if (result != "") {
cmake_online_help(result);
}
}
});
});
const CMAKE_LANGUAGE = 'cmake';
const CMAKE_SELECTOR: DocumentSelector = [
{ language: CMAKE_LANGUAGE, scheme: 'file' },
{ language: CMAKE_LANGUAGE, scheme: 'untitled' },
];
languages.registerHoverProvider(CMAKE_SELECTOR, new CMakeExtraInfoSupport());
languages.registerCompletionItemProvider(CMAKE_SELECTOR, new CMakeSuggestionSupport());
languages.setLanguageConfiguration(CMAKE_LANGUAGE, {
indentationRules: {
// ^(.*\*/)?\s*\}.*$
decreaseIndentPattern: /^(.*\*\/)?\s*\}.*$/,
// ^.*\{[^}"']*$
increaseIndentPattern: /^.*\{[^}"']*$/
},
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: {
lineComment: '#'
},
brackets: [
['{', '}'],
['(', ')'],
],
__electricCharacterSupport: {
brackets: [
{ tokenType: 'delimiter.curly.ts', open: '{', close: '}', isElectric: true },
{ tokenType: 'delimiter.square.ts', open: '[', close: ']', isElectric: true },
{ tokenType: 'delimiter.paren.ts', open: '(', close: ')', isElectric: true }
]
},
__characterPairSupport: {
autoClosingPairs: [
{ open: '{', close: '}' },
{ open: '(', close: ')' },
{ open: '"', close: '"', notIn: ['string'] },
]
}
});
}
// Show Tooltip on mouse over
class CMakeExtraInfoSupport implements HoverProvider {
public provideHover(document: TextDocument, position: Position, token: CancellationToken): Thenable<Hover> {
let range = document.getWordRangeAtPosition(position);
let value = document.getText(range);
let promises = cmake_help_all();
return Promise.all([
cmCommandsSuggestionsExact(value),
cmVariablesSuggestionsExact(value),
cmModulesSuggestionsExact(value),
cmPropertiesSuggestionsExact(value),
]).then(function (results) {
var suggestions = Array.prototype.concat.apply([], results);
if (suggestions.length == 0) {
return null;
}
let suggestion: CompletionItem = suggestions[0];
return promises[cmakeTypeFromvscodeKind(suggestion.kind)](suggestion.label).then(function (result: string) {
let lines = result.split('\n');
lines = lines.slice(2, lines.length);
let hover = new Hover({ language: 'md', value: lines.join('\n') });
return hover;
});
});
}
}
function vscodeKindFromCMakeCodeClass(kind: string): CompletionItemKind {
switch (kind) {
case "function":
return CompletionItemKind.Function;
case "variable":
return CompletionItemKind.Variable;
case "module":
return CompletionItemKind.Module;
}
return CompletionItemKind.Property; // TODO@EG additional mappings needed?
}
function cmakeTypeFromvscodeKind(kind: CompletionItemKind): string {
switch (kind) {
case CompletionItemKind.Function:
return "function";
case CompletionItemKind.Variable:
return "variable";
case CompletionItemKind.Module:
return "module";
}
return "property";
}
function suggestionsHelper(cmake_cmd, currentWord: string, type: string, insertText, matchPredicate): Thenable<CompletionItem[]> {
return new Promise(function (resolve, reject) {
cmake_cmd.then(function (stdout: string) {
let commands = stdout.split('\n').filter(function (v) { return matchPredicate(v, currentWord) });
if (commands.length > 0) {
let suggestions = commands.map(function (command_name) {
var item = new CompletionItem(command_name);
item.kind = vscodeKindFromCMakeCodeClass(type);
if (insertText == null || insertText == '') {
item.insertText = command_name;
} else {
let snippet = new SnippetString(insertText(command_name));
item.insertText = snippet;
}
return item;
});
resolve(suggestions);
} else {
resolve([]);
}
}).catch(function (err) {
reject(err);
});
});
}
function cmModuleInsertText(module: string) {
if (module.indexOf('Find') == 0) {
return 'find_package(' + module.replace('Find', '') + '${1: REQUIRED})';
} else {
return 'include(' + module + ')';
}
}
function cmFunctionInsertText(func: string) {
let scoped_func = ['if', 'function', 'while', 'macro', 'foreach'];
let is_scoped = scoped_func.reduceRight(function (prev, name, idx, array) { return prev || func == name; }, false);
if (is_scoped)
return func + '(${1})\n\t\nend' + func + '(${1})\n';
else
return func + '(${1})'
}
function cmVariableInsertText(variable: string) {
return variable.replace(/<(.*)>/g, '${1:<$1>}');
}
function cmPropetryInsertText(variable: string) {
return variable.replace(/<(.*)>/g, '${1:<$1>}');
}
function cmCommandsSuggestions(currentWord: string): Thenable<CompletionItem[]> {
let cmd = cmake_help_command_list();
return suggestionsHelper(cmd, currentWord, 'function', cmFunctionInsertText, strContains);
}
function cmVariablesSuggestions(currentWord: string): Thenable<CompletionItem[]> {
let cmd = cmake_help_variable_list();
return suggestionsHelper(cmd, currentWord, 'variable', cmVariableInsertText, strContains);
}
function cmPropertiesSuggestions(currentWord: string): Thenable<CompletionItem[]> {
let cmd = cmake_help_property_list();
return suggestionsHelper(cmd, currentWord, 'property', cmPropetryInsertText, strContains);
}
function cmModulesSuggestions(currentWord: string): Thenable<CompletionItem[]> {
let cmd = cmake_help_module_list();
return suggestionsHelper(cmd, currentWord, 'module', cmModuleInsertText, strContains);
}
function cmCommandsSuggestionsExact(currentWord: string): Thenable<CompletionItem[]> {
let cmd = cmake_help_command_list();
return suggestionsHelper(cmd, currentWord, 'function', cmFunctionInsertText, strEquals);
}
function cmVariablesSuggestionsExact(currentWord: string): Thenable<CompletionItem[]> {
let cmd = cmake_help_variable_list();
return suggestionsHelper(cmd, currentWord, 'variable', cmVariableInsertText, strEquals);
}
function cmPropertiesSuggestionsExact(currentWord: string): Thenable<CompletionItem[]> {
let cmd = cmake_help_property_list();
return suggestionsHelper(cmd, currentWord, 'property', cmPropetryInsertText, strEquals);
}
function cmModulesSuggestionsExact(currentWord: string): Thenable<CompletionItem[]> {
let cmd = cmake_help_module_list();
return suggestionsHelper(cmd, currentWord, 'module', cmModuleInsertText, strEquals);
}
class CMakeSuggestionSupport implements CompletionItemProvider {
public triggerCharacters: string[];
public excludeTokens: string[] = ['string', 'comment', 'numeric'];
public provideCompletionItems(document: TextDocument, position: Position, token: CancellationToken): Thenable<CompletionItem[]> {
let wordAtPosition = document.getWordRangeAtPosition(position);
var currentWord = '';
if (wordAtPosition && wordAtPosition.start.character < position.character) {
var word = document.getText(wordAtPosition);
currentWord = word.substr(0, position.character - wordAtPosition.start.character);
}
return new Promise(function (resolve, reject) {
Promise.all([
cmCommandsSuggestions(currentWord),
cmVariablesSuggestions(currentWord),
cmPropertiesSuggestions(currentWord),
cmModulesSuggestions(currentWord)
]).then(function (results) {
var suggestions = Array.prototype.concat.apply([], results);
resolve(suggestions);
}).catch(err => { reject(err); });
});
}
public resolveCompletionItem(item: CompletionItem, token: CancellationToken): Thenable<CompletionItem> {
let promises = cmake_help_all();
let type = cmakeTypeFromvscodeKind(item.kind);
return promises[type](item.label).then(function (result: string) {
item.documentation = result.split('\n')[3];
return item;
});
}
}
// CMake Language Definition
// class CMakeLanguageDef /*implements LanguageConfiguration*/ {
// public comments = {
// lineComment: '#',
// }
// public name:string = 'cmake';
// public displayName:string= 'Cmake';
// public ignoreCase: boolean = true;
// public lineComment: string = '#';
// public autoClosingPairs:string[][] = [
// ['{', '}'],
// ['"', '"']];
// public keywords :string[] = [
// 'if', 'endif', 'else',
// 'foreach', 'endforeach',
// 'function', 'endfunction',
// 'macro', 'endmacro',
// 'include',
// 'set',
// 'project'
// ];
// public brackets = [
// { token: 'delimiter.parenthesis', open: '(', close: ')' },
// ];
// public textAfterBrackets:boolean = true;
// public variable= /\$\{\w+\}/;
// public enhancedBrackets = [
// {
// openTrigger: '\)',
// open: /if\((\w*)\)/i,
// closeComplete: 'endif\($1\)',
// matchCase: true,
// closeTrigger: '\)',
// close: /endif\($1\)$/,
// tokenType: 'keyword.tag-if'
// },
// {
// openTrigger: '\)',
// open: /foreach\((\w*)\)/i,
// closeComplete: 'endforeach\($1\)',
// matchCase: true,
// closeTrigger: '\)',
// close: /endforeach\($1\)$/,
// tokenType: 'keyword.tag-foreach'
// },
// {
// openTrigger: '\)',
// open: /function\((\w+)\)/i,
// closeComplete: 'endfunction\($1\)',
// matchCase: true,
// closeTrigger: '\)',
// close: /function\($1\)$/,
// tokenType: 'keyword.tag-function'
// },
// {
// openTrigger: '\)',
// open: /macro\((\w+)\)/i,
// closeComplete: 'endmacro\($1\)',
// matchCase: true,
// closeTrigger: '\)',
// close: /macro\($1\)$/,
// tokenType: 'keyword.tag-macro'
// }
// ];
// // we include these common regular expressions
// public symbols = /[=><!~?&|+\-*\/\^;\.,]+/;
// public escapes= /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/;
// // The main tokenizer for our languages
// public tokenizer= {
// root: [
// [/([a-zA-Z_]\w*)( *\()/, [{cases: { '@keywords': { token: 'keyword.$0' } , '@default': 'identifier.method'}}, '']],
// { include: '@whitespace' },
// [/\$\{\w+\}/, 'variable'],
// [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
// [/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'],
// [/\d+/, 'number'],
// [/"/, 'string', '@string."'],
// [/'/, 'string', '@string.\''],
// ],
// whitespace: [
// [/[ \t\r\n]+/, ''],
// [/#.*$/, 'comment'],
// ],
// string: [
// [/[^\\"'%]+/, { cases: { '@eos': { token: 'string', next: '@popall' }, '@default': 'string' } }],
// [/@escapes/, 'string.escape'],
// [/\\./, 'string.escape.invalid'],
// [/\$\{[\w ]+\}/, 'variable'],
// [/["']/, { cases: { '$#==$S2': { token: 'string', next: '@pop' }, '@default': 'string' } }],
// [/$/, 'string', '@popall']
// ],
// };
// }
================================================
FILE: package.json
================================================
{
"name": "cmake",
"version": "0.0.17",
"publisher": "twxs",
"displayName": "CMake",
"description": "CMake language support for Visual Studio Code",
"author": {
"name": "Nicolas Martin"
},
"repository": {
"type": "git",
"url": "https://github.com/twxs/vs.language.cmake.git"
},
"bugs": {
"url": "https://github.com/twxs/vs.language.cmake/issues"
},
"homepage": "https://github.com/twxs/vs.language.cmake/blob/master/README.md",
"keywords": [
"CMake",
"Syntax"
],
"categories": [
"Languages", "Snippets", "Other"
],
"icon": "images/icon.png",
"galleryBanner": {
"color": "#5c2d91",
"theme": "dark"
},
"license": "MIT",
"activationEvents": [
"onLanguage:cmake"
],
"engines": {
"vscode": "^1.10.0"
},
"main": "./out/extension",
"contributes": {
"languages": [
{
"id": "cmake",
"extensions": [
".cmake"
],
"filenames": [
"CMakelists.txt"
],
"aliases": [
"CMake"
]
},
{
"id": "cmake-cache",
"filenames": [
"CMakeCache.txt"
],
"aliases": [
"CMake Cache"
]
}
],
"commands": [
{
"command": "cmake.onlineHelp",
"title": "CMake: Online Help"
}
],
"grammars": [
{
"language": "cmake",
"scopeName": "source.cmake",
"path": "./syntaxes/CMake.tmLanguage"
},
{
"language": "cmake-cache",
"scopeName": "source.cmakecache",
"path": "./syntaxes/CMakeCache.tmLanguage"
}
],
"configuration": {
"title": "CMake configuration",
"properties": {
"cmake.cmakePath": {
"type": "string",
"default": "cmake",
"description": "The path to CMake generator executable"
}
}
}
},
"scripts": {
"vscode:prepublish": "tsc -p ./",
"compile": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install"
},
"dependencies": {
"opener": "^1.4.2"
},
"devDependencies": {
"typescript": "^2.0.9",
"vscode": "^1.0.3",
"@types/node": "^6.0.47",
"mocha": "^3.1.2",
"@types/mocha": "^2.2.33"
}
}
================================================
FILE: syntaxes/CMake.tmLanguage
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>cmake</string>
<string>CMakeLists.txt</string>
</array>
<key>name</key>
<string>CMake</string>
<key>patterns</key>
<array>
<dict>
<key>comment</key>
<string>Variables That Describe the System</string>
<key>match</key>
<string>\b(?i:APPLE|BORLAND|(CMAKE_)?(CL_64|COMPILER_2005|HOST_APPLE|HOST_SYSTEM|HOST_SYSTEM_NAME|HOST_SYSTEM_PROCESSOR|HOST_SYSTEM_VERSION|HOST_UNIX|HOST_WIN32|LIBRARY_ARCHITECTURE|LIBRARY_ARCHITECTURE_REGEX|OBJECT_PATH_MAX|SYSTEM|SYSTEM_NAME|SYSTEM_PROCESSOR|SYSTEM_VERSION)|CYGWIN|MSVC|MSVC80|MSVC_IDE|MSVC_VERSION|UNIX|WIN32|XCODE_VERSION|MSVC60|MSVC70|MSVC90|MSVC71)\b</string>
<key>name</key>
<string>constant.source.cmake</string>
</dict>
<dict>
<key>comment</key>
<string>cmakeOperators</string>
<key>match</key>
<string>\b(?i:ABSOLUTE|AND|BOOL|CACHE|COMMAND|COMMENT|DEFINED|DOC|EQUAL|EXISTS|EXT|FALSE|GREATER|GREATER_EQUAL|INTERNAL|IN_LIST|IS_ABSOLUTE|IS_DIRECTORY|IS_NEWER_THAN|IS_SYMLINK|LESS|LESS_EQUAL|MATCHES|NAME|NAMES|NAME_WE|NOT|OFF|ON|OR|PATH|PATHS|POLICY|PROGRAM|STREQUAL|STRGREATER|STRGREATER_EQUAL|STRING|STRLESS|STRLESS_EQUAL|TARGET|TEST|TRUE|VERSION_EQUAL|VERSION_GREATER|VERSION_GREATER_EQUAL|VERSION_LESS)\b</string>
<key>name</key>
<string>keyword.cmake</string>
</dict>
<dict>
<key>comment</key>
<string>Commands</string>
<key>match</key>
<string>^\s*\b(?i:add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_libraries|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)\b</string>
<key>name</key>
<string>keyword.cmake</string>
</dict>
<dict>
<key>comment</key>
<string>Variables That Change Behavior</string>
<key>match</key>
<string>\b(?i:BUILD_SHARED_LIBS|(CMAKE_)?(ABSOLUTE_DESTINATION_FILES|AUTOMOC_RELAXED_MODE|BACKWARDS_COMPATIBILITY|BUILD_TYPE|COLOR_MAKEFILE|CONFIGURATION_TYPES|DEBUG_TARGET_PROPERTIES|DISABLE_FIND_PACKAGE_\w+|FIND_LIBRARY_PREFIXES|FIND_LIBRARY_SUFFIXES|IGNORE_PATH|INCLUDE_PATH|INSTALL_DEFAULT_COMPONENT_NAME|INSTALL_PREFIX|LIBRARY_PATH|MFC_FLAG|MODULE_PATH|NOT_USING_CONFIG_FLAGS|POLICY_DEFAULT_CMP\w+|PREFIX_PATH|PROGRAM_PATH|SKIP_INSTALL_ALL_DEPENDENCY|SYSTEM_IGNORE_PATH|SYSTEM_INCLUDE_PATH|SYSTEM_LIBRARY_PATH|SYSTEM_PREFIX_PATH|SYSTEM_PROGRAM_PATH|USER_MAKE_RULES_OVERRIDE|WARN_ON_ABSOLUTE_INSTALL_DESTINATION))\b</string>
<key>name</key>
<string>variable.source.cmake</string>
</dict>
<dict>
<key>match</key>
<string>\$\{\w+\}</string>
<key>name</key>
<string>storage.source.cmake</string>
</dict>
<dict>
<key>match</key>
<string>\$ENV\{\w+\}</string>
<key>name</key>
<string>storage.source.cmake</string>
</dict>
<dict>
<key>comment</key>
<string>Variables that Control the Build</string>
<key>match</key>
<string>\b(?i:(CMAKE_)?(\w+_POSTFIX|ARCHIVE_OUTPUT_DIRECTORY|AUTOMOC|AUTOMOC_MOC_OPTIONS|BUILD_WITH_INSTALL_RPATH|DEBUG_POSTFIX|EXE_LINKER_FLAGS|EXE_LINKER_FLAGS_\w+|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GNUtoMS|INCLUDE_CURRENT_DIR|INCLUDE_CURRENT_DIR_IN_INTERFACE|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_PATH_FLAG|LINK_DEF_FILE_FLAG|LINK_DEPENDS_NO_SHARED|LINK_INTERFACE_LIBRARIES|LINK_LIBRARY_FILE_FLAG|LINK_LIBRARY_FLAG|MACOSX_BUNDLE|NO_BUILTIN_CHRPATH|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|RUNTIME_OUTPUT_DIRECTORY|SKIP_BUILD_RPATH|SKIP_INSTALL_RPATH|TRY_COMPILE_CONFIGURATION|USE_RELATIVE_PATHS|WIN32_EXECUTABLE)|EXECUTABLE_OUTPUT_PATH|LIBRARY_OUTPUT_PATH)\b</string>
<key>name</key>
<string>variable.source.cmake</string>
</dict>
<dict>
<key>comment</key>
<string>Variables that Provide Information</string>
<key>match</key>
<string>\b(?i:CMAKE_(AR|ARGC|ARGV0|BINARY_DIR|BUILD_TOOL|CACHEFILE_DIR|CACHE_MAJOR_VERSION|CACHE_MINOR_VERSION|CACHE_PATCH_VERSION|CFG_INTDIR|COMMAND|CROSSCOMPILING|CTEST_COMMAND|CURRENT_BINARY_DIR|CURRENT_LIST_DIR|CURRENT_LIST_FILE|CURRENT_LIST_LINE|CURRENT_SOURCE_DIR|DL_LIBS|EDIT_COMMAND|EXECUTABLE_SUFFIX|EXTRA_GENERATOR|EXTRA_SHARED_LIBRARY_SUFFIXES|GENERATOR|HOME_DIRECTORY|IMPORT_LIBRARY_PREFIX|IMPORT_LIBRARY_SUFFIX|LINK_LIBRARY_SUFFIX|MAJOR_VERSION|MAKE_PROGRAM|MINOR_VERSION|PARENT_LIST_FILE|PATCH_VERSION|PROJECT_NAME|RANLIB|ROOT|SCRIPT_MODE_FILE|SHARED_LIBRARY_PREFIX|SHARED_LIBRARY_SUFFIX|SHARED_MODULE_PREFIX|SHARED_MODULE_SUFFIX|SIZEOF_VOID_P|SKIP_RPATH|SOURCE_DIR|STANDARD_LIBRARIES|STATIC_LIBRARY_PREFIX|STATIC_LIBRARY_SUFFIX|TWEAK_VERSION|USING_VC_FREE_TOOLS|VERBOSE_MAKEFILE|VERSION)|PROJECT_BINARY_DIR|PROJECT_NAME|PROJECT_SOURCE_DIR|\w+_BINARY_DIR|\w+__SOURCE_DIR)\b</string>
<key>name</key>
<string>variable.source.cmake</string>
</dict>
<dict>
<key>comment</key>
<string>BracketArgs</string>
<key>begin</key>
<string>#\[(=*)\[</string>
<key>end</key>
<string>\]\1\]</string>
<key>name</key>
<string>comment.source.cmake</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\(.|$)</string>
<key>name</key>
<string>constant.character.escape</string>
</dict>
</array>
</dict>
<dict>
<key>comment</key>
<string>BracketArgs</string>
<key>begin</key>
<string>\[(=*)\[</string>
<key>end</key>
<string>\]\1\]</string>
<key>name</key>
<string>argument.source.cmake</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\(.|$)</string>
<key>name</key>
<string>constant.character.escape</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>#+.*$</string>
<key>name</key>
<string>comment.source.cmake</string>
</dict>
<dict>
<key>comment</key>
<string>Properties on Cache Entries</string>
<key>match</key>
<string>\b(?i:ADVANCED|HELPSTRING|MODIFIED|STRINGS|TYPE|VALUE)\b</string>
<key>name</key>
<string>entity.source.cmake</string>
</dict>
<dict>
<key>comment</key>
<string>Properties on Source Files</string>
<key>match</key>
<string>\b(?i:ABSTRACT|COMPILE_DEFINITIONS|COMPILE_DEFINITIONS_<CONFIG>|COMPILE_FLAGS|EXTERNAL_OBJECT|Fortran_FORMAT|GENERATED|HEADER_FILE_ONLY|KEEP_EXTENSION|LABELS|LANGUAGE|LOCATION|MACOSX_PACKAGE_LOCATION|OBJECT_DEPENDS|OBJECT_OUTPUTS|SYMBOLIC|WRAP_EXCLUDE)\b</string>
<key>name</key>
<string>entity.source.cmake</string>
</dict>
<dict>
<key>comment</key>
<string>Properties on Tests</string>
<key>match</key>
<string>\b(?i:ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|COST|DEPENDS|ENVIRONMENT|FAIL_REGULAR_EXPRESSION|LABELS|MEASUREMENT|PASS_REGULAR_EXPRESSION|PROCESSORS|REQUIRED_FILES|RESOURCE_LOCK|RUN_SERIAL|TIMEOUT|WILL_FAIL|WORKING_DIRECTORY)\b</string>
<key>name</key>
<string>entity.source.cmake</string>
</dict>
<dict>
<key>comment</key>
<string>Properties on Directories</string>
<key>match</key>
<string>\b(?i:ADDITIONAL_MAKE_CLEAN_FILES|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMPILE_DEFINITIONS|COMPILE_DEFINITIONS_\w+|DEFINITIONS|EXCLUDE_FROM_ALL|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INTERPROCEDURAL_OPTIMIZATION|INTERPROCEDURAL_OPTIMIZATION_\w+|LINK_DIRECTORIES|LISTFILE_STACK|MACROS|PARENT_DIRECTORY|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|TEST_INCLUDE_FILE|VARIABLES|VS_GLOBAL_SECTION_POST_\w+|VS_GLOBAL_SECTION_PRE_\w+)\b</string>
<key>name</key>
<string>entity.source.cmake</string>
</dict>
<dict>
<key>comment</key>
<string>Properties of Global Scope</string>
<key>match</key>
<string>\b(?i:ALLOW_DUPLICATE_CUSTOM_TARGETS|DEBUG_CONFIGURATIONS|DISABLED_FEATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|IN_TRY_COMPILE|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PREDEFINED_TARGETS_FOLDER|REPORT_UNDEFINED_PROPERTIES|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_SUPPORTS_SHARED_LIBS|USE_FOLDERS|__CMAKE_DELETE_CACHE_CHANGE_VARS_)\b</string>
<key>name</key>
<string>entity.source.cmake</string>
</dict>
<dict>
<key>comment</key>
<string>Properties on Targets</string>
<key>match</key>
<string>\b(?i:\w+_(OUTPUT_NAME|POSTFIX)|ARCHIVE_OUTPUT_(DIRECTORY(_\w+)?|NAME(_\w+)?)|AUTOMOC(_MOC_OPTIONS)?|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE(_EXTENSION)?|COMPATIBLE_INTERFACE_BOOL|COMPATIBLE_INTERFACE_STRING|COMPILE_(DEFINITIONS(_\w+)?|FLAGS)|DEBUG_POSTFIX|DEFINE_SYMBOL|ENABLE_EXPORTS|EXCLUDE_FROM_ALL|EchoString|FOLDER|FRAMEWORK|Fortran_(FORMAT|MODULE_DIRECTORY)|GENERATOR_FILE_NAME|GNUtoMS|HAS_CXX|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(CONFIGURATIONS|IMPLIB(_\w+)?|LINK_DEPENDENT_LIBRARIES(_\w+)?|LINK_INTERFACE_LANGUAGES(_\w+)?|LINK_INTERFACE_LIBRARIES(_\w+)?|LINK_INTERFACE_MULTIPLICITY(_\w+)?|LOCATION(_\w+)?|NO_SONAME(_\w+)?|SONAME(_\w+)?)|IMPORT_PREFIX|IMPORT_SUFFIX|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE|INTERFACE_COMPILE_DEFINITIONS|INTERFACE_INCLUDE_DIRECTORIES|INTERPROCEDURAL_OPTIMIZATION|INTERPROCEDURAL_OPTIMIZATION_\w+|LABELS|LIBRARY_OUTPUT_DIRECTORY(_\w+)?|LIBRARY_OUTPUT_NAME(_\w+)?|LINKER_LANGUAGE|LINK_DEPENDS|LINK_FLAGS(_\w+)?|LINK_INTERFACE_LIBRARIES(_\w+)?|LINK_INTERFACE_MULTIPLICITY(_\w+)?|LINK_LIBRARIES|LINK_SEARCH_END_STATIC|LINK_SEARCH_START_STATIC|LOCATION(_\w+)?|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MAP_IMPORTED_CONFIG_\w+|NO_SONAME|OSX_ARCHITECTURES(_\w+)?|OUTPUT_NAME(_\w+)?|PDB_NAME(_\w+)?|POST_INSTALL_SCRIPT|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE|PRIVATE_HEADER|PROJECT_LABEL|PUBLIC|PUBLIC_HEADER|RESOURCE|RULE_LAUNCH_(COMPILE|CUSTOM|LINK)|RUNTIME_OUTPUT_(DIRECTORY(_\w+)?|NAME(_\w+)?)|SKIP_BUILD_RPATH|SOURCES|SOVERSION|STATIC_LIBRARY_FLAGS(_\w+)?|SUFFIX|TYPE|VERSION|VS_DOTNET_REFERENCES|VS_GLOBAL_(\w+|KEYWORD|PROJECT_TYPES)|VS_KEYWORD|VS_SCC_(AUXPATH|LOCALPATH|PROJECTNAME|PROVIDER)|VS_WINRT_EXTENSIONS|VS_WINRT_REFERENCES|WIN32_EXECUTABLE|XCODE_ATTRIBUTE_\w+)\b</string>
<key>name</key>
<string>entity.source.cmake</string>
</dict>
<dict>
<key>comment</key>
<!-- cf https://github.com/twxs/vs.language.cmake/issues/14 -->
<string>Escaped Strings</string>
<key>begin</key>
<string>\\"</string>
<key>end</key>
<string>\\"</string>
<key>name</key>
<string>string.source.cmake</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\(.|$)</string>
<key>name</key>
<string>constant.character.escape</string>
</dict>
</array>
</dict>
<dict>
<key>comment</key>
<string>Normal Strings</string>
<key>begin</key>
<string>"</string>
<key>end</key>
<string>"</string>
<key>name</key>
<string>string.source.cmake</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\(.|$)</string>
<key>name</key>
<string>constant.character.escape</string>
</dict>
</array>
</dict>
<dict>
<key>comment</key>
<string>Derecated keyword</string>
<key>match</key>
<string>\bBUILD_NAME\b</string>
<key>name</key>
<string>invalid.deprecated.source.cmake</string>
</dict>
<dict>
<key>comment</key>
<string>Compiler Flags</string>
<key>match</key>
<string>\b(?i:(CMAKE_)?(CXX_FLAGS|CMAKE_CXX_FLAGS_DEBUG|CMAKE_CXX_FLAGS_MINSIZEREL|CMAKE_CXX_FLAGS_RELEASE|CMAKE_CXX_FLAGS_RELWITHDEBINFO))\b</string>
<key>name</key>
<string>variable.source.cmake</string>
</dict>
</array>
<key>repository</key>
<dict>
</dict>
<key>scopeName</key>
<string>source.cmake</string>
<key>uuid</key>
<string>7aed2d59-22d9-41c8-ba9e-4f178191e380</string>
</dict>
</plist>
================================================
FILE: syntaxes/CMakeCache.tmLanguage
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>CMakeCache.txt</string>
</array>
<key>name</key>
<string>CMake</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>//+.*$|#+.*$</string>
<key>name</key>
<string>comment.source.cmakecache</string>
</dict>
<dict>
<key>comment</key>
<string>Properties on Cache Entries</string>
<key>match</key>
<string>\b-ADVANCED\b</string>
<key>name</key>
<string>entity.source.cmakecache</string>
</dict>
<dict>
<key>comment</key>
<string>Literal values</string>
<key>match</key>
<string>\b(?i:(YES|NO|ON|OFF|TRUE|FALSE|Y|N|\d+))$</string>
<key>name</key>
<string>constant.source.cmakecache</string>
</dict>
<dict>
<key>comment</key>
<string>Normal Strings</string>
<key>begin</key>
<string>=</string>
<key>end</key>
<string>$</string>
<key>name</key>
<string>string.source.cmakecache</string>
</dict>
<dict>
<key>comment</key>
<string>Cache Entry Names</string>
<key>match</key>
<string>^\b(?i:(\w+))\b</string>
<key>name</key>
<string>variable.source.cmakecache</string>
</dict>
<dict>
<key>comment</key>
<string>Cache Entry Types</string>
<key>begin</key>
<string>:</string>
<key>end</key>
<string>=</string>
<key>match</key>
<string>(BOOL|STRING|FILEPATH|PATH|STATIC|INTERNAL)</string>
<key>name</key>
<string>keyword.source.cmakecache</string>
</dict>
</array>
<key>repository</key>
<dict>
</dict>
<key>scopeName</key>
<string>source.cmakecache</string>
<key>uuid</key>
<string>b545774b-6d11-4f08-bb0a-e64cccc9528c</string>
</dict>
</plist>
================================================
FILE: tsconfig.json
================================================
{
"compilerOptions": {
"module": "commonjs",
"target": "ES6",
"outDir": "out",
"lib": [
"es6"
],
"sourceMap": true,
"rootDir": "."
},
"exclude": [
"node_modules"
]
}
gitextract_4gbfqk8p/ ├── .gitignore ├── .vscode/ │ ├── launch.json │ ├── settings.json │ └── tasks.json ├── .vscodeignore ├── LICENSE ├── README.md ├── extension.ts ├── package.json ├── syntaxes/ │ ├── CMake.tmLanguage │ └── CMakeCache.tmLanguage └── tsconfig.json
SYMBOL INDEX (38 symbols across 1 files)
FILE: extension.ts
function strContains (line 8) | function strContains(word, pattern) {
function strEquals (line 12) | function strEquals(word, pattern) {
function config (line 17) | function config<T>(key: string, defaultValue?: any): T {
function commandArgs2Array (line 23) | function commandArgs2Array(text: string): string[] {
function _extractVersion (line 73) | function _extractVersion(output: string): string {
function cmake_version (line 82) | async function cmake_version(): Promise<string> {
function cmake_help_url (line 89) | async function cmake_help_url() {
function cmake_help_command_list (line 114) | function cmake_help_command_list(): Promise<string> {
function cmake_help_command (line 118) | function cmake_help_command(name: string): Promise<string> {
function cmake_help_variable_list (line 136) | function cmake_help_variable_list(): Promise<string> {
function cmake_help_variable (line 140) | function cmake_help_variable(name: string): Promise<string> {
function cmake_help_property_list (line 155) | function cmake_help_property_list(): Promise<string> {
function cmake_help_property (line 159) | function cmake_help_property(name: string): Promise<string> {
function cmake_help_module_list (line 173) | function cmake_help_module_list(): Promise<string> {
function cmake_help_module (line 177) | function cmake_help_module(name: string): Promise<string> {
function cmake_help_all (line 191) | function cmake_help_all() {
function cmake_online_help (line 210) | async function cmake_online_help(search: string) {
function activate (line 257) | function activate(disposables: Disposable[]) {
class CMakeExtraInfoSupport (line 335) | class CMakeExtraInfoSupport implements HoverProvider {
method provideHover (line 337) | public provideHover(document: TextDocument, position: Position, token:...
function vscodeKindFromCMakeCodeClass (line 364) | function vscodeKindFromCMakeCodeClass(kind: string): CompletionItemKind {
function cmakeTypeFromvscodeKind (line 376) | function cmakeTypeFromvscodeKind(kind: CompletionItemKind): string {
function suggestionsHelper (line 389) | function suggestionsHelper(cmake_cmd, currentWord: string, type: string,...
function cmModuleInsertText (line 416) | function cmModuleInsertText(module: string) {
function cmFunctionInsertText (line 424) | function cmFunctionInsertText(func: string) {
function cmVariableInsertText (line 432) | function cmVariableInsertText(variable: string) {
function cmPropetryInsertText (line 435) | function cmPropetryInsertText(variable: string) {
function cmCommandsSuggestions (line 439) | function cmCommandsSuggestions(currentWord: string): Thenable<Completion...
function cmVariablesSuggestions (line 444) | function cmVariablesSuggestions(currentWord: string): Thenable<Completio...
function cmPropertiesSuggestions (line 450) | function cmPropertiesSuggestions(currentWord: string): Thenable<Completi...
function cmModulesSuggestions (line 455) | function cmModulesSuggestions(currentWord: string): Thenable<CompletionI...
function cmCommandsSuggestionsExact (line 460) | function cmCommandsSuggestionsExact(currentWord: string): Thenable<Compl...
function cmVariablesSuggestionsExact (line 465) | function cmVariablesSuggestionsExact(currentWord: string): Thenable<Comp...
function cmPropertiesSuggestionsExact (line 471) | function cmPropertiesSuggestionsExact(currentWord: string): Thenable<Com...
function cmModulesSuggestionsExact (line 476) | function cmModulesSuggestionsExact(currentWord: string): Thenable<Comple...
class CMakeSuggestionSupport (line 481) | class CMakeSuggestionSupport implements CompletionItemProvider {
method provideCompletionItems (line 486) | public provideCompletionItems(document: TextDocument, position: Positi...
method resolveCompletionItem (line 507) | public resolveCompletionItem(item: CompletionItem, token: Cancellation...
Condensed preview — 12 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (49K chars).
[
{
"path": ".gitignore",
"chars": 60,
"preview": "out\nnode_modules\n.vscode/.browse.VC.db\n*.vsix\n.BROWSE.VC.DB*"
},
{
"path": ".vscode/launch.json",
"chars": 442,
"preview": "// A launch configuration that compiles the extension and then opens it inside a new window\n{\n\t\"version\": \"0.1.0\",\n\t\"con"
},
{
"path": ".vscode/settings.json",
"chars": 288,
"preview": "// Place your settings in this file to overwrite default and user settings.\n{\n\t\"files.exclude\": {\n\t\t\"out\": false,\n\t\t\"typ"
},
{
"path": ".vscode/tasks.json",
"chars": 980,
"preview": "// Available variables which can be used inside of strings.\n// ${workspaceRoot}: the root folder of the team\n// ${file}:"
},
{
"path": ".vscodeignore",
"chars": 221,
"preview": ".vscode/**\ntypings/**\n**/*.ts\n**/*.map\n.gitignore\ntsconfig.json\nvsc-extension-quickstart.md\nnpm-debug.log\nscreenshots/**"
},
{
"path": "LICENSE",
"chars": 1082,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 Nicolas MARTIN\n\nPermission is hereby granted, free of charge, to any person ob"
},
{
"path": "README.md",
"chars": 1386,
"preview": "# CMake For VisualStudio Code\n\n[. The extraction includes 12 files (43.9 KB), approximately 12.3k tokens, and a symbol index with 38 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.