Commit Graph

796 Commits

Author SHA1 Message Date
Maxime Coste
2d8456db10 Move user mappings to <space> and keep/remove selection to , 2022-07-05 08:43:40 +10:00
Maxime Coste
266d1c37d0 Select pasted text on paste
This is more consistent with the recently changed ! and <a-!>
behaviour
2022-07-05 08:43:40 +10:00
Maxime Coste
ef8a11b3db Make x just select the full lines
`x` is often criticized as hard to predict due to its slightly complex
behaviour of selecting next line if the current one is fully selected.

Change `x` to use the previous `<a-x>` behaviour, and change `<a-x>` to
trim to fully selected lines as `<a-X>` did.

Adapt existing indentation script to the new behaviour
2022-07-05 08:43:40 +10:00
Maxime Coste
046be3b06c Merge remote-tracking branch 'eburghar/highlight_latex3' 2022-07-05 08:40:23 +10:00
Maxime Coste
87ed7c8831 Merge remote-tracking branch 'astaugaard/master' 2022-07-05 08:39:46 +10:00
Maxime Coste
ae9418c578 Merge remote-tracking branch 'ttttcrngyblflpp/fidl' 2022-07-05 08:38:52 +10:00
astaugaard
518963c4bd fix haskell syntax highlighting with comments 2022-07-01 16:38:59 -04:00
Tony Gong
2d8bf65883 Add FIDL filetype support
Add filetype support for FIDL (Fuchsia Interface Definition Language).
2022-06-30 09:11:23 -07:00
Éric BURGHARD
8861a1646e feat: add .ins (latex package installation) file extension to latex type as it is not linked to other filetype 2022-06-30 14:00:45 +02:00
Maxime Coste
3ea6b89558 Merge remote-tracking branch 'krobelus/avoid-breaking-disabled_hooks' 2022-06-30 19:51:35 +10:00
Maxime Coste
9029c523c5 Merge remote-tracking branch 'm-kru/vhdl' 2022-06-30 19:50:48 +10:00
Éric BURGHARD
6a32c43351 fix: alternate stop cs region after first non escaped } to prevent gobbling % 2022-06-28 17:04:35 +02:00
Éric BURGHARD
b81524bd3c fix: add . to include number and fp in lists 2022-06-27 08:55:09 +02:00
Éric BURGHARD
897e8d6aa3 fix: proper escaping for math mode 2022-06-26 21:55:01 +02:00
Éric BURGHARD
1c8bd551db feat: group for control sequence to scope highlighting of types and module 2022-06-26 21:40:56 +02:00
Johannes Altmanninger
d891e7e63e Rename Go auto-insertion hooks to make it easier to disable them
The canonical way to disable all auto-insertion hooks is

	set-option global disabled_hooks .*-insert

A recent change allowed to disable hooks that insert ) and }
independent of hooks that insert // (a step in the right
direction, we should do it for more filetypes).

Since the new hook ("go-insert-closing-delimiter") doesn't match
.*-insert, it broke the above snippet.  Fix this by renaming it to
"go-closing-delimiter-insert".

This makes it a bit less obvious how to disable only comment insertion.
Not sure if there's interest in that, but make it easier by renaming
"go-insert" to "go-comment-insert".
2022-06-26 18:09:34 +02:00
Johannes Altmanninger
afd1fa2217 rc toml: fix wrong highlighting of triple quoted strings that have quotes at the end
In TOML's triple-quoted strings, it's allowed to place quotes just
next to the triple quotes.

	foo = '''bar''''
		    ^    part of the string contents
		     ^^^ closing sequence

We greedily interpret the first three single quotes as closing
sequence. As a result the remaining single quote wrongly opens a new
string. Fix this by only treating triple quotes as closing if they
are not followed by another quote.
I don't think there is another possible interpretation of quadruple
quotes in TOML, so this should not affect other valid inputs.

