yeet
This commit is contained in:
62
.config/emacs/modules/lang/crystal/README.org
Normal file
62
.config/emacs/modules/lang/crystal/README.org
Normal file
@@ -0,0 +1,62 @@
|
||||
#+TITLE: lang/crystal
|
||||
#+DATE: January 16, 2017
|
||||
#+SINCE: v1.3
|
||||
#+STARTUP: inlineimages nofold
|
||||
|
||||
* Table of Contents :TOC_3:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#maintainers][Maintainers]]
|
||||
- [[#module-flags][Module Flags]]
|
||||
- [[#plugins][Plugins]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#crystal][Crystal]]
|
||||
- [[#macos][MacOS]]
|
||||
- [[#arch][Arch]]
|
||||
- [[#icr-repl][ICR (REPL)]]
|
||||
- [[#features][Features]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#troubleshooting][Troubleshooting]]
|
||||
|
||||
* Description
|
||||
This modules adds [[https://crystal-lang.org/][crystal]] support.
|
||||
|
||||
+ Syntax-checking (~flycheck~)
|
||||
+ REPL (~inf-crystal~)
|
||||
|
||||
** Maintainers
|
||||
This module has no dedicated maintainers.
|
||||
|
||||
** Module Flags
|
||||
This module provides no flags.
|
||||
|
||||
** Plugins
|
||||
+ [[https://github.com/crystal-lang-tools/emacs-crystal-mode/][crystal-mode]]
|
||||
+ [[https://github.com/brantou/inf-crystal.el/][inf-crystal]]
|
||||
+ if ~:checkers syntax~ is enabled
|
||||
- [[https://github.com/crystal-lang-tools/emacs-crystal-mode/][flycheck-crystal]]
|
||||
- [[https://github.com/crystal-ameba/ameba.el/][flycheck-ameba]]
|
||||
|
||||
* Prerequisites
|
||||
** Crystal
|
||||
you need to install [[https://crystal-lang.org/install/][the crystal compiler]].
|
||||
|
||||
*** MacOS
|
||||
#+begin_src shell
|
||||
brew install crystal
|
||||
#+end_src
|
||||
|
||||
*** Arch
|
||||
#+begin_src shell
|
||||
sudo pacman -S crystal shards
|
||||
#+end_src
|
||||
|
||||
** ICR (REPL)
|
||||
you need to install [[https://github.com/crystal-community/icr][ICR]].
|
||||
|
||||
* TODO Features
|
||||
# An in-depth list of features, how to use them, and their dependencies.
|
||||
* TODO Configuration
|
||||
# How to configure this module, including common problems and how to address them.
|
||||
|
||||
* TODO Troubleshooting
|
||||
# Common issues and their solution, or places to look for help.
|
||||
30
.config/emacs/modules/lang/crystal/config.el
Normal file
30
.config/emacs/modules/lang/crystal/config.el
Normal file
@@ -0,0 +1,30 @@
|
||||
;;; lang/crystal/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(after! crystal-mode
|
||||
(set-lookup-handlers! 'crystal-mode
|
||||
:definition #'crystal-def-jump
|
||||
:references #'crystal-tool-imp)
|
||||
(when (featurep! +lsp)
|
||||
(add-hook 'crystal-mode-local-vars-hook #'lsp!))
|
||||
(map! :localleader
|
||||
:map crystal-mode-map
|
||||
:prefix "t"
|
||||
"a" #'crystal-spec-all
|
||||
"v" #'crystal-spec-buffer
|
||||
"s" #'crystal-spec-line
|
||||
"t" #'crystal-spec-switch))
|
||||
|
||||
|
||||
(use-package! flycheck-crystal
|
||||
:when (featurep! :checkers syntax)
|
||||
:after crystal-mode)
|
||||
|
||||
|
||||
(use-package! flycheck-ameba
|
||||
:when (featurep! :checkers syntax)
|
||||
:after crystal-mode
|
||||
:config (flycheck-ameba-setup))
|
||||
|
||||
|
||||
(use-package! inf-crystal
|
||||
:commands crystal-switch-to-inf)
|
||||
5
.config/emacs/modules/lang/crystal/doctor.el
Normal file
5
.config/emacs/modules/lang/crystal/doctor.el
Normal file
@@ -0,0 +1,5 @@
|
||||
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
||||
;;; lang/crystal/doctor.el
|
||||
|
||||
(unless (executable-find "icr")
|
||||
(warn! "Couldn't find icr. REPL will not work"))
|
||||
8
.config/emacs/modules/lang/crystal/packages.el
Normal file
8
.config/emacs/modules/lang/crystal/packages.el
Normal file
@@ -0,0 +1,8 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/crystal/packages.el
|
||||
|
||||
(package! crystal-mode :pin "15998140b0a4172cd4b4d14d0377fba96a8917fc")
|
||||
(package! inf-crystal :pin "02007b2a2a3bea44902d7c83c4acba1e39d278e3")
|
||||
(when (featurep! :checkers syntax)
|
||||
(package! flycheck-crystal :pin "15998140b0a4172cd4b4d14d0377fba96a8917fc")
|
||||
(package! flycheck-ameba :pin "0c4925ae0e998818326adcb47ed27ddf9761c7dc"))
|
||||
Reference in New Issue
Block a user