Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Abraham <jade.abraham@hpe.com>
  • Loading branch information
jabraham17 committed Jun 11, 2024
1 parent 20b9b22 commit a7ae01a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
28 changes: 22 additions & 6 deletions doc/rst/tools/chpl-language-server/chpl-language-server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ syntax highlighting in Emacs):
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(chpl-mode . ("chpl-language-server"))))
'(chpl-mode . ("chpl-language-server", "--chplcheck"))))
This will enable using the language server with a particular ``.chpl`` file by
calling ``M-x eglot``.
Expand All @@ -91,11 +91,8 @@ additionally add the following to your ``.emacs`` file:
.. note::

There is currently a limitation with Eglot that only one language server can
be registered per language. We are investigating merging the support for
:ref:`readme-chplcheck` such that both can be used in Emacs at the same time,
stay tuned!

The above uses the ``--chplcheck`` flag to enable additional diagnostics from
``chplcheck``. If you do not want to use ``chplcheck``, you can remove this.

Supported Features
------------------
Expand Down Expand Up @@ -191,6 +188,25 @@ The following features are extra visual aids:
| Instantiations | instantiations of a generic function. | |
+----------------+--------------------------------------------+---------------------------------------+

Using ``chplcheck`` from ``CLS``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Although ``chplcheck`` is a separate tool from ``CLS``, it can be used from
``CLS`` to provide additional diagnostics. This is done by enabling the
``--chplcheck`` flag. This will incorporate the diagnostics and fixits from
``chplcheck``.

You can also still pass many of the same ``chplcheck`` flags to ``CLS``, just
prefixed with ``--chplcheck-``. For example, the following command runs the
language server with linting enabled various ``chplcheck`` flags:

.. code-block:: bash
chpl-language-server --chplcheck \
--chplcheck-enable-rule UseExplicitModules \
--chplcheck-disable-rule UnusedLoopIndex \
--chplcheck-add-rules path/to/my/myrules.py
Configuring Chapel Projects
---------------------------

Expand Down
7 changes: 0 additions & 7 deletions doc/rst/tools/chplcheck/chplcheck.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,6 @@ additionally add the following to your ``.emacs`` file:
(add-hook 'chpl-mode-hook 'eglot-ensure)
.. note::

There is currently a limitation with Eglot that only one language server can
be registered per language. We are investigating merging the support for
:ref:`readme-chpl-language-server` such that both can be used in Emacs at the
same time, stay tuned!

Writing New Rules
Expand Down

0 comments on commit a7ae01a

Please sign in to comment.