Fixes #4143
2022-06-26 18:07:22 +02:00
Éric BURGHARD
61a490d658 fix: comment after double \ 2022-06-26 09:50:09 +02:00
Éric BURGHARD
1a96801a52 fix: check for escaped # and {. highlight nested arg (##1) 2022-06-25 10:26:27 +02:00
Éric BURGHARD
9dd0428e0f feat: add l3kernel modules names and types in regex. dim module, scope and type parts 2022-06-24 17:32:15 +02:00
Éric BURGHARD
b7bd624130 feat: highlight latex3 functions, variables and lists 2022-06-24 10:58:22 +02:00
Michał Kruszewski
7be80f59dd VHDL filetype: Add missing 'nul' value and 'hr' unit. 2022-06-20 17:31:05 +02:00
Maxime Coste
dd88765630 Merge remote-tracking branch 'sidkshatriya/git-diff-highlight-trailing-whitespace' 2022-06-14 08:50:40 +10:00
Maxime Coste
445be1cd7b Merge remote-tracking branch 'c7skasku/hare-kak' 2022-06-14 08:49:45 +10:00
Maxime Coste
b92100cad3 Merge remote-tracking branch 'ttttcrngyblflpp/golang_comment_indent' 2022-06-14 08:48:21 +10:00
Sidharth Kshatriya
6ef2d67706 If trailing whitespace was introduced in git diff, show it with red background 2022-06-11 14:53:10 +05:30
Cormac Stephenson
971b52c94e hare.kak: highlight module imports as "module" 2022-06-11 05:55:24 +01:00
Cormac Stephenson
db856ba288 hare.kak: remove TODO list 2022-06-09 13:11:14 +01:00
Jon Eskin
2b051dd25a fix case statement regex 2022-06-09 04:54:50 -04:00
Jon Eskin
318fb02bb9 remove redundant whitespace trim 2022-06-09 04:39:29 -04:00
Jon Eskin
1898528421 Add hare comments and indentation 2022-06-09 04:31:18 -04:00
Cormac Stephenson
3aaee810be rc: add hare language module 2022-06-09 09:04:08 +01:00
Tony Gong
680dc8cd91 Golang do not align to open ( or {
Changed the indentation behavior such that an extra level of
indentation is added after a line containing a ( or { that is
not closed on the same line instead of aligning to the unclosed
( or {. This is consistent with how `go fmt` formats source code.

Added regression tests.
2022-06-05 06:19:30 -07:00
Tony Gong
039a10a34c Do not indent Golang comments as code
When indenting on newline in Go files, only remove trailing whitespace
on the previous line and copy indentation of the previous line if in
comment context.

Added regression tests.
2022-06-05 06:05:45 -07:00
Tony Gong
6f801c6cda Golang separate hook group for inserting ) and }
Add a separate hook group for inserting ) and } on newline because the
current implementation does not work in 100% of cases and should be
able to be disabled independently of copying comment characters (which
is much easier in comparison to get right) if one does not care about
this feature.
2022-06-05 06:03:09 -07:00
Qi Xiao
b99bad6fd0 rc elvish: Support new "catch" keyword. 2022-06-05 12:59:09 +01:00
Johannes Altmanninger
6f28178b91 rc filetype: add trim-indent hooks to all languages that have indent hooks
An indent hook automatically adds whitespace, so it seems prudent to
add the hook to remove unwanted whitespace again. This is what we do
in most languages already.
2022-05-29 08:23:33 +02:00
Johannes Altmanninger
19806a4b4c rc coq: remove unconventional indentation
The next commit will touch this file.
2022-05-29 08:23:33 +02:00
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
Johannes Altmanninger
b929748f8e rc filetype: fix double space in trim-indent hooks 2022-05-26 17:08:15 +02:00
Johannes Altmanninger
4c7207991a rc crystal: stop using ruby-trim-indent 2022-05-26 17:08:15 +02:00
Sidharth Kshatriya
70f9d8fbef OCaml: Recognize '\"' as a char literal and not the start of a string literal 2022-05-15 11:23:06 +05:30
Sidharth Kshatriya
8cfe59fcb0 OCaml: Automatically insert closing comment when user starts a comment
An OCaml comment is `(* Some comment *)`. Like the C-family this can be
a multiline comment.

Recognize when the user is trying to commence a comment when they type `(*` and
then automatically insert `*)` on behalf of the user. A small convenience.

Co-authored-by: Maxime Coste <mawww@kakoune.org>
2022-05-13 12:58:30 +05:30
Maxime Coste
459c6f589f Merge branch 'cjs' of http://github.com/clarfonthey/kakoune 2022-05-10 22:37:43 +10:00
Maxime Coste
a28dd16b2e Merge remote-tracking branch 'adamchristiansen/gitignore-highlighting' 2022-05-10 22:36:44 +10:00
ltdk
fadbad51ca Mark .cjs as javascript 2022-05-09 13:20:27 -04:00
Adam Christiansen
1735aae85f Fixed extra + sign leftover from patch
An extra + sign was removed that was a remnant of a suggested
patch/diff.
2022-05-09 09:30:39 -06:00
Adam Christiansen
70013f5174 Fix gitignore highlighter glob handling
Fixes the handling of multiple backslashes before gitignore * and ?
glob patterns. Adds character classes to gitignore highlighting.

Co-authored-by: Johannes Altmanninger <aclopte@gmail.com>
2022-05-09 09:30:33 -06:00
Maxime Coste
3882b0e21b Merge branch 'gitmodules' of http://github.com/clarfonthey/kakoune 2022-05-09 20:07:47 +10:00
Maxime Coste
e036c4556a Merge remote-tracking branch 'c7skasku/highlight-0X' 2022-05-09 20:03:37 +10:00