Extract GLSL language support into an extension (#10433)
Release Notes: - Extracted GLSL language support into an extension. --------- Co-authored-by: Marshall <marshall@zed.dev> Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
parent
47f698d5a3
commit
c38f72d194
10 changed files with 24 additions and 25 deletions
10
Cargo.lock
generated
10
Cargo.lock
generated
|
@ -5431,7 +5431,6 @@ dependencies = [
|
||||||
"tree-sitter-css",
|
"tree-sitter-css",
|
||||||
"tree-sitter-elixir",
|
"tree-sitter-elixir",
|
||||||
"tree-sitter-embedded-template",
|
"tree-sitter-embedded-template",
|
||||||
"tree-sitter-glsl",
|
|
||||||
"tree-sitter-go",
|
"tree-sitter-go",
|
||||||
"tree-sitter-gomod",
|
"tree-sitter-gomod",
|
||||||
"tree-sitter-gowork",
|
"tree-sitter-gowork",
|
||||||
|
@ -10353,15 +10352,6 @@ dependencies = [
|
||||||
"tree-sitter",
|
"tree-sitter",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tree-sitter-glsl"
|
|
||||||
version = "0.1.4"
|
|
||||||
source = "git+https://github.com/theHamsta/tree-sitter-glsl?rev=2a56fb7bc8bb03a1892b4741279dd0a8758b7fb3#2a56fb7bc8bb03a1892b4741279dd0a8758b7fb3"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
"tree-sitter",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tree-sitter-go"
|
name = "tree-sitter-go"
|
||||||
version = "0.19.1"
|
version = "0.19.1"
|
||||||
|
|
|
@ -314,7 +314,6 @@ tree-sitter-cpp = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev
|
||||||
tree-sitter-css = { git = "https://github.com/tree-sitter/tree-sitter-css", rev = "769203d0f9abe1a9a691ac2b9fe4bb4397a73c51" }
|
tree-sitter-css = { git = "https://github.com/tree-sitter/tree-sitter-css", rev = "769203d0f9abe1a9a691ac2b9fe4bb4397a73c51" }
|
||||||
tree-sitter-elixir = { git = "https://github.com/elixir-lang/tree-sitter-elixir", rev = "a2861e88a730287a60c11ea9299c033c7d076e30" }
|
tree-sitter-elixir = { git = "https://github.com/elixir-lang/tree-sitter-elixir", rev = "a2861e88a730287a60c11ea9299c033c7d076e30" }
|
||||||
tree-sitter-embedded-template = "0.20.0"
|
tree-sitter-embedded-template = "0.20.0"
|
||||||
tree-sitter-glsl = { git = "https://github.com/theHamsta/tree-sitter-glsl", rev = "2a56fb7bc8bb03a1892b4741279dd0a8758b7fb3" }
|
|
||||||
tree-sitter-go = { git = "https://github.com/tree-sitter/tree-sitter-go", rev = "aeb2f33b366fd78d5789ff104956ce23508b85db" }
|
tree-sitter-go = { git = "https://github.com/tree-sitter/tree-sitter-go", rev = "aeb2f33b366fd78d5789ff104956ce23508b85db" }
|
||||||
tree-sitter-gomod = { git = "https://github.com/camdencheek/tree-sitter-go-mod" }
|
tree-sitter-gomod = { git = "https://github.com/camdencheek/tree-sitter-go-mod" }
|
||||||
tree-sitter-gowork = { git = "https://github.com/d1y/tree-sitter-go-work" }
|
tree-sitter-gowork = { git = "https://github.com/d1y/tree-sitter-go-work" }
|
||||||
|
|
|
@ -39,6 +39,8 @@ fn suggested_extensions() -> &'static HashMap<&'static str, Arc<str>> {
|
||||||
("git-firefly", "TAG_EDITMSG"),
|
("git-firefly", "TAG_EDITMSG"),
|
||||||
("git-firefly", "git-rebase-todo"),
|
("git-firefly", "git-rebase-todo"),
|
||||||
("gleam", "gleam"),
|
("gleam", "gleam"),
|
||||||
|
("glsl", "vert"),
|
||||||
|
("glsl", "frag"),
|
||||||
("graphql", "gql"),
|
("graphql", "gql"),
|
||||||
("graphql", "graphql"),
|
("graphql", "graphql"),
|
||||||
("haskell", "hs"),
|
("haskell", "hs"),
|
||||||
|
|
|
@ -42,7 +42,6 @@ tree-sitter-cpp.workspace = true
|
||||||
tree-sitter-css.workspace = true
|
tree-sitter-css.workspace = true
|
||||||
tree-sitter-elixir.workspace = true
|
tree-sitter-elixir.workspace = true
|
||||||
tree-sitter-embedded-template.workspace = true
|
tree-sitter-embedded-template.workspace = true
|
||||||
tree-sitter-glsl.workspace = true
|
|
||||||
tree-sitter-go.workspace = true
|
tree-sitter-go.workspace = true
|
||||||
tree-sitter-gomod.workspace = true
|
tree-sitter-gomod.workspace = true
|
||||||
tree-sitter-gowork.workspace = true
|
tree-sitter-gowork.workspace = true
|
||||||
|
|
|
@ -62,7 +62,6 @@ pub fn init(
|
||||||
"embedded_template",
|
"embedded_template",
|
||||||
tree_sitter_embedded_template::language(),
|
tree_sitter_embedded_template::language(),
|
||||||
),
|
),
|
||||||
("glsl", tree_sitter_glsl::language()),
|
|
||||||
("go", tree_sitter_go::language()),
|
("go", tree_sitter_go::language()),
|
||||||
("gomod", tree_sitter_gomod::language()),
|
("gomod", tree_sitter_gomod::language()),
|
||||||
("gowork", tree_sitter_gowork::language()),
|
("gowork", tree_sitter_gowork::language()),
|
||||||
|
@ -286,7 +285,6 @@ pub fn init(
|
||||||
"yaml",
|
"yaml",
|
||||||
vec![Arc::new(yaml::YamlLspAdapter::new(node_runtime.clone()))]
|
vec![Arc::new(yaml::YamlLspAdapter::new(node_runtime.clone()))]
|
||||||
);
|
);
|
||||||
language!("glsl");
|
|
||||||
language!("nix");
|
language!("nix");
|
||||||
language!("nu", vec![Arc::new(nu::NuLanguageServer {})]);
|
language!("nu", vec![Arc::new(nu::NuLanguageServer {})]);
|
||||||
language!("ocaml", vec![Arc::new(ocaml::OCamlLspAdapter)]);
|
language!("ocaml", vec![Arc::new(ocaml::OCamlLspAdapter)]);
|
||||||
|
|
1
extensions/glsl/LICENSE-APACHE
Symbolic link
1
extensions/glsl/LICENSE-APACHE
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../LICENSE-APACHE
|
11
extensions/glsl/extension.toml
Normal file
11
extensions/glsl/extension.toml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
id = "glsl"
|
||||||
|
name = "GLSL"
|
||||||
|
description = "GLSL support."
|
||||||
|
version = "0.0.1"
|
||||||
|
schema_version = 1
|
||||||
|
authors = ["Mikayla Maki <mikayla@zed.dev>"]
|
||||||
|
repository = "https://github.com/zed-industries/zed"
|
||||||
|
|
||||||
|
[grammars.glsl]
|
||||||
|
repository = "https://github.com/theHamsta/tree-sitter-glsl"
|
||||||
|
commit = "31064ce53385150f894a6c72d61b94076adf640a"
|
|
@ -57,6 +57,14 @@
|
||||||
(number_literal) @number
|
(number_literal) @number
|
||||||
(char_literal) @number
|
(char_literal) @number
|
||||||
|
|
||||||
|
(identifier) @variable
|
||||||
|
|
||||||
|
(field_identifier) @property
|
||||||
|
(statement_identifier) @label
|
||||||
|
(type_identifier) @type
|
||||||
|
(primitive_type) @type
|
||||||
|
(sized_type_specifier) @type
|
||||||
|
|
||||||
(call_expression
|
(call_expression
|
||||||
function: (identifier) @function)
|
function: (identifier) @function)
|
||||||
(call_expression
|
(call_expression
|
||||||
|
@ -67,19 +75,10 @@
|
||||||
(preproc_function_def
|
(preproc_function_def
|
||||||
name: (identifier) @function.special)
|
name: (identifier) @function.special)
|
||||||
|
|
||||||
(field_identifier) @property
|
|
||||||
(statement_identifier) @label
|
|
||||||
(type_identifier) @type
|
|
||||||
(primitive_type) @type
|
|
||||||
(sized_type_specifier) @type
|
|
||||||
|
|
||||||
((identifier) @constant
|
((identifier) @constant
|
||||||
(#match? @constant "^[A-Z][A-Z\\d_]*$"))
|
(#match? @constant "^[A-Z][A-Z\\d_]*$"))
|
||||||
|
|
||||||
(identifier) @variable
|
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
; inherits: c
|
|
||||||
|
|
||||||
[
|
[
|
||||||
"in"
|
"in"
|
|
@ -3,8 +3,6 @@ ignore-files = true
|
||||||
ignore-hidden = false
|
ignore-hidden = false
|
||||||
extend-exclude = [
|
extend-exclude = [
|
||||||
".git/",
|
".git/",
|
||||||
# glsl isn't recognized by this tool
|
|
||||||
"crates/languages/src/glsl/",
|
|
||||||
# File suffixes aren't typos
|
# File suffixes aren't typos
|
||||||
"assets/icons/file_icons/file_types.json",
|
"assets/icons/file_icons/file_types.json",
|
||||||
"crates/extensions_ui/src/extension_suggest.rs",
|
"crates/extensions_ui/src/extension_suggest.rs",
|
||||||
|
@ -17,6 +15,8 @@ extend-exclude = [
|
||||||
"crates/editor/src/editor_tests.rs",
|
"crates/editor/src/editor_tests.rs",
|
||||||
# Clojure uses .edn filename extension, which is not a misspelling of "end"
|
# Clojure uses .edn filename extension, which is not a misspelling of "end"
|
||||||
"extensions/clojure/languages/clojure/config.toml",
|
"extensions/clojure/languages/clojure/config.toml",
|
||||||
|
# glsl isn't recognized by this tool
|
||||||
|
"extensions/glsl/languages/glsl/",
|
||||||
# Windows likes its abbreviations
|
# Windows likes its abbreviations
|
||||||
"crates/gpui/src/platform/windows/",
|
"crates/gpui/src/platform/windows/",
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue