Skip to content

Neovim plugin to display flow type coverage information

License

Notifications You must be signed in to change notification settings

stevearc/flow-coverage.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flow-coverage.nvim

Plugin for Neovim's built-in LSP to display flow type coverage as diagnostics

Requirements

Neovim 0.5+

Installation

flow-coverage supports all the usual plugin managers

Packer
require('packer').startup(function()
    use 'stevearc/flow-coverage.nvim'
end)
Paq
require "paq" {
    'stevearc/flow-coverage.nvim';
}
vim-plug
Plug 'stevearc/flow-coverage.nvim'
dein
call dein#add('stevearc/flow-coverage.nvim')
Pathogen
git clone --depth=1 https://github.com/stevearc/flow-coverage.nvim.git ~/.vim/bundle/
Neovim native package
git clone --depth=1 https://github.com/stevearc/flow-coverage.nvim.git \
  "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/pack/flow-coverage/start/flow-coverage.nvim

Setup

Step one is to get Neovim LSP set up, which is beyond the scope of this guide. See nvim-lspconfig for instructions. You will need to use that plugin to set up the flow LSP, for example:

require('lspconfig').flow.setup{}

When the flow LSP client is configured and this plugin is installed, Neovim will automatically start showing uncovered lines using standard diagnostics display. Additionally, you can get the coverage percentage with:

require('flow').get_coverage_percent()

Configuration

Variable Type Default Description
g:flow_coverage_interval number 5000 How often (in ms) to refresh the type coverage of a file. Set to 0 to disable.

About

Neovim plugin to display flow type coverage information

Topics

Resources

License

Stars

Watchers

Forks

Languages