Skip to content

Commit

Permalink
Merge pull request #5 from GaijinEntertainment/version-1.3.0.0
Browse files Browse the repository at this point in the history
Version 1.3.0
  • Loading branch information
zalan-racz-gaijin authored Mar 14, 2024
2 parents 7b29275 + 7cbfd7e commit 629fa3f
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 16 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Change Log

## [1.3.0] - 2024.02.14.

### Added

- Code completion (for DSHL variables, shaders, and block statements)
- Document highlights (for DSHL variables, functions, shaders, and block statements)
- Hover (for DSHL variables, functions, shaders, and block statements)
- Document symbols (for DSHL variables, shaders, and block statements)
- Signature help (for DSHL functions)
- Go to definition (for DSHL variables, functions, shaders, and block statements)
- Go to declaration (for DSHL variables, functions, shaders, and block statements)
- Go to implementation (for DSHL functions, shaders, and block statements)
- Adding folding ranges based on blocks

### Improved

- Better type informations in code completion
- Updated packages
- Various optimizations

### Fixed

- Fixing a bug where closing and reopening a file prevented to update the file analyzation
- Fixing preprocessor directives in one liner hlsl blocks in syntax highlight
- Fixing macros before loops and ifs in syntax highlight
- Fixing syntax highlight when #defines contain ##
- Adding @sampler to the HLSL syntax highlight
- Using the cleaned content of DSHL macros for expansion instead of the original to get rid of comments
- Fixing a bug in HLSL macro expansion, where positions were wrong positions were computed

## [1.2.0] - 2024.02.15.

### Added
Expand Down
2 changes: 1 addition & 1 deletion DagorShaderLanguageSupport/Dagor-Shader-Language-Server
Submodule Dagor-Shader-Language-Server updated 44 files
+8 −2 .github/workflows/build.yml
+10 −10 README.md
+130 −0 grammar/antlr/DshlLexer.g4
+389 −0 grammar/antlr/DshlParser.g4
+29 −9 grammar/dshl.tmLanguage.json
+34 −39 grammar/hlsl.tmLanguage.json
+76 −76 package-lock.json
+8 −7 package.json
+156 −1 src/core/document-info.ts
+4 −0 src/core/document-manager.ts
+313 −2 src/core/snapshot.ts
+225 −17 src/helper/dshl-info.ts
+9 −0 src/helper/helper.ts
+26 −0 src/helper/scope.ts
+5 −1 src/helper/server-helper.ts
+21 −0 src/interface/block/block-declaration.ts
+8 −0 src/interface/block/block-usage.ts
+1 −0 src/interface/define-context.ts
+6 −0 src/interface/function/function-argument.ts
+18 −0 src/interface/function/function-declaration.ts
+8 −0 src/interface/function/function-info.ts
+8 −0 src/interface/function/function-parameter.ts
+12 −0 src/interface/function/function-usage.ts
+2 −2 src/interface/include/include-context.ts
+10 −0 src/interface/interval-declaration.ts
+2 −0 src/interface/macro/macro-context.ts
+15 −0 src/interface/shader/shader-declaration.ts
+8 −0 src/interface/shader/shader-usage.ts
+10 −0 src/interface/snippets.ts
+20 −0 src/interface/variable/variable-declaration.ts
+8 −0 src/interface/variable/variable-usage.ts
+3 −1 src/processor/condition-visitor.ts
+25 −22 src/processor/dshl-preprocessor.ts
+439 −0 src/processor/dshl-visitor.ts
+70 −9 src/processor/hlsl-preprocessor.ts
+44 −5 src/provider/completion-provider.ts
+128 −0 src/provider/document-highlight-provider.ts
+94 −11 src/provider/document-symbol-provider.ts
+10 −1 src/provider/folding-ranges-provider.ts
+117 −0 src/provider/hover-provider.ts
+16 −0 src/provider/inlay-hint-provider.ts
+82 −0 src/provider/link-provider-base.ts
+36 −15 src/provider/signature-help-provider.ts
+13 −1 src/server.ts
11 changes: 7 additions & 4 deletions DagorShaderLanguageSupport/DagorShaderLanguageSupport.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,16 @@
<Exec Command="npm install" WorkingDirectory="Dagor-Shader-Language-Server" />
<Touch Files="Dagor-Shader-Language-Server\node_modules\.install-stamp" AlwaysCreate="true" />
</Target>
<Target Name="GenerateAntlr" DependsOnTargets="NpmInstall">
<Exec Command="npm run generate-antlr" WorkingDirectory="Dagor-Shader-Language-Server" />
<Target Name="GenerateAntlrCondition" DependsOnTargets="NpmInstall">
<Exec Command="npm run generate-condition-antlr" WorkingDirectory="Dagor-Shader-Language-Server" />
</Target>
<Target Name="NpmRunBuildDebug" DependsOnTargets="GenerateAntlr" BeforeTargets="BeforeBuild" Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Target Name="GenerateAntlrDshl" DependsOnTargets="GenerateAntlrCondition">
<Exec Command="npm run generate-dshl-antlr" WorkingDirectory="Dagor-Shader-Language-Server" />
</Target>
<Target Name="NpmRunBuildDebug" DependsOnTargets="GenerateAntlrDshl" BeforeTargets="BeforeBuild" Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Exec Command="npm run build" WorkingDirectory="Dagor-Shader-Language-Server" />
</Target>
<Target Name="NpmRunBuildRelease" DependsOnTargets="GenerateAntlr" BeforeTargets="BeforeBuild" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Target Name="NpmRunBuildRelease" DependsOnTargets="GenerateAntlrDshl" BeforeTargets="BeforeBuild" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Exec Command="npm run build-production" WorkingDirectory="Dagor-Shader-Language-Server" />
</Target>
</Project>
4 changes: 2 additions & 2 deletions DagorShaderLanguageSupport/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.3.0.0")]
2 changes: 1 addition & 1 deletion DagorShaderLanguageSupport/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="Gaijin.DagorShaderLanguageSupport" Version="1.2.0.0" Language="en-US" Publisher="Gaijin Entertainment" />
<Identity Id="Gaijin.DagorShaderLanguageSupport" Version="1.3.0.0" Language="en-US" Publisher="Gaijin Entertainment" />
<DisplayName>Dagor Shader Language Support</DisplayName>
<Description xml:space="preserve">Language support extension for the Dagor Shader Language.</Description>
<MoreInfo>https://github.com/GaijinEntertainment/Dagor-Shader-Language-Support-for-Visual-Studio</MoreInfo>
Expand Down
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,49 +17,49 @@ The extension colorizes types, variables, functions, constructors, keywords, mod

