Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

lsp-mode ❤️ haskell

License

NotificationsYou must be signed in to change notification settings

emacs-lsp/lsp-haskell

Repository files navigation

MELPABuild StatusDocs

An Emacs Lisp library for interacting with a Haskell language server such ashaskell-language-server using Microsoft'sLanguage Server Protocol.

The library acts as a client forlsp-mode.

Functionality

This main functionality oflsp-haskell is:

  • Finding and launching thehaskell-language-server binary
  • Providing configuration options tohaskell-language-server

If you would like to know about how LSP functionality is provided in Emacs and how to use it, please consultlsp-mode.If you would like to know about the LSP functionality which is provided by the Haskell language server, please consulthaskell-language-server.

Installation

Follow thelsp-modeinstallation instructions.Do not skip this!It has important information.

lsp-mode automatically requires thelsp-haskell package , so you do not need torequirelsp-haskell unless you like being explicit.

You will need to set some hooks to ensure thatlsp-mode is triggered when your Haskell major mode (e.g.,haskell-mode orhaskell-ts-mode) is entered.

(add-hook'haskell-mode-hook#'lsp)(add-hook'haskell-literate-mode-hook#'lsp)

Configuration

HLS has someconfiguration you can modify using either thelsp-haskell orlsp customization groups:

(customize-group'lsp-haskell); or(customize-group'lsp)

If you want to modify some configuration that this project doesn't support yet you can customize things explicitly yourself usinglsp--set-configuration. For example:

(add-hook'lsp-after-initialize-hook          '(lambda ()             (lsp--set-configuration              '(:haskell (:plugin (:tactics (:config (:timeout_duration5)))))              )))

Language server installation

Follow the instructions on thehaskell-language-server repositories to install the server binaries.

If you have installed the binaries to a location that is not on yourPATH, or you are not using thehaskell-language-server-wrapper, then you will need to customize thelsp-haskell-server-path variable to point to the executable you want to launch.

Server configuration

lsp-haskell provides a few options for for setting the server executable and arguments, and numerous settings for configuring the server itself (hlint, choice of formatting provider, etc.).

Note that server configuration settings will currentlynot be applied until the server is restarted.

Troubleshooting

lsp-haskell isjust the glue betweenlsp-mode andhaskell-language-server.

If you have an issue with Emacs, it is probably alsp-mode issue.If you have an issue with the Haskell functionality itself, it is probably ahaskell-language-server issue.If you have an issue specifically with how the two are joined together, then it belongs here!

If you're not sure what the problem is, thehaskell-language-server README provides some troubleshooting instructions.

Releases

No releases published

Packages

No packages published

Contributors37


[8]ページ先頭

©2009-2025 Movatter.jp