Elixir is a cool language which implements a syntax approach like Ruby on top of the Erlang runtime BEAM. It is a fully functional programming language with a powerful macro system with full integration with the world famous Erlang OTP and a powerful MVC website framework called Phoenix.
I use Language Server Protocol for Elixir in Emacs CCE , I believe LSP mode can automatically install the server
emacs-lisp source:(provide 'cce/elixir) (use-package elixir-mode :config (setq lsp-ui-flycheck-enable 1) (setq lsp-elixir-server-command '("elixir-ls")) :hook (elixir-mode . lsp) (elixir-mode . company-mode) (elixir-mode . (lambda () (add-hook 'before-save-hook 'elixir-format nil t))) (elixir-mode . flycheck-mode) :bind (:map elixir-mode-map ("C-<tab>" . company-complete))) (use-package ob-elixir)
#+BEGINSRC yaml
name: elixir installed dnf: name:
elixir
elixir-doc
erlang
erlang-doc
state: installed tags:
elixir
code
#+endsrc
I need node.js installed for Phoenix to be able to webpack assets.
yaml source:- name: phoenix dependencies installed dnf: name: - nodejs - npm - inotify-tools state: installed tags: - elixir - code - name: elixir-ls directory exists become: yes become_user: "{{local_account}}" file: state: directory path: ~/Code/elixir-ls tags: - elixir - code - name: clone elixir-ls become: yes become_user: "{{local_account}}" unarchive: dest: ~/Code/elixir-ls/ remote_src: yes src: https://github.com/elixir-lsp/elixir-ls/releases/download/v0.3.3/elixir-ls.zip tags: - elixir - code - name: executables can be executed become: yes become_user: "{{local_account}}" file: mode: 0755 path: "{{item}}" with_items: - ~/Code/elixir-ls/debugger.sh - ~/Code/elixir-ls/language_server.sh tags: - elixir - code
Some fucking face crap:
emacs-lisp source:(defun cce/fix-elixir-faces () (face-remap-add-relative 'elixir-atom-face '(:inherit font-lock-builtin-face))) (add-hook 'elixir-mode-hook #'cce/fix-elixir-faces)