mirror of
https://github.com/Strum355/mcshader-lsp.git
synced 2025-08-28 04:24:09 +00:00
Merge pull request #47 from GeForceLegend/rust-rewrite
Compute shader with suffixes support and some small fix
This commit is contained in:
commit
fb12c9b144
5 changed files with 19 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Minecraft GLSL Shaders Language Server
|
# Minecraft GLSL Shaders Language Server
|
||||||
## mcshader-lsp
|
## mcshader-lsp
|
||||||
|
|
||||||
[](https://marketplace.visualstudio.com/items?itemName=strum355.vscode-mc-shader) [](https://marketplace.visualstudio.com/items?itemName=strum355.vscode-mc-shader)
|
[](https://marketplace.visualstudio.com/items?itemName=strum355.vscode-mc-shader) [](https://marketplace.visualstudio.com/items?itemName=strum355.vscode-mc-shader)
|
||||||
[](https://github.com/Strum355/mcshader-lsp)
|
[](https://github.com/Strum355/mcshader-lsp)
|
||||||
[](https://github.com/Strum355/mcshader-lsp/issues)
|
[](https://github.com/Strum355/mcshader-lsp/issues)
|
||||||
[](https://cloud.drone.io/Strum355/mcshader-lsp)
|
[](https://cloud.drone.io/Strum355/mcshader-lsp)
|
||||||
|
|
|
@ -25,7 +25,7 @@ export class Extension {
|
||||||
|
|
||||||
readonly package: {
|
readonly package: {
|
||||||
version: string
|
version: string
|
||||||
} = vscode.extensions.getExtension(this.extensionID)!.packageJSON;
|
} = vscode.extensions.getExtension(this.extensionID)!.packageJSON
|
||||||
|
|
||||||
public get context(): vscode.ExtensionContext {
|
public get context(): vscode.ExtensionContext {
|
||||||
return this.extensionContext
|
return this.extensionContext
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"publisher": "Strum355",
|
"publisher": "Strum355",
|
||||||
"author": "Noah Santschi-Cooney (Strum355)",
|
"author": "Noah Santschi-Cooney (Strum355)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"icon": "logo-mini.png",
|
"icon": "logo-min.png",
|
||||||
"repository": {
|
"repository": {
|
||||||
"url": "https://github.com/Strum355/mcshader-lsp"
|
"url": "https://github.com/Strum355/mcshader-lsp"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use std::{collections::HashMap, lazy::OnceCell, path::Path};
|
use std::{collections::HashMap, cell::OnceCell, path::Path};
|
||||||
|
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use rust_lsp::lsp_types::{Diagnostic, DiagnosticSeverity, Position, Range};
|
use rust_lsp::lsp_types::{Diagnostic, DiagnosticSeverity, Position, Range};
|
||||||
|
|
|
@ -115,6 +115,21 @@ lazy_static! {
|
||||||
set.insert(format!("shadow_cutout.{}", ext));
|
set.insert(format!("shadow_cutout.{}", ext));
|
||||||
set.insert(format!("shadow_solid.{}", 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
|
set
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue