Add Diff language (#19129)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
name = "Diff"
|
||||
grammar = "diff"
|
||||
path_suffixes = ["diff", "patch"]
|
||||
brackets = []
|
||||
@@ -0,0 +1,15 @@
|
||||
[
|
||||
(addition)
|
||||
(new_file)
|
||||
] @diff.plus
|
||||
|
||||
[
|
||||
(deletion)
|
||||
(old_file)
|
||||
] @diff.minus
|
||||
|
||||
(commit) @constant
|
||||
|
||||
(location) @attribute
|
||||
|
||||
(command) @function
|
||||
@@ -37,6 +37,7 @@ pub fn init(languages: Arc<LanguageRegistry>, node_runtime: NodeRuntime, cx: &mu
|
||||
("c", tree_sitter_c::LANGUAGE),
|
||||
("cpp", tree_sitter_cpp::LANGUAGE),
|
||||
("css", tree_sitter_css::LANGUAGE),
|
||||
("diff", tree_sitter_diff::LANGUAGE),
|
||||
("go", tree_sitter_go::LANGUAGE),
|
||||
("gomod", tree_sitter_go_mod::LANGUAGE),
|
||||
("gowork", tree_sitter_gowork::LANGUAGE),
|
||||
@@ -105,6 +106,7 @@ pub fn init(languages: Arc<LanguageRegistry>, node_runtime: NodeRuntime, cx: &mu
|
||||
"css",
|
||||
vec![Arc::new(css::CssLspAdapter::new(node_runtime.clone())),]
|
||||
);
|
||||
language!("diff");
|
||||
language!("go", vec![Arc::new(go::GoLspAdapter)], GoContextProvider);
|
||||
language!("gomod", vec![Arc::new(go::GoLspAdapter)], GoContextProvider);
|
||||
language!(
|
||||
|
||||
Reference in New Issue
Block a user