1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-23 07:15:52 +03:00
Commit Graph

31 Commits

Author SHA1 Message Date
Johannes Altmanninger
fea851b78b rc filetype: add some missing ModeChange hooks for trim-indent
Some languages have a trim-indent command but don't use it (for no
apparent reason). Make them trim trailing spaces when exiting insert
mode, like most other languages support scripts do.
2022-05-29 08:23:33 +02:00
Dmitry Matveyev
a65501a1d9 Rename exec->execute-keys for consistency 2021-06-06 14:28:28 +06:00
Dmitry Matveyev
0b1654b0cf Better comment inserting tests and fix implementation 2021-06-06 14:13:34 +06:00
Dmitry Matveyev
fcc04384d1 Fix Ruby <ret> mid-comment
Implementation is copied from Nim.
2021-06-06 00:38:36 +06:00
Dmitry Matveyev
02e625e8fb Remove electric behavior for end keyword
Correctly indentint on "end" keyword seems very hard,
it is simpler to remove it. And we already insert "end"
in ruby-insert-on-new-line hook, so the removal shouldn't
hurt too much.
2021-06-06 00:30:50 +06:00
Taupiqueur
f65fbd1a2d Ruby: Add require_relative keyword 2021-04-28 14:25:51 +02:00
connor
8b0fe9cfb0 Avoid recognizing remainder division as a percent string 2020-11-18 16:26:33 -07:00
Johannes Altmanninger
335ee743a4 Fix overzealous closing of ruby heredocs
Fixes #2516
2020-10-19 19:01:17 +02:00
Johannes Altmanninger
9a7d8df447 Avoid accidentally using environment variables in sh scopes
On the instances with altfile this was already the case, but this makes it more obvious.

Closes #3673
2020-08-24 19:01:05 +02:00
John Isom
fdf38ecc5e Fix auto indentation for if/case and else 2020-08-02 11:28:27 -06:00
Maxime Coste
f60b0a1441 Merge remote-tracking branch 'johnisom/ruby-indentation' 2020-08-02 16:25:07 +10:00
John Isom
8a02bafe0d Beautify indenting in add-highlighter region for percent literals 2020-08-01 13:54:16 -06:00
John Isom
dee96f8e82 Improve syntax highlighting of Ruby percent literals
The syntax highlighting has been broken down into 3 main categories:
string: string, array of words
variable: symbol, array of symbols
meta: regexp, shell execution
2020-08-01 13:37:40 -06:00
John Isom
92558bb675 Add rule for % string literals without bracket/style chars; no recurse yet
Becuase %Q^hello^ is a perfectly valid Ruby string literal. Strange, I know.
2020-08-01 13:18:47 -06:00
John Isom
57e9719c25 Add 'else' to auto deindent/align logic in context of 'case' statement 2020-08-01 11:57:38 -06:00
John Isom
322d0659fd Add 'when' to list of keywords that signifies end for ruby-insert-on-new-line 2020-08-01 11:54:57 -06:00
John Isom
d6e3c1ff19 Fix deindenting nested blocks/statements 2020-08-01 10:52:26 -06:00
John Isom
b7490d853d Add support for deindenting rescue statment when part of def (instead of just begin) 2020-08-01 10:28:54 -06:00
John Isom
e84ebfdfab Replace ') <a-&>' with '1<a-&>' 2020-08-01 10:16:48 -06:00
John Isom
c793712318 Fix ruby-indent-on-char 2020-07-31 19:24:19 -06:00
Alex Leferry 2
002e0f8790 Ruby: Better matching of divisions
Do not include prefix data in match.
2020-07-20 22:03:27 +02:00
Alex Leferry 2
2219f0ef78 Ruby: Add support for %{…} percent string literals 2020-07-09 11:24:22 +02:00
Las
e142a37f21 rc ruby: Don't recognize "keyword"-like identifiers
In Ruby, identifiers can end with a `!` or `?` too, which means that `class!` or `end?`are not actually keywords, but regular identifiers. This fixes that by not using `\b` but `[^0-9A-Za-z_!?]` instead in some places.
2020-03-25 21:18:21 +09: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
Olivier Perret
fac05f3ea0 [rc] Use 'fail' when the alternative file cannot be found
This makes it possible to implement a fallback strategy using 'try .. catch',
for cases where the alternative file is not stored in a subdirectory
2019-10-08 18:06:54 +02:00
Dmitry Matveyev
68cdfb9b9d Add more ending blocks for ruby "end" keyword autoinsertion 2019-06-21 13:55:14 +03:00
Dmitry Matveyev
01159a9e72 Add support for autoformatting after do keyword in Ruby 2019-06-12 09:03:24 +03:00
Dmitry Matveyev
329ede9094 Add test/ ruby-alternative-file implementation 2019-05-25 12:39:52 +03: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