UNPKG

@ciao-lang/ts-ciao-interface

Version:

Simple Ciao interface for node.

19 lines (13 loc) 6.44 kB
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="theme-color" content="#273f79"/><link rel="stylesheet" href="lpdoc.css" type="text/css"/><script type="text/javascript" src="lpdoc.js"></script><title>Flycheck Ciao: on-the-fly syntax and assertion checking, and testing &mdash; The Ciao System v1.22</title></head><body><div class="lpdoc-page fixleftbar"><a href="#" id="sidebar-toggle-button" class="lpdoc-navbutton"><span id="sidebar-button-arrow">&#9776;</span></a><div id="sidebar" class="lpdoc-sidebar"><div style="height: 40px; margin-left: auto; margin-right: auto"><img src="ciao-logo_autofig.png" width=auto height=100%></div><div class="lpdoc-nav"><span class="lpdoc-on-right"><a class="lpdoc-navbutton" href="AdvCiaoEmacs.html">&#x2191;</a><a class="lpdoc-navbutton" href="AdvCiaoEmacs.html">&#x2190;</a><a class="lpdoc-navbutton" href="company-ciao.html">&#x2192;</a><a class="lpdoc-navbutton" href="ciaosearch.html">&#x1F50D;</a></span><span><a href="ciaofulltoc.html">TOC</a></span></div><hr></hr><ul class="lpdoc-itemize-sectpath"><li><a href="ciao.html">The Ciao System</a> &raquo;<br/> </li><li><a href="DevEnv.html">PART I - The program development environment</a> &raquo;<br/> </li><li><a href="AdvCiaoEmacs.html">Advanced Ciao Emacs functionalities</a> &raquo;<br/> </li><li><a href=""><strong>Flycheck Ciao: on-the-fly syntax and assertion checking, and testing</strong></a></li></ul><hr></hr><em>ON THIS PAGE</em><ul><li><a href="#Setup">Setup</a></li><li><a href="#Using Flycheck">Using Flycheck</a></li><li><a href="#Recommended extensions">Recommended extensions</a></li></ul></div><div class="lpdoc-main"><div id=""><h1>Flycheck Ciao: on-the-fly syntax and assertion checking, and testing</h1> <strong>Author(s):</strong> <a class="lpdoc-idx-anchor" id="Miguel Angel Sanchez Ordaz" href="ciaosearch.html#Miguel Angel Sanchez Ordaz">Miguel Angel Sanchez Ordaz</a>.<p> <a class="lpdoc-idx-anchor" id="0" href="ciaosearch.html#flycheckciao, intro"></a> <a href="https://www.flycheck.org/en/latest/">Flycheck</a> is an <a class="lpdoc-idx-anchor" id="1" href="emacs.html"><tt>emacs</tt></a> extension for checking syntax on the fly. This package adds <a href="https://www.flycheck.org/en/latest/">Flycheck</a> support for Ciao <em>mode</em> with various checkers for different purposes:<p><ul> <p><li><a class="lpdoc-idx-anchor" id="2" href="ciaosearch.html#ciaoc"><tt>ciaoc</tt></a> as syntax checker.<p><li><a class="lpdoc-idx-anchor" id="3" href="ciaosearch.html#ciaopp"><tt>ciaopp</tt></a> as syntax and assertions checker.<p></ul> <p><div id="Setup"><h2>Setup</h2> <p>Before installing this package, <a class="lpdoc-idx-anchor" id="4" href="emacs.html"><tt>emacs</tt></a> 24 is needed for using <a href="https://www.flycheck.org/en/latest/">Flycheck</a>. If you do not have installed it yet, this package <a class="lpdoc-idx-anchor" id="5" href="ciaosearch.html#flycheck-ciao"><tt>flycheck-ciao</tt></a> will do it automatically from MELPA repository, but as it is not available in <a class="lpdoc-idx-anchor" id="6" href="emacs.html"><tt>emacs</tt></a> by default, you should add this code to your <a class="lpdoc-idx-anchor" id="7" href="emacs.html"><tt>emacs</tt></a> <em>init</em> file.<p><pre class="lpdoc-codeblock">(require &apos;package) (add-to-list &apos;package-archives &apos;(&quot;MELPA Stable&quot; . &quot;https://stable.melpa.org/packages/&quot;) t) (package-initialize) </pre> <p>There are two options for the setup:<p><ul> <p><li>Insert the next line into your <a class="lpdoc-idx-anchor" id="8" href="emacs.html"><tt>emacs</tt></a> init file.<p><pre class="lpdoc-codeblock">(eval-after-load &apos;flycheck &apos;(add-hook &apos;flycheck-mode-hook &apos;flycheck-ciao-setup)) </pre> <p><li>If you use <a href="https://github.com/jwiegley/use-package">use-package</a>, you can insert instead.<p><pre class="lpdoc-codeblock">(use-package flycheck-ciao :after flycheck :hook (flycheck-mode . flycheck-ciao-setup) ) </pre> <p></ul> <p></div><div id="Using Flycheck"><h2>Using Flycheck</h2> <p>All options when using <a href="https://www.flycheck.org/en/latest/">Flycheck</a> are available on the top bar menu <em>Tools -&gt; Syntax Checking</em>.<p><ul> <p><li>To enable Flycheck in the current buffer <span class="lpdoc-emacskey">ESC</span> <span class="lpdoc-emacskey">^X</span> flycheck-mode <span class="lpdoc-emacskey"></span>.<p><ul> <p><li>If you are interested in having Flycheck enabled by default in all buffers where syntax checking is possible, insert the next line in your <a class="lpdoc-idx-anchor" id="9" href="emacs.html"><tt>emacs</tt></a> init file.<p><pre class="lpdoc-codeblock">(add-hook &apos;after-init-hook &apos;global-flycheck-mode) </pre> <p></ul> <p><li>To list all errors found by the checker: <span class="lpdoc-emacskey">C-c</span> <span class="lpdoc-emacskey">!</span> <span class="lpdoc-emacskey">l</span> or <span class="lpdoc-emacskey">ESC</span> <span class="lpdoc-emacskey">^X</span> flycheck-list-errors <span class="lpdoc-emacskey"></span>.<p><li>To select a different syntax checker: <span class="lpdoc-emacskey">C-c</span> <span class="lpdoc-emacskey">!</span> <span class="lpdoc-emacskey">s</span> or <span class="lpdoc-emacskey">ESC</span> <span class="lpdoc-emacskey">^X</span> flycheck-select-checker <span class="lpdoc-emacskey"></span>.<p><li>To verify setup: <span class="lpdoc-emacskey">C-c</span> <span class="lpdoc-emacskey">!</span> <span class="lpdoc-emacskey">v</span> or <span class="lpdoc-emacskey">ESC</span> <span class="lpdoc-emacskey">^X</span> flycheck-verify-setup <span class="lpdoc-emacskey"></span>.<p></ul> <p></div><div id="Recommended extensions"><h2>Recommended extensions</h2> <p>In the official <a href="https://www.flycheck.org/en/latest/">Flycheck</a> manual some extensions are recommended for better user experience.<p><ul> <p><li><a href="https://github.com/flycheck/flycheck-color-mode-line">flycheck-colors-modeline</a> (official) colors the mode line according to the Flycheck status. <li><a href="https://github.com/flycheck/flycheck-pos-tip">flycheck-pos-tip</a> shows Flycheck error messages in a graphical popup.<p></ul> </div><br/></div><div class="lpdoc-footer">Generated with LPdoc using Ciao</div></div><div class="lpdoc-clearer"></div></div></body></html>