Skip to content

Commit

Permalink
chore: check jisyo is unique
Browse files Browse the repository at this point in the history
  • Loading branch information
kawarimidoll committed Nov 28, 2023
1 parent 7c99564 commit 3fddee4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions k.vim
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ function! k#initialize(opts = {}) abort
echoerr "[k#initialize] jisyo.path must NOT includes ':'"
return
endif
if has_key(s:jisyo_mark_pair, jisyo.path)
echoerr "[k#initialize] jisyo.path must be unique"
return
endif

let s:jisyo_mark_pair[jisyo.path] = get(jisyo, 'mark', '') ==# '' ? '' : $'[{jisyo.mark}] '
let encoding = get(jisyo, 'encoding', '') ==# '' ? 'auto' : jisyo.encoding
let s:grep_cmd ..= 'rg --no-heading --with-filename --no-line-number'
Expand Down

0 comments on commit 3fddee4

Please sign in to comment.