Commit Graph

53 Commits

Author SHA1 Message Date
Maxime Coste
5c219cc743 Merge remote-tracking branch 'sjjf/sh_indent_v2' 2019-07-01 22:00:31 +10:00
Maxime Coste
2e3e0c47bb Merge remote-tracking branch 'greenfork/fix-ruby-end-autoinsertion' 2019-06-30 10:30:40 +10:00
Simon Fowler
b2459f5ecb Remove the sh_auto_indent option.
We now auto indent by default, with the option to disable it handled by
the `diabled_hooks` mechanism.
2019-06-29 12:34:14 +10:00
Frank LENORMAND
e5b9761818 rc filetype d: Highlight quoted backticks properly
Fixes #2970
2019-06-24 10:18:43 +03:00
Frank LENORMAND
b5321f3d1b rc filetype d: Highlight line tokens properly 2019-06-24 10:12:29 +03:00
Maxime Coste
4b7b5d077c Make quoting opt-in by using $kak_quoted_... 2019-06-23 12:04:21 +10:00
Dmitry Matveyev
68cdfb9b9d Add more ending blocks for ruby "end" keyword autoinsertion 2019-06-21 13:55:14 +03:00
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