https://github.com/shader-slang/slang-vs-extension
The official Visual Studio extension for Slang.
https://github.com/shader-slang/slang-vs-extension
Last synced: 6 months ago
JSON representation
The official Visual Studio extension for Slang.
- Host: GitHub
- URL: https://github.com/shader-slang/slang-vs-extension
- Owner: shader-slang
- License: mit
- Created: 2024-01-22T18:24:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-12T19:32:29.000Z (10 months ago)
- Last Synced: 2024-07-12T21:50:41.952Z (10 months ago)
- Language: C#
- Size: 88.9 KB
- Stars: 5
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Slang Visual Studio Extension
This is the official **Visual Studio** extension for the Slang shading language.
The extension works with Visual Studio 2022 version 17.8 or later.
For the Visual Studio **Code** extension, please check out https://github.com/shader-slang/slang-vscode-extension.Implemented features:
- Auto completion
- Semantic highlighting
- Quick info
- Signature help
- Go to definition
- Diagnostics
- Symbol navigation
- Auto formatting
- Commenting/Uncommenting## Configurations
You can use a configuration file named "slangdconfig.json" in the same or parent directory of the source file to define macros or search paths for the intellisense engine. The config json follows the same syntax as the settings json of the [Visual Studio Code extension](https://github.com/shader-slang/slang-vscode-extension).Here is an example `slangdconfig.json` file:
```
{
"slang.predefinedMacros": [
"MY_MACRO",
"MY_VALUE_MACRO=1"
],
"slang.additionalSearchPaths": [
"include/",
"c:\\external-lib\\include"
],
"slang.enableCommitCharactersInAutoCompletion": "on"
}
```## Configuring auto formatting with `.clangformat`
This extension will attempt to discover `.clangformat` files from the current and parent directories of
the source file being edited to format the code. It recognizes the configurations in the C# language section.
Alternatively, you can provide `"slang.format.clangFormatStyle"` setting in `slangdconfig.json` to specify
your format configuration inline, for example:
```
// slangdconfig.json:
{
"slang.predefinedMacros": ["MY_MACRO"],
...
""slang.format.clangFormatStyle": "Microsoft"
}
```## Acknowledgements
Special thanks to Alex Camaño for creating the initial version of this extension.