Syntax highlighting fixes
This commit is contained in:
parent
86856bf960
commit
dfca541147
4 changed files with 6 additions and 9 deletions
|
@ -2,7 +2,7 @@ function! asyncomplete#sources#mbnotes#get_source_options(opts)
|
|||
let l:defaults = {
|
||||
\ 'name': 'mbnotes',
|
||||
\ 'completor': function('asyncomplete#sources#mbnotes#completor'),
|
||||
\ 'allowlist': ['mbnotes.quarto']
|
||||
\ 'allowlist': ['mbnotes']
|
||||
\ }
|
||||
|
||||
return extend(l:defaults, a:opts)
|
||||
|
|
|
@ -72,7 +72,7 @@ export def BeforeNoteSave()
|
|||
var daily_path = g:mbnotes_dir .. "/daily"
|
||||
|
||||
# Only rename bona fide notes
|
||||
if directory != expand(g:mbnotes_dir)
|
||||
if directory == expand(g:mbnotes_dir)
|
||||
var base = expand('%:t')
|
||||
var date = base[0 : 9]
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ def IsMBNotes()
|
|||
var path_prefix = expand('%:p')[0 : len(g:mbnotes_dir) - 1]
|
||||
|
||||
if path_prefix == g:mbnotes_dir
|
||||
set filetype=mbnotes.quarto
|
||||
set filetype=mbnotes
|
||||
endif
|
||||
enddef
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
vim9s
|
||||
|
||||
if exists("b:current_syntax")
|
||||
echom b:current_syntax
|
||||
finish
|
||||
endif
|
||||
|
||||
|
@ -17,9 +16,7 @@ syn region mbnCalloutImportant start=":::\s\+{\.callout-important\s*" end=":::$"
|
|||
hi link mbnCalloutImportant SpellBad
|
||||
|
||||
syn region mbnCalloutTip start=":::\s\+{\.callout-tip\s*" end=":::$" keepend
|
||||
hi link mbnCalloutNote Question
|
||||
hi link mbnCalloutTip Question
|
||||
|
||||
syn region mbnCalloutCaution start=":::\s\+{\.callout-caution\s*" end=":::$" keepend
|
||||
hi link mbnCalloutWarning SpellCap
|
||||
|
||||
b:current_syntax = "mbnotes"
|
||||
hi link mbnCalloutCaution SpellCap
|
||||
|
|
Loading…
Add table
Reference in a new issue