Simon Fowler
04005b06b0
Add support for basic auto-indenting of sh code.
...
This attempts to support a simple formatting and intentation style for
plain sh syntax (and other sh-compatible code which doesn't stray too
far from portable sh).
The complexity of sh syntax means that we have to be opinionated -
attempting to be more flexible would require extensive context
awareness, and would require something more akin to a proper
autoformatting tool or a language server.
The formatting style used here makes use of vertical whitespace as the
primary delimiter, so that code ends up looking like this:
if [ $foo = "bar" ]; then
thing1
else
thing2
fi
for i in foo bar baz; do
thing1
thing2
done
case "$foo" in
bar) thing1;;
baz)
thing1
thing2
;;
esac
Since the formatting style used is very opinionated the 'sh_auto_indent'
option can be used to disable auto-indentation, with the default set to
'no'.
2019-06-20 13:19:15 +10:00
Maxime Coste
59e43c8f0c
Merge remote-tracking branch 'lePerdu/latex-indent'
2019-06-19 23:03:20 +10:00
Maxime Coste
64b6bfa8ba
Merge remote-tracking branch 'dgmulf/awk'
2019-06-19 23:02:21 +10:00
Maxime Coste
27902fa05f
Merge remote-tracking branch 'greenfork/add-dart-highlighting-for-private-classes'
2019-06-19 23:01:56 +10:00
Daniel Mulford
952f919214
Basic language support for Awk
2019-06-17 22:12:15 -07:00
Dmitry Matveyev
aaa078f7c3
Add Dart highliting for private classes
2019-06-17 22:11:19 +03:00
Dmitry Matveyev
bd22b28d39
Fix Dart highlighting of annotations
2019-06-16 11:53:19 +03:00
Maxime Coste
9d52822702
Merge remote-tracking branch 'greenfork/ruby-do-keyword-support'
2019-06-15 10:55:44 +10:00
Dmitry Matveyev
01159a9e72
Add support for autoformatting after do keyword in Ruby
2019-06-12 09:03:24 +03:00
Alex Leferry 2
d97688b624
Update Crystal
2019-06-11 18:33:08 +02:00
Felix Freeman
f246313951
Consider */ closing comment on PHP automatic indentation prefix
2019-06-10 12:12:06 -04:00
hacktivista
2bc14edfd2
Fix PHP comments indentation
2019-06-10 10:47:19 -04:00
Maxime Coste
09e1ec97a9
Merge remote-tracking branch 'alexherbo2/crystal'
2019-06-06 23:14:51 +10:00
Alex Leferry 2
cd0665d61b
Update Crystal
2019-06-05 17:34:18 +02:00
Alex Leferry 2
39e2604420
Rename R.kak → r.kak
2019-06-04 13:56:08 +02:00
lePerdu
dbe32d314f
Add auto-indent scripts for LaTeX
2019-05-31 11:44:15 -04:00
Maxime Coste
14f45c0020
Merge remote-tracking branch 'alexherbo2/crystal'
2019-05-29 20:46:59 +10:00
Dmitry Matveyev
329ede9094
Add test/ ruby-alternative-file implementation
2019-05-25 12:39:52 +03:00
Alex Leferry 2
fff7e9b064
Add support for Crystal
...
https://crystal-lang.org
2019-05-21 18:25:29 +02:00
Maxime Coste
6b7f445936
Merge remote-tracking branch 'eraserhd/clojure-fix-for-1-char-symbols'
2019-05-21 21:36:30 +10:00
Dawid Ciężarkiewicz
d4b57b5b00
rust: Highlight async/await keywords
2019-05-17 20:26:30 -07:00
Jason Felice
ee9c9a777c
clojure: Fix indentation for lists with 1-character heads
...
Indentation can be different depending on the first word of list forms. The
indent hook uses `e` from inside the parent to select the first word for
testing whether it is a special word; however, in the case of a one-character
symbol, this selects to the end of the *next* word.
This rejects such selections.
2019-05-15 11:20:10 -04:00
rs
bd3ec61784
Add support for R
2019-04-25 10:44:43 -05:00
Maxime Coste
0cc89b2b9f
Merge remote-tracking branch 'laelath/provides-requires'
2019-04-25 11:59:42 +01:00
rs
429eeb252c
Fix kak file recognition
2019-04-24 16:06:46 -05:00
Alex Leferry 2
02ce53d20e
Use complete URL
2019-04-24 03:33:54 +02:00
Alex Leferry 2
4d12e750ae
Highlight JavaScript accessors
2019-04-19 12:31:39 +02:00
Justin Frank
48abc3cbf3
Changed ' 🦀 ' to '§' for complex module quoting
2019-04-13 12:57:57 -07:00
Justin Frank
6512eafa60
Update remaining files to new provide/require format
2019-04-11 15:54:58 -07:00
Justin Frank
c2b32ebaa7
Clean up javascript file a bit
2019-04-10 17:08:05 -07:00
Justin Frank
e959b99050
Fixed several more support files.
2019-04-10 16:48:46 -07:00
Justin Frank
80ac46e09d
Fixed many of the filetype support modules to not use BufSetOption
to load
2019-04-09 20:54:19 -07:00
Justin Frank
aa6d19bee6
Added modules to extra files
2019-04-08 17:05:55 -07:00
Justin Frank
c3f694a28f
Modified base files to use modules
2019-04-08 17:02:44 -07:00
Justin Frank
1fab727f2b
Modified a bunch of language support files to use modules
2019-04-08 17:02:44 -07:00
Hampus Fröjdholm
ec68b6a712
Add Python 3.7 breakpoint to list of built-in functions.
2019-04-04 04:46:20 +02:00
Maxime Coste
a32da9d3ee
Fix spurious error from c-family-indent-on-closing-curly-brace
2019-04-01 22:20:43 +11:00
Grant Moyer
d8e4c6801f
Fix autoindent issues with paren in literal
2019-03-31 00:07:12 -04:00
Maxime Coste
2c283d46a5
Merge remote-tracking branch 'GrantMoyer/rust-block-indent'
2019-03-29 20:12:34 +11:00
Grant Moyer
71c5077bec
Block indent on newline when previous line is '(stuff' and move 'stuff' to own line
...
Also, align closing paren on own line with opening paren
2019-03-28 13:17:57 -04:00
Grant Moyer
61840c8b11
Preserve tabs during autoindent and alignment with '(' for c-family languages
...
Also add test for tab preservation during c-family autoindentation, and correct alignment of '}' with opening of block in cases of wrap between '(' and ')' in c-family languages
2019-03-28 13:08:02 -04:00
Maxime Coste
4b98b89437
sh.kak: Use a region for shell expansions
...
Fixes #2763
2019-03-26 13:04:31 +11:00
Ivan Tham
ac4ad861ab
Fix hook
2019-03-23 15:48:12 +00:00
Ivan Tham
ae7f65acd8
Default to rustfmt for formatcmd in rust
...
`rustfmt` is the de facto standard for formatting in rust so setting it by default would be nice.
https://github.com/mawww/kakoune/issues/2801
2019-03-22 16:59:24 +00:00
Maxime Coste
00185995e4
Merge remote-tracking branch 'alexherbo2/rc-categories'
2019-03-21 21:10:36 +11:00
Alex Leferry 2
c0dccdd90d
Add categories in rc/
...
Closes #2783
2019-03-21 01:06:16 +01:00