Bug 1706325 - Minor tweaks to the VIM docs. r=sylvestre

Mostly mentioning that other completion engines also work, and how to
set jsm files to be treated like other JS files (and thus ESLint etc
would work on them).

Differential Revision: https://phabricator.services.mozilla.com/D112729
This commit is contained in:
Emilio Cobos Álvarez 2021-04-20 14:19:09 +00:00
Родитель cb92d64d4d
Коммит c78d99121a
1 изменённых файлов: 13 добавлений и 4 удалений

Просмотреть файл

@ -30,11 +30,13 @@ AutoCompletion
~~~~~~~~~~~~~~
There's C++ and Rust auto-completion support for VIM via
`YouCompleteMe <https://github.com/ycm-core/YouCompleteMe/>`__.
`YouCompleteMe <https://github.com/ycm-core/YouCompleteMe/>`__. As long as that
is installed and you have run :code:`./mach build` or :code:`./mach configure`,
it should work out of the box. Configuration for this lives in
:code:`.ycm_extra_conf` at the root of the repo.
As long as that is installed and you have run :code:`./mach build` or
:code:`./mach configure`, it should work out of the box. Configuration for this lives
in :code:`.ycm_extra_conf` at the root of the repo.
If you don't like YouCompleteMe, other solutions also work, but they'll require
you to create a :code:`compile_commands.json` file (see below for instructions).
Rust auto-completion should work both with the default completer (RLS, as of
this writing), or with `rust-analyzer <https://rust-analyzer.github.io/manual.html#youcompleteme>`__.
@ -45,6 +47,13 @@ ESLint
The easiest way to integrate ESLint with VIM is using the `Syntastic plugin
<https://github.com/vim-syntastic/syntastic>`__.
In order for VIM to detect jsm files as JS you might want something like this
in your :code:`.vimrc`:
.. code::
autocmd BufRead,BufNewFile *.jsm set filetype=javascript
:code:`mach eslint --setup` installs a specific ESLint version and some ESLint
plugins into the repositories' :code:`node_modules`.