cohama / lexima.vim

Auto close parentheses and repeat by dot dot dot...
995 stars 46 forks source link

"LISP mode"? don't pair singlequote or backtick in certain filetypes #148

Closed alxndr closed 6 months ago

alxndr commented 6 months ago

Curious if there's a way to leave most of the default rules intact, but "turn off" the pairing completion for singlequote ' and backtick `, for LISP-based filetypes such as Racket and Scheme?

cohama commented 6 months ago

You can use the following. call lexima#add_rule(#{ char: "'", input: "'", input_after: "", mode: 'i', filetype: ["racket", "scheme"})

Removing default rule is difficult but you can overwrite with NOOP.

alxndr commented 6 months ago

Thanks @cohama ! I seem to have gotten the behavior I was after with these:

  call lexima#add_rule({ 'char': "'", 'filetype': ['lisp', 'scheme', 'racket']})
  call lexima#add_rule({ 'char': '`', 'filetype': ['lisp', 'scheme', 'racket']})