Skip to content

Commit d2dc559

Browse files
authored
Add installation instructions for Arch Linux (#1616)
1 parent df67bee commit d2dc559

File tree

1 file changed

+51
-17
lines changed

1 file changed

+51
-17
lines changed

Diff for: README.md

+51-17
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ Integration point for [ghcide](https://github.com/haskell/ghcide) and [haskell-i
2020
them all. Read the [project's
2121
background](https://neilmitchell.blogspot.com/2020/01/one-haskell-ide-to-rule-them-all.html).
2222

23-
- [Haskell Language Server (HLS)](#haskell-language-server)
23+
- [haskell-language-server](#haskell-language-server)
2424
- [Features](#features)
2525
- [Installation](#installation)
2626
- [Prerequisites](#prerequisites)
2727
- [ghcup](#ghcup)
2828
- [Visual Studio Code](#visual-studio-code)
2929
- [Pre-built binaries](#pre-built-binaries)
30+
- [Arch Linux](#arch-linux)
3031
- [Installation from source](#installation-from-source)
3132
- [Common pre-requirements](#common-pre-requirements)
3233
- [Linux-specific pre-requirements](#linux-specific-pre-requirements)
@@ -36,24 +37,45 @@ background](https://neilmitchell.blogspot.com/2020/01/one-haskell-ide-to-rule-th
3637
- [Install via cabal](#install-via-cabal)
3738
- [Install specific GHC Version](#install-specific-ghc-version)
3839
- [Installation from Hackage](#installation-from-hackage)
39-
- [Configuring haskell-language-server](#configuring-haskell-language-server)
40+
- [Configuring `haskell-language-server`](#configuring-haskell-language-server)
41+
- [Generic server options](#generic-server-options)
42+
- [Generic editor options](#generic-editor-options)
43+
- [Language-specific server options](#language-specific-server-options)
44+
- [Client options](#client-options)
4045
- [Configuring your project build](#configuring-your-project-build)
4146
- [Configuring your editor](#configuring-your-editor)
42-
- [VS Code](#using-haskell-language-server-with-vs-code)
43-
- [Sublime Text](#using-haskell-language-server-with-sublime-text)
44-
- [Vim or Neovim](#using-haskell-language-server-with-vim-or-neovim)
45-
- [Atom](#using-haskell-language-server-with-atom)
46-
- [Emacs](#using-haskell-language-server-with-emacs)
47-
- [Kakoune](#using-haskell-language-server-with-kakoune)
47+
- [VS Code](#vs-code)
48+
- [Sublime Text](#sublime-text)
49+
- [Vim or Neovim](#vim-or-neovim)
50+
- [Coc](#coc)
51+
- [LanguageClient-neovim](#languageclient-neovim)
52+
- [vim-plug](#vim-plug)
53+
- [Clone the LanguageClient-neovim repo](#clone-the-languageclient-neovim-repo)
54+
- [Configuration and sample `~/.vimrc` sections](#configuration-and-sample-vimrc-sections)
55+
- [Atom](#atom)
56+
- [Emacs](#emacs)
57+
- [doom-emacs](#doom-emacs)
58+
- [Spacemacs](#spacemacs)
59+
- [Kakoune](#kakoune)
4860
- [Known limitations](#known-limitations)
4961
- [Preprocessor](#preprocessor)
5062
- [Troubleshooting](#troubleshooting)
63+
- [Common issues](#common-issues)
64+
- [Difficulties with Stack and `Paths_` modules](#difficulties-with-stack-and-paths_-modules)
65+
- [Problems with dynamic linking](#problems-with-dynamic-linking)
66+
- [Troubleshooting the server](#troubleshooting-the-server)
67+
- [Diagnostic mode](#diagnostic-mode)
68+
- [Examining the log](#examining-the-log)
69+
- [Troubleshooting the client](#troubleshooting-the-client)
5170
- [Contributing](#contributing)
71+
- [Style guidelines](#style-guidelines)
5272
- [Building haskell-language-server](#building-haskell-language-server)
5373
- [Using Cabal](#using-cabal)
5474
- [Using Stack](#using-stack)
55-
- [Introduction tutorial](#instructions-tutorial)
75+
- [Using Nix](#using-nix)
76+
- [Introduction tutorial](#introduction-tutorial)
5677
- [Test your hacked HLS in your editor](#test-your-hacked-hls-in-your-editor)
78+
- [Adding support for a new editor](#adding-support-for-a-new-editor)
5779

5880
## Features
5981

@@ -116,6 +138,18 @@ If you are using Visual Studio Code, the [Haskell extension](https://marketplace
116138
There are pre-built binaries available from the [releases page](https://github.com/haskell/haskell-language-server/releases) for Linux, Windows and macOS.
117139
To install, download the `haskell-language-server-wrapper` executable for your platform as well as any `haskell-language-server` executables for the GHC versions you plan on working with, and either put them on your PATH or point your client to them.
118140
141+
### Arch Linux
142+
143+
If you are using Arch Linux with **dynamically linked** Haskell packages from `pacman`,
144+
you can install the latest pre-compiled version of `haskell-language-server` from [[community]](https://archlinux.org/packages/community/x86_64/haskell-language-server/):
145+
146+
```
147+
sudo pacman -S haskell-language-server
148+
```
149+
150+
In this case, `haskell-language-server` is compiled against the GHC distributed to Arch Linux, so you will need maintain a system wide Haskell development environment, and install GHC from `pacman` as well.
151+
See [ArchWiki](https://wiki.archlinux.org/index.php/Haskell) for the details of Haskell infrastructure on Arch Linux.
152+
119153
### Installation from source
120154
121155
#### Common pre-requirements
@@ -437,15 +471,15 @@ Most editors provide a Haskell-specific extension that provides support for laun
437471
Editors typically assume that you have already installed `haskell-language-server` (see above) and that the installation script put the `haskell-language-server` and `haskell-language-server-wrapper` binaries in your `PATH` (usually `~/.local/bin` or `~/.cabal/bin` on Linux and macOS, `%APPDATA%\local\bin` or `%APPDATA%\cabal\bin` on Windows).
438472
The exception is VS Code, which can automatically install the binaries if they are not installed already.
439473

440-
### Using Haskell Language Server with VS Code
474+
### VS Code
441475

442476
Install from
443477
[the VSCode marketplace](https://marketplace.visualstudio.com/items?itemName=haskell.haskell), or manually from the repository [vscode-haskell](https://github.com/haskell/vscode-haskell).
444478
The `haskell-language-server` and `haskell-language-server-wrapper` binaries will be automatically downloaded on an ad-hoc basis, but if you have them already installed on your PATH then it will just use them instead.
445479

446480
Configuration is done via the "Haskell" section of "Settings".
447481

448-
### Using Haskell Language Server with Sublime Text
482+
### Sublime Text
449483

450484
- Install [LSP](https://packagecontrol.io/packages/LSP) using [Package Control](https://packagecontrol.io/)
451485
- From Sublime Text, go to Preferences and search for LSP Settings
@@ -471,7 +505,7 @@ You should have these features available:
471505
2. LSP: Show Diagnostics will show a list of hints and errors
472506
3. LSP: Format Document will prettify the file
473507

474-
### Using Haskell Language Server with Vim or Neovim
508+
### Vim or Neovim
475509

476510
You can use [Coc](https://github.com/neoclide/coc.nvim), [LanguageClient-neovim](https://github.com/autozimu/LanguageClient-neovim)
477511
or any other Vim Language server protocol client.
@@ -560,15 +594,15 @@ let g:LanguageClient_rootMarkers = ['*.cabal', 'stack.yaml']
560594
Further configuration can be done by pointing the [`g:LanguageClient_settingsPath`](https://github.com/autozimu/LanguageClient-neovim/blob/0e5c9546bfddbaa2b01e5056389c25aefc8bf989/doc/LanguageClient.txt#L221)
561595
variable to the file in which you want to keep your LSP settings.
562596

563-
### Using Haskell Language Server with Atom
597+
### Atom
564598

565599
Install the two Atom packages [atom-ide-ui](https://atom.io/packages/atom-ide-ui) and [haskell](https://atom.io/packages/haskell),
566600

567601
```bash
568602
$ apm install language-haskell atom-ide-ui haskell
569603
```
570604

571-
### Using haskell-language-server with Emacs
605+
### Emacs
572606

573607
Emacs support is provided by a combination of the following packages:
574608

@@ -584,7 +618,7 @@ various parts of the Emacs integration.
584618
In particular, `lsp-haskell` provides customization options for the `haskell-language-server`-specific parts,
585619
such as the path to the server executable.
586620

587-
#### Using haskell-language-server with [doom-emacs](https://github.com/hlissner/doom-emacs/tree/develop/modules/lang/haskell#module-flags)
621+
#### [doom-emacs](https://github.com/hlissner/doom-emacs/tree/develop/modules/lang/haskell#module-flags)
588622

589623
Manual installation of packages is not required.
590624
Enable the lsp module and the haskell lang module with lsp flag in `.doom.d/init.el`:
@@ -599,7 +633,7 @@ lsp
599633

600634
then do `$HOME/.emacs.d/bin/doom sync`
601635

602-
#### Using haskell-language-server with [Spacemacs](https://github.com/syl20bnr/spacemacs)
636+
#### [Spacemacs](https://github.com/syl20bnr/spacemacs)
603637

604638
Manual installation of packages is not required.
605639
Enable the `haskell` layer and the `lsp` layer in your Spacemacs config file:
@@ -613,7 +647,7 @@ dotspacemacs-configuration-layers
613647
)
614648
```
615649

616-
### Using haskell-language-server with [Kakoune](https://github.com/mawww/kakoune)
650+
### [Kakoune](https://github.com/mawww/kakoune)
617651

618652
1. Grab a copy of [kak-lsp](https://github.com/ul/kak-lsp), and follow the setup instructions.
619653
2. Point your `kak-lsp.toml` to `haskell-language-server-wrapper`.

0 commit comments

Comments
 (0)