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 {
|
if is_encompassing {
|
||||||
let this_gap = ts_range.end_byte - ts_range.start_byte;
|
let this_gap = ts_range.end_byte - ts_range.start_byte;
|
||||||
if this_gap < min_gap
|
if this_gap < min_gap
|
||||||
// ignore the "comment" language family
|
// ignore the language family for which it won't make
|
||||||
// as that would mean we can't uncomment anything, or
|
// sense to consider their comment.
|
||||||
// the comments would be incorrect.
|
|
||||||
//
|
//
|
||||||
// Since uncommenting would attempt to use the comment
|
// Since uncommenting would attempt to use the comment
|
||||||
// language's non-existing comment tokens
|
// language's non-existing comment tokens
|
||||||
// TODO: add this as a language configuration key?
|
// 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);
|
best_fit = Some(layer_id);
|
||||||
min_gap = this_gap;
|
min_gap = this_gap;
|
||||||
|
|
|
@ -1355,8 +1355,7 @@ scope = "source.svelte"
|
||||||
injection-regex = "svelte"
|
injection-regex = "svelte"
|
||||||
file-types = ["svelte"]
|
file-types = ["svelte"]
|
||||||
indent = { tab-width = 2, unit = " " }
|
indent = { tab-width = 2, unit = " " }
|
||||||
comment-token = "//"
|
block-comment-tokens = { start = "<!--", end = "-->" }
|
||||||
block-comment-tokens = { start = "/*", end = "*/" }
|
|
||||||
language-servers = [ "svelteserver" ]
|
language-servers = [ "svelteserver" ]
|
||||||
|
|
||||||
[[grammar]]
|
[[grammar]]
|
||||||
|
|
Loading…
Reference in New Issue