Add lang/factor module (#2129)
Factor is a stack based programming language with an awesome emacs mode. * remove extra layer of nesting for keybinds * use-package! * lazy load fuel * fue listener typo * remove extra space * Add README
This commit is contained in:
parent
7cec80e9f1
commit
f5910caea8
4 changed files with 95 additions and 0 deletions
|
@ -121,6 +121,7 @@
|
||||||
;;kotlin ; a better, slicker Java(Script)
|
;;kotlin ; a better, slicker Java(Script)
|
||||||
;;latex ; writing papers in Emacs has never been so fun
|
;;latex ; writing papers in Emacs has never been so fun
|
||||||
;;lean
|
;;lean
|
||||||
|
;;factor
|
||||||
;;ledger ; an accounting system in Emacs
|
;;ledger ; an accounting system in Emacs
|
||||||
;;lua ; one-based indices? one-based indices
|
;;lua ; one-based indices? one-based indices
|
||||||
markdown ; writing docs for people to ignore
|
markdown ; writing docs for people to ignore
|
||||||
|
|
43
modules/lang/factor/README.org
Normal file
43
modules/lang/factor/README.org
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
#+TITLE: lang/factor
|
||||||
|
#+DATE: December 3, 2019
|
||||||
|
#+SINCE: v3.0.0
|
||||||
|
#+STARTUP: inlineimages
|
||||||
|
|
||||||
|
* Table of Contents :TOC_3:noexport:
|
||||||
|
- [[#description][Description]]
|
||||||
|
- [[#module-flags][Module Flags]]
|
||||||
|
- [[#plugins][Plugins]]
|
||||||
|
- [[#hacks][Hacks]]
|
||||||
|
- [[#prerequisites][Prerequisites]]
|
||||||
|
- [[#configuration][Configuration]]
|
||||||
|
- [[#troubleshooting][Troubleshooting]]
|
||||||
|
|
||||||
|
* Description
|
||||||
|
This module adds support to the [[https://github.com/factor/factor][factor]] programming language and its associated
|
||||||
|
_fuel_ emacs plugin.
|
||||||
|
|
||||||
|
+ If possible, include a brief list of feature highlights here
|
||||||
|
+ Like code completion, syntax checking or available snippets
|
||||||
|
+ Include links to packages & external things where possible
|
||||||
|
|
||||||
|
** Module Flags
|
||||||
|
This module provides no flags.
|
||||||
|
|
||||||
|
** Plugins
|
||||||
|
{A list of linked plugins}
|
||||||
|
|
||||||
|
** Hacks
|
||||||
|
{A list of internal modifications to included packages}
|
||||||
|
|
||||||
|
* Prerequisites
|
||||||
|
You must install [[https://github.com/factor/factor][factor]] to use the advanced functionality of this module.
|
||||||
|
|
||||||
|
* Configuration
|
||||||
|
This module requires the installation of factor to be available at
|
||||||
|
=fuel-factor-root-dir=. Here's an example of how to set it:
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq fuel-factor-root-dir "/Applications/factor")
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
* Troubleshooting
|
||||||
|
Common issues and their solution, or places to look for help.
|
47
modules/lang/factor/config.el
Normal file
47
modules/lang/factor/config.el
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
;;; lang/factor/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(use-package! fuel-mode
|
||||||
|
:defer t
|
||||||
|
:init
|
||||||
|
(set-eval-handler! 'factor-mode #'fuel-eval-region)
|
||||||
|
(set-repl-handler! 'factor-mode #'run-factor)
|
||||||
|
:config
|
||||||
|
(set-lookup-handlers! 'factor-mode
|
||||||
|
:definition #'fuel-edit-word-at-point
|
||||||
|
:references #'fuel-show-callers
|
||||||
|
:documentation #'fuel-help))
|
||||||
|
|
||||||
|
(map! :after factor-mode
|
||||||
|
:map factor-mode-map
|
||||||
|
:localleader
|
||||||
|
"t" #'fuel-test-vocab
|
||||||
|
(:prefix ("e" . "eval")
|
||||||
|
"d" #'fuel-eval-definition
|
||||||
|
"R" #'fuel-eval-extended-region
|
||||||
|
"r" #'fuel-eval-region)
|
||||||
|
(:prefix ("h" . "help")
|
||||||
|
"p" #'fuel-apropos
|
||||||
|
"v" #'fuel-show-file-words
|
||||||
|
"c" #'fuel-show-callees
|
||||||
|
"e" #'fuel-stack-effect-region)
|
||||||
|
(:prefix ("s" . "scaffold")
|
||||||
|
"v" #'fuel-scaffold-vocab
|
||||||
|
"h" #'fuel-scaffold-help
|
||||||
|
"t" #'fuel-scaffold-tests)
|
||||||
|
(:prefix ("r" . "refactor")
|
||||||
|
"s" #'fuel-refactor-extract-sexp
|
||||||
|
"w" #'fuel-refactor-extract-region
|
||||||
|
"v" #'fuel-refactor-extract-vocab
|
||||||
|
"i" #'fuel-refactor-inline-word
|
||||||
|
"g" #'fuel-refactor-make-generic
|
||||||
|
"u" #'fuel-update-usings
|
||||||
|
"r" #'fuel-refactor-rename-word))
|
||||||
|
|
||||||
|
(map! :after fuel-listener
|
||||||
|
:map fuel-listener-mode-map
|
||||||
|
:localleader
|
||||||
|
"e" #'fuel-edit-vocabulary
|
||||||
|
"r" #'fuel-refresh-all
|
||||||
|
"i" #'fuel-stack-mode
|
||||||
|
"h" #'fuel-help
|
||||||
|
"s" #'fuel-scaffold-vocab)
|
4
modules/lang/factor/packages.el
Normal file
4
modules/lang/factor/packages.el
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
;; -*- no-byte-compile: t; -*-
|
||||||
|
;;; lang/factor/packages.el
|
||||||
|
|
||||||
|
(package! fuel)
|
Loading…
Add table
Add a link
Reference in a new issue