Commit Graph

16 Commits

Author SHA1 Message Date
Johannes Altmanninger
0a9c90fecf rc: use a separate *-insert hook to auto-insert comments
This should cover all filetypes that already auto-insert comments,
except for rust.kak, which is left for a follow-up.

Most of these are straightforward, some explanation for special cases:

rc/filetype/zig.kak rc/filetype/cue.kak

  These indent hooks used their own logic to indent after "{" only if
  no comment was inserted. Replace this logic by checking if a comment
  was inserted. This works because these "*-insert" hooks are run
  before their respective "*-indent" hooks.
 
rc/filetype/php.kak

  This also has some logic to insert "*" after "/*" lines. Basic
  usage seems to work still. In future this should borrow from the
  c-family one, which works a bit better.
2021-04-17 20:56:23 +02:00
Johannes Altmanninger
0264c84742 rc: when auto-inserting comments, include trailing spaces from previous line
We already do this in most places.
2021-04-17 20:56:23 +02:00
Michał Kruszewski
f78cd6daf8 Improve '}' auto inserting for go language.
Adding "} else if ... {" was not correctly handled.
2020-09-20 12:25:26 +02:00
Maxime Coste
b8f56a65ed Merge remote-tracking branch 'deviant/add-go-alternative-file' into master 2020-09-17 19:38:59 +10:00
V
c6b7e3d74a Add :alt command for go files 2020-09-10 00:23:46 +02:00
Michał Kruszewski
0f63dd339a Provide better support for Go language.
1. Highlight short variable declaration operator :=.
2. 'while' is not go keyword.
3. Auto insert ')', '}', when line ends with '(' or '{'.
2020-09-07 21:48:06 +02:00
John Isom
1951f19fd8 Update deindentation rule for awk.kak, cabal.kak, go.kak 2020-07-29 15:06:27 -06:00
John Isom
9004502049 Update go brace deindenting to handle bad indentation edge case 2020-07-27 12:19:29 -06:00
John Isom
565e3bef1d Update comment wording for deindentation 2020-07-26 20:46:47 -06:00
John Isom
902f2831d8 Fix indentation rule for go.kak 2020-07-26 20:28:14 -06:00
Frank LENORMAND
21614cb06e src: Create a <semicolon> named key
This commit allows using the <semicolon> expansion in commands, instead
of `\;`.

It makes commands look more elegant, and prevents new-comers from
falling into the trap of using <a-;> without escaping the semicolon.
2019-10-22 11:02:06 +02:00
Maxime Coste
e4fb70ebec Replace ModeChange hooks by ModePush and ModePop
Remove deprecated InsertBegin, InsertEnd, NormalBegin, NormalEnd
hooks.

Closes #2545
2019-10-16 20:45:53 +11:00
Justin Frank
48abc3cbf3 Changed '🦀' to '§' for complex module quoting 2019-04-13 12:57:57 -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
1fab727f2b Modified a bunch of language support files to use modules 2019-04-08 17:02:44 -07:00
Alex Leferry 2
c0dccdd90d Add categories in rc/
Closes #2783
2019-03-21 01:06:16 +01:00