mirror of https://github.com/helix-editor/helix
fix: add `regex` to ignored layer configs
parent
d451077978
commit
56dedd10a7
|
@ -1449,14 +1449,13 @@ impl Syntax {
|
|||
if is_encompassing {
|
||||
let this_gap = ts_range.end_byte - ts_range.start_byte;
|
||||
if this_gap < min_gap
|
||||
// ignore the "comment" language family
|
||||
// as that would mean we can't uncomment anything, or
|
||||
// the comments would be incorrect.
|
||||
// ignore the language family for which it won't make
|
||||
// sense to consider their comment.
|
||||
//
|
||||
// Since uncommenting would attempt to use the comment
|
||||
// language's non-existing comment tokens
|
||||
// TODO: add this as a language configuration key?
|
||||
&& !matches!(self.layer_config(layer_id).language_name.as_ref(), "jsdoc" | "comment")
|
||||
&& !matches!(self.layer_config(layer_id).language_name.as_ref(), "jsdoc" | "comment" | "regex")
|
||||
{
|
||||
best_fit = Some(layer_id);
|
||||
min_gap = this_gap;
|
||||
|
|
|
@ -1355,8 +1355,7 @@ scope = "source.svelte"
|
|||
injection-regex = "svelte"
|
||||
file-types = ["svelte"]
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
comment-token = "//"
|
||||
block-comment-tokens = { start = "/*", end = "*/" }
|
||||
block-comment-tokens = { start = "<!--", end = "-->" }
|
||||
language-servers = [ "svelteserver" ]
|
||||
|
||||
[[grammar]]
|
||||
|
|
Loading…
Reference in New Issue