Commit 960d06f
Add Flow Language Server support (#603)
* Add support for JavaScript Flow LSP
This language server is considered an "add-on", that is, it will be
enabled simultaneously with another JavaScript/TypeScript server if
both are present and the buffer meets the conditions of a Flow source
file. The server used is the official one from https://flow.org, which
is supposedly the one that will be better supported now and in the
future.
In order to fine grain the decision of when to enable this server, a
new `activation-fn` has been added to the `lsp-client` structure. If
present, this function overrides `major-modes` and `remote?`, in case
that any of them are also present when registering a new language
client.
In particular, the new Flow client considers that the file is a Flow
file if the following conditions are met:
- The major mode is one of js-mode, js2-mode, or flow-js2-mode.
- The file resides in a Flow project (there is a .flowconfig file).
- The file has a `// @flow` or `/* @flow */` tag.
* Update README
* Remove redundant lambda1 parent bb9ca39 commit 960d06f
3 files changed
+76
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
146 | 208 | | |
147 | 209 | | |
148 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
657 | 663 | | |
658 | 664 | | |
659 | 665 | | |
| |||
3453 | 3459 | | |
3454 | 3460 | | |
3455 | 3461 | | |
3456 | | - | |
3457 | | - | |
3458 | | - | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
3459 | 3467 | | |
3460 | 3468 | | |
3461 | 3469 | | |
| |||
0 commit comments