FlowType
A full featured Flow type support for Sublime Text 3
Details
Installs
- Total 3K
- Win 557
- Mac 2K
- Linux 412
Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
FlowType
FlowType turns your Sublime Text 3 into a full featured Flow IDE.
Features
- Add and remove flow pragma on a file
- Check file contents for flow errors and highlight regions
- Go to file containing the type definition
- View a variable's type definition
- Show a file's coverage
- Show a text spinner every time the flow cli is working
- Launch cli commands in a thread in order to never block the IDE
Installation
Make sure you have FlowType installed and binary flow
is accesible for Sublime.
This package can be installed using Package Control. Simply install the FlowType
package from the official repository.
Otherwise, you must clone this repository in your packages directory. You can find it using the Preferences -> Browse Packages
menu from within Sublime Text.
$ git clone https://github.com/Pegase745/sublime-flowtype.git FlowType
Usage
Settings
The package settings can be modified in three places:
Description | File Location | Menu Entry |
---|---|---|
Global | Packages/FlowType/FlowType.sublime-settings |
Preferences > Package Settings > FlowType > Settings-Default |
User | Packages/User/FlowType.sublime-settings |
Preferences > Package Settings > FlowType > Settings-User |
Project (recommended) | <projects_location>/<project_name>.sublime-project |
Project > Edit Project (options must be placed under the settings key) |
The default available configuration settings
Key | Description | Default value |
---|---|---|
log_level |
Set logging level | info |
flow_bin_path |
Path to flow binary | /usr/local/bin/flow |
complete_with_builtintypes |
Allow completions of Flow built-in types | true |
suggest_autocomplete_on_edit (beta) |
Show autocomplete suggestions on edit | false |
check_contents_on_edit |
Check contents for Flow errors on edit | true |
check_contents_on_save |
Check contents for Flow errors on save | false |
Key Bindings
The key bindings can be modified in two places:
Description | File Location | Menu Entry |
---|---|---|
Default | Packages/Default/Default (Linux/OSX/Windows).sublime-keymap |
Preferences > Key Bindings |
User | Packages/User/Default (Linux/OSX/Windows).sublime-keymap |
Preferences > Key Bindings |
The default available key bindings
Description | Linux/Windows | OSX |
---|---|---|
View all errors | ctrl+alt+c |
super+alt+c |
Show autocomplete values | ctrl+alt+space |
super+alt+space |
Mouse Bindings
It is not advised to specify default mousemaps in order to not create conflicts with other packages.
Therefore, you can add mouse bindings for FlowType like this:
- For Linux, create a “Default (Linux).sublime-mousemap” in ~/.config/sublime-text-3/Packages/User
- For OSX, create a “Default (OSX).sublime-mousemap” in ~/Library/Application Support/Sublime Text 3/Packages/User
- For Windows, create a “Default (Windows).sublime-mousemap” in %appdata%\Sublime Text 3\Packages\User
For the following binding examples:
Description | Linux/Windows | OSX |
---|---|---|
Go to definition | ctrl+left-click |
super+left-click |
View type | ctrl+right-click |
super+right-click |
You must enter the following conf:
Linux and Windows
[
{
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
"command": "flowtype_goto_definition",
"context": [
{ "key": "selector", "operator": "equal", "operand": "source.js" }
]
},
{
"button": "button2",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
"command": "flowtype_view_type",
"context": [
{ "key": "selector", "operator": "equal", "operand": "source.js" }
]
}
]
OSX
[
{
"button": "button1",
"count": 1,
"modifiers": ["super"],
"press_command": "drag_select",
"command": "flowtype_goto_definition",
"context": [
{ "key": "selector", "operator": "equal", "operand": "source.js" }
]
},
{
"button": "button2",
"count": 1,
"modifiers": ["super"],
"press_command": "drag_select",
"command": "flowtype_view_type",
"context": [
{ "key": "selector", "operator": "equal", "operand": "source.js" }
]
}
]
Change Log
All notable changes to this project will be documented on the Github Releases page.
This project adheres to Semantic Versioning and Keep A Changelog.
License
This package is distributed under the terms of the MIT license. See the LICENSE file for more details.