Skip to content

yapf formatter in nvim, it's use the async feature of neovim!

Notifications You must be signed in to change notification settings

drinks5/nvim-yapf-formater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

nvim-yapf-formater

yapf formatter in nvim, it's use the async feature of neovim!

##Feathers

  • async, when excute the format command, you can move the cursor free!
  • auto find the current tag, and then format it, it was so quickly!
  • diff the saved text with the buffer, if didn't has diff, ignored!
  • it use the python client with neovim.

##Install

with the vim-plug
Plug 'drinksober/nvim-yapf-formater'

##Normal mode In normal mode, it will find the range of current tag(function or class) in current line, if fail, if will format the whole buffer

##Visual mode In visual mode, it will formater the whole buffer

##Example config

noremap <leader>y :YapfFormat<CR>
vnoremap <leader>y :YapfFormat 'full'<CR>

###use the autocmd with format the scope of the tag

autocmd InsertLeave * YapfFormater

About

yapf formatter in nvim, it's use the async feature of neovim!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages