diff options
author | Blaž Hrastnik | 2020-09-28 16:00:35 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2020-09-28 16:00:35 +0000 |
commit | 3020077da8efbf914a9cb0a2cbb50362d339a39a (patch) | |
tree | af8eaf9c016ac5116f6349a6b5ebb79e77f8efb5 /helix-core/src/syntax.rs | |
parent | fbe313779e83728b7dca7925df722c7fb4228d98 (diff) |
Extend selection commands.
Diffstat (limited to 'helix-core/src/syntax.rs')
-rw-r--r-- | helix-core/src/syntax.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 26897ab3..9b09bb58 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -48,7 +48,7 @@ impl LanguageConfiguration { if highlights_query.is_empty() { Ok(None) } else { - let language = get_language(&self.language_id); + let language = get_language(self.language_id); let mut config = HighlightConfiguration::new( language, &highlights_query, @@ -1456,7 +1456,7 @@ fn test_parser() { .map(String::from) .collect(); - let language = get_language(&LANG::Rust); + let language = get_language(LANG::Rust); let mut config = HighlightConfiguration::new( language, &std::fs::read_to_string( @@ -1478,7 +1478,7 @@ fn test_parser() { fn main() {} ", ); - let syntax = Syntax::new(LANG::Rust, &source, config); + let syntax = Syntax::new(&source, Arc::new(config)); let tree = syntax.root_layer.tree.unwrap(); let root = tree.root_node(); assert_eq!(root.kind(), "source_file"); |