Better GLSL support

This commit is contained in:
Joshua Barretto 2025-11-10 12:46:24 +00:00
parent 18751bb6c3
commit fb0d1ebc73
2 changed files with 6 additions and 2 deletions

View file

@ -25,4 +25,8 @@
## Issues to fix
- New file creation should work with non-existent directories
- New file creation should work with non-existent directories
- Search results should be ranked by 'path elements shared with original path'
- Buffer switcher and search results should be filterable by elements of the path
- Buffer switcher and search results should disambiguate paths with the same filename
- Undo history changes should not join so easily

View file

@ -198,7 +198,7 @@ impl Highlighter {
pub fn glsl(self) -> Self {
self
// Keywords
.with(TokenKind::Keyword, r"\b[(struct)(if)(while)(for)(else)(break)(continue)(const)(return)(layout)(uniform)(set)(binding)(location)(in)]\b")
.with(TokenKind::Keyword, r"\b[(struct)(if)(while)(for)(else)(break)(continue)(const)(return)(layout)(uniform)(set)(binding)(location)(inout)(in)(case)(switch)(default)]\b")
// Primitives
.with(TokenKind::Type, r"\b[(u?int)(float)(double)(bool)(void)([ui]?vec[1-4]*)([ui]?mat[1-4]*)(texture[(2D)(3D)]?(Cube)?)([ui]?sampler[(2D)(3D)]?(Shadow)?)]\b")
// Builtins