Merge pull request #2371 from pekist/develop

Add LSP Support to Erlang
This commit is contained in:
Henrik Lissner 2020-01-14 19:19:13 -05:00 committed by GitHub
commit fd3ec5a33c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 2 deletions

View file

@ -0,0 +1,39 @@
#+TITLE: lang/erlang
#+DATE: January 14, 2020
#+SINCE: {replace with next tagged release version}
#+STARTUP: inlineimages nofold
* Table of Contents :TOC_3:noexport:
- [[#description][Description]]
- [[#maintainers][Maintainers]]
- [[#module-flags][Module Flags]]
- [[#plugins][Plugins]]
- [[#prerequisites][Prerequisites]]
- [[#features][Features]]
* Description
This module provides support [[https://www.erlang.org/][Erlang programming language]]. Support for the
[[https://github.com/erlang/sourcer][sourcer]] language server is optional.
** Maintainers
This module has no dedicated maintainers.
** Module Flags
+ ~+lsp~ Enable LSP Support. Requires [[https://github.com/erlang/sourcer][sourcer]].
** Plugins
+ Erlang Mode (bundled with Erlang installations)
+ [[https://github.com/joedevivo/flycheck-rebar3][flycheck-rebar3]]
+ [[https://github.com/s-kostyaev/ivy-erlang-complete][ivy-erlang-complete]]
* Prerequisites
You should have Erlang installed. Check your distribution's package manager or a
version management tool such as [[https://github.com/kerl/kerl][kerl]].
If you want LSP support, install [[https://github.com/erlang/sourcer][sourcer]].
* Features
- Code completion (~+lsp~, ~:completion company~, and ~:completion ivy~)
- Syntax checking (~:checkers syntax~)

View file

@ -22,4 +22,8 @@
(use-package! company-erlang
:when (featurep! :completion company)
:unless (featurep! +lsp)
:hook (erlang-mode . company-erlang-init))
(when (featurep! +lsp)
(add-hook 'erlang-mode-local-vars-hook #'lsp!))

View file

@ -6,8 +6,10 @@
(when (featurep! :checkers syntax)
(package! flycheck-rebar3))
(when (featurep! :completion ivy)
(when (and (featurep! :completion ivy)
(not (featurep! +lsp)))
(package! ivy-erlang-complete))
(when (featurep! :completion company)
(when (and (featurep! :completion company)
(not (featurep! +lsp)))
(package! company-erlang))