Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tools:editors [2015-03-03 15:01]
mh created
tools:editors [2024-04-15 17:06] (current)
mh Add section on Visual Studio Code
Line 2: Line 2:
  
 Of course, one can use any text editor to write and modify Curry programs. Of course, one can use any text editor to write and modify Curry programs.
-However, for some editors (listed below), there exist specific modes+However, for some editors/IDEs (listed below), there exist specific modes
 to edit or highlight Curry programs. to edit or highlight Curry programs.
 +
 +===== Visual Studio Code =====
 +
 +In order to get Curry language support in Visual Studio Code,
 +you have to build the
 +[[ https://​github.com/​fwcd/​curry-language-server | Curry Language Server ]]
 +on your machine which requires [[http://​www.haskellstack.org/​ | Haskell stack]].
 +If you have `stack` installed, download the repository,
 +run ''​stack install'',​ and add ''​~/​.local/​bin''​ to your path.
 +For example, execute the following commands:
 +
 +    > git clone https://​github.com/​fwcd/​curry-language-server
 +    > cd curry-language-server
 +    > stack install
 +    > export PATH=~/​.local/​bin:​$PATH
 +
 +After building the Curry Language Server, start Visual Studio Code. Then:
 +
 +  * Go to extensions (Ctrl+Shift+X) and search for Curry or `fwcd.curry`.
 +  * Install the "Curry IDE for Visual Studio Code"
 +  * If the executable ''​curry-language-server''​ is not in your path, set the option ''​curry.languageServer.path''​ explicitly to this executable. This can be done by selecting ''​File>​Preferences>​Settings>​Extensions>​Curry''​.
 +  * There you might also set the `Import Paths` to the directory where your Curry system contains the base libraries, e.g.:
 +
 +      "​curry.languageServer.importPaths":​ [
 +        "/​home/​mh/​pakcs/​lib"​
 +      ],
 +
 +  * The Curry IDE has to find the code of imported modules. In order to do so, you need to run `cypm deps -l` in the directory where you invoke Visual Studio Code. If `cypm` is in your path and you are inside a Curry package, the Curry Language Server does this automatically for you.
 +  * If you reach a situation where the language server cannot find the source code of imported entities, you might try to clean intermediate data. To do so, close Visual Studio Code, remove the directory ''​.curry/​language-server'',​ run ''​cypm deps -l'',​ and start again.
 +
  
 ===== Emacs ===== ===== Emacs =====
 +
 +The distributions of the Curry systems
 +[[ http://​www.informatik.uni-kiel.de/​~pakcs/​ | PAKCS ]] and
 +[[ http://​www-ps.informatik.uni-kiel.de/​kics2 | KiCS2 ]]
 +contain (in the directory ''​tools/​emacs''​) a Curry mode
 +(adapted from a Haskell mode) for the editor
 +[[http://​www.gnu.org/​software/​emacs/​ | Emacs]].
 +The installation and usage is described in the distributed
 +''​README''​ file.
  
  
 ===== Kate ===== ===== Kate =====
 +
 +The [[http://​kate-editor.org/​ | Kate]] editor contains
 +syntax highlighting for Curry programs. This mode can be
 +activated by Kate's download mechanism. To do this, start
 +Kate and go to
 +
 +    Setting
 +      -> Configure Kate ...
 +          -> Open/Save
 +               -> Modes & Filetypes
 +                   -> Download Highlighting Files ...
 +
 +In the dialog, just select Curry (it not already selected), click ''​Install''​
 +and wait for the installation to finish. You must restart Kate for the
 +installation to take effect.
 +
 +===== Atom =====
 +
 +The [[https://​atom.io/​ | Atom]] editor contains syntax highlighting and snippets
 +for Curry programs with the package ''​language-curry''​.
 +To download the package, start Atom and navigate to
 +
 +    Settings
 +      -> Install
 +
 +type in ''​language-curry''​ and hit ''​RETURN''​.
 +Select the corresponding package, click ''​Install''​ and wait for the installation to finish.
 +Alternatively,​ it is possible to download the package via command-line with
 +the Atom Package Manager ''​apm''​ (must be in your ''​PATH''​):​
 +
 +    > apm install language-curry
  
/srv/dokuwiki/currywiki/data/attic/tools/editors.1425391285.txt.gz ยท Last modified: 2015-03-03 15:01 by mh
Back to top
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0