Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/winston0410/smart-cursor.nvim

Auto-indenting your cursor with treesitter
https://github.com/winston0410/smart-cursor.nvim

neovim neovim-plugin

Last synced: about 1 month ago
JSON representation

Auto-indenting your cursor with treesitter

Awesome Lists containing this project

README

        

# smart-cursor.nvim

Save yourself some formatting and indenting when creating a new line.

Use treesitter for auto-indenting your cursor correctly on a new line.

## Installation

### `Paq.nvim`

```lua
paq{'winston0410/smart-cursor.nvim'}
```

## Configuration

By default no keymapping is set. You have to map `require('smart-cursor').indent_cursor()` to use this plugin.

### Example keybinding

#### Lua

```lua
vim.api.nvim_set_keymap('n', 'o',
'olua require("smart-cursor").indent_cursor()',
{silent = true, noremap = true})
```

#### Vim

```vim
nnoremap o olua require('smart-cursor').indent_cursor()
```