Skip to content
This repository was archived by the owner on May 1, 2022. It is now read-only.

Commit 81ba57d

Browse files
committed
Modernize vim-hack
- update standard files to current FB standards - remove everything except syntax highlighting in favor of `hh_client lsp` (and update readme to cover this) - set filetype to `hack` rather than `php`
1 parent d6b0a9a commit 81ba57d

File tree

6 files changed

+73
-286
lines changed

6 files changed

+73
-286
lines changed

CODE_OF_CONDUCT.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Code of Conduct
2+
3+
Facebook has adopted a Code of Conduct that we expect project participants to adhere to.
4+
Please read the [full text](https://code.fb.com/codeofconduct/)
5+
so that you can understand what actions will and will not be tolerated.

CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Contributing to vim-hack
2+
We want to make contributing to this project as easy and transparent as
3+
possible.
4+
5+
## Our Development Process
6+
7+
We primarily work by sending pull requests to the master branch of GitHub. Releases are also
8+
tagged from this branch.
9+
10+
## Pull Requests
11+
We actively welcome your pull requests.
12+
13+
1. Fork the repo and create your branch from `master`.
14+
2. If you've added code that should be tested, add tests.
15+
3. If you've changed APIs, update the documentation.
16+
4. Ensure the test suite passes.
17+
5. If you haven't already, complete the Contributor License Agreement ("CLA").
18+
19+
## Contributor License Agreement ("CLA")
20+
In order to accept your pull request, we need you to submit a CLA. You only need
21+
to do this once to work on any of Facebook's open source projects.
22+
23+
Complete your CLA here: <https://code.facebook.com/cla>
24+
25+
## Issues
26+
We use GitHub issues to track public bugs. Please ensure your description is
27+
clear and has sufficient instructions to be able to reproduce the issue.
28+
29+
Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
30+
disclosure of security bugs. In those cases, please go through the process
31+
outlined on that page and do not file a public issue.
32+
33+
## License
34+
By contributing to vim-hack, you agree that your contributions will be licensed
35+
under the LICENSE file in the root directory of this source tree.

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
About `vim-hack`
2+
================
3+
4+
`vim-hack` provides file type detection and syntax highlighting for Hack files.
5+
6+
For advanced features, we recommend using this plugin in combination with a
7+
Language Server Protocol plugin for Vim, such as
8+
[LanguageClient-neovim](https://github.com/autozimu/LanguageClient-neovim),
9+
configured to run `hh_client lsp` - for example:
10+
11+
```
12+
let g:LanguageClient_serverCommands = {
13+
\ 'hack': [ 'hh_client', 'lsp' ],
14+
\ }
15+
```
16+
17+
LanguageClient-neovim supports both vim and nevim.
18+
119
Installation
220
============
321

@@ -13,3 +31,12 @@ that ships with Vim 7.4, or a compatible file.
1331
For more information on the Hack language, visit http://hacklang.org.
1432

1533
[pathogen]: https://github.com/tpope/vim-pathogen
34+
35+
Alternatively, if you are using `vim-plug`:
36+
37+
Plug 'hhvm/vim-hack'
38+
39+
License
40+
=======
41+
42+
vim-hack is BSD licensed, as found in the LICENSE file. We also provide an additional patent grant.

after/ftplugin/php.vim

Lines changed: 0 additions & 43 deletions
This file was deleted.

ftdetect/hack.vim

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
" grant of patent rights can be found in the PATENTS file in the same
1212
" directory.
1313

14-
au BufRead,BufNewFile *.hhi setl filetype=php
14+
au BufRead,BufNewFile *.hhi
15+
\ setl filetype=hack |
16+
\ runtime! syntax/php.vim
1517

16-
au BufRead,BufNewFile *.hh
18+
au BufRead,BufNewFile *.hh,*.php
1719
\ if getline(1) =~ '^<?hh' |
18-
\ setl filetype=php |
20+
\ setl filetype=hack |
21+
\ runtime! syntax/php.vim |
1922
\ endif

plugin/hack.vim

Lines changed: 0 additions & 240 deletions
This file was deleted.

0 commit comments

Comments
 (0)