ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

HLSL Syntax

by MattSutherlin ST3

HLSL syntax highlighting for Sublime Text 3

Details

Installs

  • Total 2K
  • Win 1K
  • OS X 195
  • Linux 72
Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31
Windows 0 2 2 3 4 3 1 3 1 5 2 1 2 1 0 1 2 3 5 3 4 2 1 0 1 3 6 3 1 4 4 3 3 2 0 1 1 1 3 3 1 2 1 1 1 3
OS X 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0
Linux 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 2 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

HLSL_ST3

HLSL tools for Sublime Text 3

I'm just trying to provide a better, more fully featured editing environment for HLSL. Because it's kind of ridiculous that we don't already have a real IDE for this.

The Syntax

A large part of that is the syntax file, where the goal is to hook as much as possile into Sublime's symbol indexer in the most correct, most granular way possible. Functions (and function-esque macros) will link between defintions and call sites in both directions, via GoTo Defintion and GoTo Reference. Structs link from usage to definition, via GoTo Definition. Most everything else will at least get scoped for theme coloration, but more universal coverage towards scope-aware autocompletions is a (long-term) work in progress.

The Scripts

While the syntax is the core of the plugin, the scripts are where I'm hoping to take it from a simple text editing experience and into being a real IDE experience.

Open Headers

You can right click an include statement to open the referenced file. By default, it will attempt to open relative to the same directory as the including file, but user settings allow additional include paths to be provided.

Get Intrinsic Information On Hover

Mousing over a language intrinsic will give you a popup with the MSDN description and a link to the MSDN page. Now you don't have to forever keep a tab open for the main intrinsics page, and let's be real, anyone reading this probably does.

Swap String Literal Params On Attributes

Can't ever remember what strings are valid for the paritioning attribute of a hull shader? Me either, and now you shouldn't have to. Right click any stage function attribute with a string literal param and get a list of the valid options to insert.

Lastly

Everything works best when your shader source is in an active sublime-project file. Otherwise, some features may only work across open files instead of all of your files.

Best with my HLSL-centric theme, Rocklobster: https://github.com/MattSutherlin/RockLobster_ST3Theme