migrate to 12.0
[ta-parkour.git] / README.md
blob19ec41995b97fdd7b296725ad38b30ddd8b82390
1 ta-parkour is a structured editing plugin for the [Textadept editor](https://foicica.com/textadept),
2 based on the [parkour library](https://repo.or.cz/lisp-parkour.git).
4 # Configuration
6 In `~/.textadept/init.lua`:
8     local pk = require'ta-parkour'
10     -- optional:
11     pk.auto_square_brackets = true
12     pk.lispwords.scheme.lambda = 0
13     pk.repl_fifo = os.getenv('HOME')..'/.repl_fifo'
14     pk.emacs = true
16 ## `auto_square_brackets`
18 Rewrites any delimiter to a square bracket at certain locations.  
19 Has effect only on Scheme; for Clojure and Fennel this behaviour is always on.  
20 Works both when inserting and wrapping.  
21 The locations are not configurable ATM, but are grouped by language in the code - see, for example, the [Fennel config](parkour/fmt/fennel/squarewords.lua).
23 ## `lispwords`_`.dialect.word`_
25 The plugin comes with a set of indentation rules for each supported file type,
26 but they are incomplete and sometimes will be wrong (due to multiple possible dialects under a single file type).  
27 The `lispwords` table allows customizing those rules by setting the desired number of distinguished arguments
28 a function/macro has. (`0` is like `defun` in Emacs.)  
29 As an example, see the built-in indent numbers [for Scheme](parkour/fmt/scheme/lispwords.lua).
31 ## `repl_fifo`
33 This option can be set to the path of a named pipe from which a REPL (or anything, really) can read input.  
34 Inserting a newline at the end of the last line of a paragraph will send the paragraph to this pipe.  
35 Since REPL commands fit the criteria for paragraph (a top-level S-expression), they get sent as well.
37 ## `emacs`
39 The plugin comes with two key themes - [emacs](keytheme/emacs.lua) and [CUA](keytheme/CUA.lua).  
40 `CUA` is always enabled.  
41 Setting this option to true will enable the `emacs` key theme, too. (A few CUA and built-in key bindings will be overriden.)
43 __Note:__ menu mnemonics conflicting with `Alt+` shortcuts of an active key theme will be disabled in the current buffer.  
44 __Note:__ The linked key themes are the only "documentation" on the available keyboard shortcuts ATM.