An open API service indexing awesome lists of open source software.

https://github.com/kaiuri/parinfer.nvim


https://github.com/kaiuri/parinfer.nvim

lisp neovim parinfer

Last synced: 30 days ago
JSON representation

Awesome Lists containing this project

README

          

# parinfer.nvim 🀺

Easy peasy lemon squeezy out those parenthesaches from your nuggin πŸ€•

Demo πŸŽ₯


https://github.com/user-attachments/assets/9e746a26-a869-4fbc-9c37-481f9687731f

## 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 πŸ”§

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

## Usage πŸ‘“

- Keymaps :keyboard:
- indent the codes 🀜 `(parinfer-indent)`
- dedent those codes πŸ€› `(parinfer-dedent)`
- Decorations :nail_care:
- πŸ”… Toggle with `:ParinferDecorations`
- 🎨 Customize with `hl-ParinferParenTrail`
- Events πŸ””
```lua
vim.api.nvim_create_autocmd("User", {
pattern = "Parinfer",
callback = function(ctx)
vim.api.nvim_buf_set_keymap(ctx.buf, "i", "", "(parinfer-indent)", { noremap = true })
vim.api.nvim_buf_set_keymap(ctx.buf, "i", "", "(parinfer-dedent)", { noremap = true })
end,
})
```
- Disable πŸ™…? Okay πŸ˜‡
```vim
" 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](https://github.com/eraserhd/parinfer-rust): 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](./LICENSE)

### Motivation πŸ’‘

Well... I just wanted some more candy and speed for parensurfing... πŸ„