Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

Features:

- Add support for CMake Language Support natively in this extension. [#3559](https://github.com/microsoft/vscode-cmake-tools/issues/3559)
- Upgrade `cmake_minimum_required` version 3.0.0 -> 3.5.0. [#3793](https://github.com/microsoft/vscode-cmake-tools/issues/3793)

Improvements:
Expand Down
2 changes: 1 addition & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Explore the [CMake Tools documentation](README.md)

## What about CMake language support?

We support CMake language support natively in the CMake Tools extension.
CMake Tools was created separately from the [CMake extension](https://marketplace.visualstudio.com/items?itemName=twxs.cmake), which provides language coloring and autocompletion support.

## How do I learn about CMake?

Expand Down
40 changes: 5 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
},
"categories": [
"Other",
"Debuggers",
"Programming Languages"
"Debuggers"
],
"galleryBanner": {
"color": "#13578c",
Expand Down Expand Up @@ -62,30 +61,10 @@
"workspaceContains:*/*/CMakeLists.txt",
"workspaceContains:*/*/*/CMakeLists.txt",
"workspaceContains:.vscode/cmake-kits.json",
"onFileSystem:cmake-tools-schema",
"onLanguage:cmake"
"onFileSystem:cmake-tools-schema"
],
"main": "./dist/main",
"contributes": {
"languages": [
{
"id": "cmake",
"extensions": [
".cmake"
],
"filenames": ["CMakeLists.txt"],
"aliases": [
"CMake"
]
},
{
"id": "cmake-cache",
"filenames": ["CMakeCache.txt"],
"aliases": [
"CMake Cache"
]
}
],
"commands": [
{
"command": "cmake.openCMakePresets",
Expand Down Expand Up @@ -850,18 +829,6 @@
"category": "CMake"
}
],
"grammars": [
{
"language": "cmake",
"scopeName": "source.cmake",
"path": "./syntaxes/CMake.tmLanguage"
},
{
"language": "cmake-cache",
"scopeName": "source.cmakecache",
"path": "./syntaxes/CMakeCache.tmLanguage"
}
],
"taskDefinitions": [
{
"type": "cmake",
Expand Down Expand Up @@ -3800,5 +3767,8 @@
"minimatch": "^3.0.5",
"**/braces": "^3.0.3"
},
"extensionPack": [
"twxs.cmake"
],
"packageManager": "[email protected]"
}
35 changes: 0 additions & 35 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2333,41 +2333,6 @@ export async function activate(context: vscode.ExtensionContext): Promise<api.CM
await vscode.window.showWarningMessage(localize('uninstall.old.cmaketools', 'Please uninstall any older versions of the CMake Tools extension. It is now published by Microsoft starting with version 1.2.0.'));
}

const CMAKE_LANGUAGE = "cmake";

vscode.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'] }
]
}
});

if (vscode.workspace.getConfiguration('cmake').get('showOptionsMovedNotification')) {
void vscode.window.showInformationMessage(
localize('options.moved.notification.body', "Some status bar options in CMake Tools have now moved to the Project Status View in the CMake Tools sidebar. You can customize your view with the 'cmake.options' property in settings."),
Expand Down