spacemacs haskell layer配置

最近在学习haskell, 做练习都是直接在txt里面写代码,没有高亮、缩进也不好控制,经常出错,因此想换到一个方便的开发环境,正好spacemacs有haskell layer,就换到emacs了。

安装由4步组成:

  1. 安装必要的package,我使用的构建工具是stack
stack install hlint stylish-haskell hasktags ghc-mod
  1. spacemacs 配置haskell layer
dotspacemacs-configuration-layers中添加haskell
  1. 配置hindent, 用于格式化代码(可选)
stack install hindent  #install hindent
(haskell :variables haskell-enable-hindent-style "johan-tibell") #修改layer中的haskell
  1. 设置$PATH环境变量
    开始在.bashrc中设置path包含.local/bin,运行时会提示cant find
    programe ghc-mod等等,最后在dotspacemacs的exec-path中添加生效.
(add-to-list 'exec-path "~/.local/bin/") # user-config函数中添加

参考: 官方文档

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容