### Code completion

The extension provides types, variables, functions, constructors, keywords, modifiers, semantics, attributes, preprocessor directives, code snippets, DSHL macros, and HLSL defines using IntelliSense, according to the context. It can also give you a quick summary about the item when available.
The extension provides types, variables, functions, constructors, keywords, modifiers, semantics, attributes, shaders, block statements, preprocessor directives, code snippets, DSHL macros, and HLSL defines using IntelliSense, according to the context. It can also give you a quick summary about the item when available.

![code completion](DagorShaderLanguageSupport/Resources/Screenshots/completion.gif)

### Signature help

The extension can display a signature helper for DSHL macros.
The extension can display a signature helper for DSHL functions, and macros.

![signature help](DagorShaderLanguageSupport/Resources/Screenshots/signature-help.gif)

### Document highlights

The extension can highlight all the occurrences of the selected DSHL macro or HLSL define in the file.
The extension can highlight all the occurrences of the selected DSHL variable, function, shader, block statement, macro or HLSL define in the file.

![highlights](DagorShaderLanguageSupport/Resources/Screenshots/highlights.gif)

### Hover

The extension can provide useful information if you hover over DSHL macros or HLSL defines.
The extension can provide useful information if you hover over DSHL variables, functions, shaders, block statements, macros or HLSL defines.

![hover](DagorShaderLanguageSupport/Resources/Screenshots/hover.gif)

### Document symbols

The extension can provide breadcrumbs about the DSHL macros and HLSL defines.
The extension can provide outline information and breadcrumbs about DSHL variables, shaders, block statements, macros and HLSL defines.

![symbols](DagorShaderLanguageSupport/Resources/Screenshots/symbols.gif)

### Go to / Peek definitions

You can find (go to / peek) the definition of a DSHL macro or a HLSL define.
You can find (go to / peek) the definition of a DSHL variable, function, shader, block statement, macro or a HLSL define.

![definitions](DagorShaderLanguageSupport/Resources/Screenshots/definition.gif)

### Go to declarations

You can find the declaration of a DSHL macro or a HLSL define.
You can find the declaration of a DSHL variable, function, shader, block statement, macro or a HLSL define.

![declarations](DagorShaderLanguageSupport/Resources/Screenshots/declaration.gif)

### Go to implementations

You can find the implementation of DSHL macro or a HLSL define.
You can find the implementation of DSHL function, shader, block statement, macro or a HLSL define.

![implementations](DagorShaderLanguageSupport/Resources/Screenshots/implementation.gif)

Expand Down Expand Up @@ -91,6 +91,19 @@ If you have any problems or feature request for the extension, feel free to crea

For more information, see the [changelog](CHANGELOG.md).

### 1.3.0

- Code completion (for DSHL variables, shaders, and block statements)
- Document highlights (for DSHL variables, functions, shaders, and block statements)
- Hover (for DSHL variables, functions, shaders, and block statements)
- Document symbols (for DSHL variables, shaders, and block statements)
- Signature help (for DSHL functions)
- Go to definition (for DSHL variables, functions, shaders, and block statements)
- Go to declaration (for DSHL variables, functions, shaders, and block statements)
- Go to implementation (for DSHL functions, shaders, and block statements)
- Adding folding ranges based on blocks
- Several improvements, bugfixes and optimizations

### 1.2.0

- Code completion (for HLSL defines, include statements, DSHL macro parameters)
Expand Down

0 comments on commit 629fa3f

Please sign in to comment.