Skip to content

Commit

Permalink
Merge pull request #47 from GeForceLegend/rust-rewrite
Browse files Browse the repository at this point in the history
Compute shader with suffixes support and some small fix
  • Loading branch information
Strum355 authored Feb 12, 2023
2 parents d1d1e23 + 4dd5542 commit fb12c9b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Minecraft GLSL Shaders Language Server
## mcshader-lsp

[![Marketplace Version](https://vsmarketplacebadge.apphb.com/version/strum355.vscode-mc-shader.svg)](https://marketplace.visualstudio.com/items?itemName=strum355.vscode-mc-shader) [![Installs](https://vsmarketplacebadge.apphb.com/installs/strum355.vscode-mc-shader.svg)](https://marketplace.visualstudio.com/items?itemName=strum355.vscode-mc-shader)
[![Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/strum355.vscode-mc-shader.svg)](https://marketplace.visualstudio.com/items?itemName=strum355.vscode-mc-shader) [![Installs](https://img.shields.io/visual-studio-marketplace/i/strum355.vscode-mc-shader.svg)](https://marketplace.visualstudio.com/items?itemName=strum355.vscode-mc-shader)
[![license](https://img.shields.io/github/license/Strum355/vscode-mc-shader.svg)](https://github.com/Strum355/mcshader-lsp)
[![Issues](https://img.shields.io/github/issues-raw/Strum355/mcshader-lsp.svg)](https://github.com/Strum355/mcshader-lsp/issues)
[![Build Status](https://img.shields.io/drone/build/Strum355/mcshader-lsp)](https://cloud.drone.io/Strum355/mcshader-lsp)
Expand Down
2 changes: 1 addition & 1 deletion client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class Extension {

readonly package: {
version: string
} = vscode.extensions.getExtension(this.extensionID)!.packageJSON;
} = vscode.extensions.getExtension(this.extensionID)!.packageJSON

public get context(): vscode.ExtensionContext {
return this.extensionContext
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"publisher": "Strum355",
"author": "Noah Santschi-Cooney (Strum355)",
"license": "MIT",
"icon": "logo-mini.png",
"icon": "logo-min.png",
"repository": {
"url": "https://github.com/Strum355/mcshader-lsp"
},
Expand Down
2 changes: 1 addition & 1 deletion server/main/src/diagnostics_parser.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{collections::HashMap, lazy::OnceCell, path::Path};
use std::{collections::HashMap, cell::OnceCell, path::Path};

use regex::Regex;
use rust_lsp::lsp_types::{Diagnostic, DiagnosticSeverity, Position, Range};
Expand Down
15 changes: 15 additions & 0 deletions server/main/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,21 @@ lazy_static! {
set.insert(format!("shadow_cutout.{}", ext));
set.insert(format!("shadow_solid.{}", ext));
}
let base_char_num = 'a' as u8;
for suffix_num in 0u8..=25u8 {
let suffix_char = (base_char_num + suffix_num) as char;
set.insert(format!("composite_{}.csh", suffix_char));
set.insert(format!("deferred_{}.csh", suffix_char));
set.insert(format!("prepare_{}.csh", suffix_char));
set.insert(format!("shadowcomp_{}.csh", suffix_char));
for i in 1..=99 {
let total_suffix = format!("{}_{}", i, suffix_char);
set.insert(format!("composite{}.csh", total_suffix));
set.insert(format!("deferred{}.csh", total_suffix));
set.insert(format!("prepare{}.csh", total_suffix));
set.insert(format!("shadowcomp{}.csh", total_suffix));
}
}
set
};
}
Expand Down

0 comments on commit fb12c9b

Please sign in to comment.