@@ -36,18 +36,21 @@ local markers = {
36
36
hl_name = ' org_code' ,
37
37
hl_cmd = ' hi def link org_code String' ,
38
38
nestable = false ,
39
+ spell = false ,
39
40
type = ' text' ,
40
41
},
41
42
[' =' ] = {
42
43
hl_name = ' org_verbatim' ,
43
44
hl_cmd = ' hi def link org_verbatim String' ,
44
45
nestable = false ,
46
+ spell = false ,
45
47
type = ' text' ,
46
48
},
47
49
[' \\ (' ] = {
48
50
hl_name = ' org_latex' ,
49
51
hl_cmd = ' hi def link org_latex OrgTSLatex' ,
50
52
nestable = false ,
53
+ spell = false ,
51
54
type = ' latex' ,
52
55
},
53
56
[' \\ {' ] = {
@@ -381,6 +384,7 @@ local function apply(namespace, bufnr, line_index)
381
384
ephemeral = true ,
382
385
end_col = range .to [' end' ].character ,
383
386
hl_group = markers [range .type ].hl_name ,
387
+ spell = markers [range .type ].spell ,
384
388
priority = 110 + range .from .start .character ,
385
389
})
386
390
@@ -402,6 +406,7 @@ local function apply(namespace, bufnr, line_index)
402
406
local line = vim .api .nvim_buf_get_lines (bufnr , link_range .from .start .line , link_range .from .start .line + 1 , false )[1 ]
403
407
local link = line :sub (link_range .from .start .character + 1 , link_range .to [' end' ].character )
404
408
local alias = link :find (' %]%[' ) or 1
409
+ local link_end = link :find (' %]%[' ) or (link :len () - 1 )
405
410
406
411
vim .api .nvim_buf_set_extmark (bufnr , namespace , link_range .from .start .line , link_range .from .start .character , {
407
412
ephemeral = true ,
@@ -416,6 +421,12 @@ local function apply(namespace, bufnr, line_index)
416
421
conceal = ' ' ,
417
422
})
418
423
424
+ vim .api .nvim_buf_set_extmark (bufnr , namespace , link_range .from .start .line , link_range .from .start .character + 2 , {
425
+ ephemeral = true ,
426
+ end_col = link_range .from .start .character - 1 + link_end ,
427
+ spell = false ,
428
+ })
429
+
419
430
vim .api .nvim_buf_set_extmark (bufnr , namespace , link_range .from .start .line , link_range .to [' end' ].character - 2 , {
420
431
ephemeral = true ,
421
432
end_col = link_range .to [' end' ].character ,
@@ -428,6 +439,7 @@ local function apply(namespace, bufnr, line_index)
428
439
ephemeral = true ,
429
440
end_col = latex_range .to [' end' ].character ,
430
441
hl_group = markers [latex_range .type ].hl_name ,
442
+ spell = markers [latex_range .type ].spell ,
431
443
priority = 110 + latex_range .from .start .character ,
432
444
})
433
445
end
0 commit comments