Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/winston0410/smart-cursor.nvim
- Owner: winston0410
- License: mit
- Created: 2021-06-01T16:02:15.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-06-03T07:07:50.000Z (over 3 years ago)
- Last Synced: 2024-08-07T18:38:34.658Z (3 months ago)
- Topics: neovim, neovim-plugin
- Language: Lua
- Homepage:
- Size: 2.93 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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()
```