Skip to content

kaiuri/parinfer.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parinfer.nvim 🤺

Easy peasy lemon squeezy out those parenthesaches from your nuggin 🤕

Demo 🎥

demo.mp4

Requirements 🧰

  • NVIM v0.12.0 with luajit
  • Rust toolchain .i.e. cargo and friends 🤝
  • make on your path - if you're on linux and it's not, you might be doing it wrong 👀

Installation 🔧

mkdir -p ~/.vim/pack/kaiuri/start
cd ~/.vim/pack/kaiuri/start
git clone https://github.com/kaiuri/parinfer.nvim
make build

Usage 👓

  • Keymaps ⌨️
    • indent the codes 🤜 <plug>(parinfer-indent)
    • dedent those codes 🤛 <plug>(parinfer-dedent)
  • Decorations 💅
    • 🔅 Toggle with :ParinferDecorations
    • 🎨 Customize with hl-ParinferParenTrail
  • Events 🔔
    vim.api.nvim_create_autocmd("User", {
      pattern = "Parinfer",
      callback = function(ctx)
        vim.api.nvim_buf_set_keymap(ctx.buf, "i", "<c-t>", "<plug>(parinfer-indent)", { noremap = true })
        vim.api.nvim_buf_set_keymap(ctx.buf, "i", "<c-d>", "<plug>(parinfer-dedent)", { noremap = true })
      end,
    })
  • Disable 🙅? Okay 😇
    " locally, disable parinfer for the current buffer
    let b:parinfer_enabled = v:false
    " or just be done with it and not even load it
    let g:loaded_parinfer = v:true " any value will do

Credits‼

  • Jason Felice: The implementation is his. Due credits and license at the head of copypasta code in src/{parinfer,types,changes}.rs. 🙏
  • The rest was written by yours truly 🤦

Licence 📚

See LICENSE

Motivation 💡

Well... I just wanted some more candy and speed for parensurfing... 🏄

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published