https://github.com/carlosrocha/vim-flow-plus
Vim + Flow integration, includes coverage highlight
https://github.com/carlosrocha/vim-flow-plus
flowtype vim
Last synced: 9 months ago
JSON representation
Vim + Flow integration, includes coverage highlight
- Host: GitHub
- URL: https://github.com/carlosrocha/vim-flow-plus
- Owner: carlosrocha
- Created: 2017-01-24T15:03:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-20T00:36:15.000Z (over 9 years ago)
- Last Synced: 2025-10-05T08:42:46.924Z (9 months ago)
- Topics: flowtype, vim
- Language: Vim script
- Homepage:
- Size: 181 KB
- Stars: 7
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vim-flow-plus
## Requirements
Vim version that supports `json_decode`.
## Install
If you use [vim-plug](https://github.com/junegunn/vim-plug):
```
Plug 'carlosrocha/vim-flow-plus'
```
## Using
### Display coverage
Using [lightline](https://github.com/itchyny/lightline.vim):
```VimL
let g:lightline = {
"...
\ 'right': [ [ 'percent', 'lineinfo' ],
\ [ 'syntastic', 'flow' ],
\ [ 'fileformat', 'fileencoding', 'filetype' ] ],
\ },
\ 'component_function': {
" ...
\ 'flow': 'LightlineFlowCoverage',
" ...
\ },
\ }
function! LightlineFlowCoverage()
if exists('b:flow_coverage_status')
return b:flow_coverage_status
endif
return ''
endfunction
```
Result:

## Commands
### `FlowCoverageToggle`
Toggle to highlight uncovered expressions in the current file.

### `FlowPrevRef`
Go to the next reference of the variable under the cursor.
### `FlowNextRef`
Go to the previous reference of the variable under the cursor.
### `FlowTypeAtPos`
Displays the type of the variable under the cursor.
### `FlowGetDef`
Go to the definition of the variable under the cursor.