1

Regenerate nvim config

This commit is contained in:
2024-06-02 03:29:20 +02:00
parent 75eea0c030
commit ef2e28883d
5576 changed files with 604886 additions and 503 deletions

View File

@ -0,0 +1,48 @@
# IntelliTab
IntelliTab is a small neovim plugin that fixes an annoying gripe I've had with
vim's tab completion implementation for ages: pressing tab on a blank line only
indents by a single space, instead of automatically indenting to your specified
location.
With IntelliTab, pressing Tab works like it does on editors such as VSCode, by
indenting to the same place `smartindent` would have indented it to if it were
a new line.
## Installation
Install using your favourite package manager:
```vim
Plug 'pta2002/intellitab.nvim'
```
Now, just rebind `<Tab>`:
```vim
inoremap <Tab> <CMD>lua require("intellitab").indent()<CR>
```
That's it!
### If you are using CoC
CoC wants to have its own binding for Tab, which means it won't be compatible with intellitab by default. A solution to this is to bind Tab to this instead:
```vim
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? <CMD>lua require("intellitab").indent()<CR> :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
```
### If you are using nvim-cmp
On the `nvim-cmp` setup, add this binding for tab:
```lua
['<Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_next_item() -- or whatever else you want nvim-cmp to do when you press tab
else
require("intellitab").indent()
end
end
```