Commit Graph

106 Commits

Author SHA1 Message Date
Olivier Perret
f085e43bf9 Unify auto-indent trimming hooks
* ModeChange hooks that remove indent now belong to *-trim-indent groups, instead of just -indent
* *-filter-around-selections hooks and commands have been renamed to trim-indent for clarity
2018-12-19 10:20:11 +01:00
Olivier Perret
d8466f0f39 c-family.kak: remove redundant -family in hook groups 2018-12-19 10:03:37 +01:00
Olivier Perret
27f951638c Execute cleanup hooks on any filetype change 2018-12-11 00:35:57 +01:00
Olivier Perret
6765723c68 Change cleanup of core/ languages to use a simpler hook -once 2018-12-11 00:13:30 +01:00
Muffindrake
d40a6bc44a Highlight bool type 2018-11-23 00:12:01 +01:00
Muffindrake
a807dbf1e0 Add missing highlighting for time/wctype 2018-11-11 15:33:55 +01:00
Muffindrake
3012bf48e5 Convert subshells to strings 2018-11-08 18:26:16 +01:00
Muffindrake
3c9f9255d7 Add macros for float.h 2018-11-08 18:03:31 +01:00
Muffindrake
f088dd957a Update C grammar
This highlighting and static completion for types and macros that were
previously missing. No functions are included, but some macros are
highlighted as such, even if they're function-like macros.
2018-11-08 10:30:27 +01:00
Justin Frank
521e5032c9 Don't require content in parens for single statment indent 2018-11-01 00:21:48 -07:00
Justin Frank
ee65954ed4 Make statement after if/else/while/for optional for indenting c-family 2018-10-31 16:09:13 -07:00
Maxime Coste
d9e95ff1fc Merge branch 'patch-1' of https://github.com/andreyorst/kakoune 2018-10-04 20:16:47 +10:00
Andrey Orst
44483e06f7
Simplifed regex variant by mawww 2018-10-03 15:16:16 +03:00
Andrey Orst
5dce923785
use more complex regex to handle all suffix combinations 2018-10-02 19:01:53 +03:00
Frank LENORMAND
51ced99286 rc c: Highlight more standard types and macros
Related to #2438
2018-09-29 17:43:06 +03:00
Andrey Orst
ab09864bd5
Update c-family.kak 2018-09-25 10:23:07 +03:00
Maxime Coste
fd107b8b5e Merge remote-tracking branch 'Delapouite/remove-hooks' 2018-09-20 21:14:22 +10:00
Delapouite
425aa56eaf Use remove-hooks regex in rc 2018-09-19 19:59:57 +02:00
Andrey Orst
b3f817c1ff
Fix highlighting of unsigned long long in C filetype
Values like `0xffffffffffffffffull` were highlighted only till first `u` leaving `ll` without highlighting. This change addresses this issue. It also adds uppercase `ULL` highlighting in values.
2018-09-19 16:50:26 +03:00
Justin Frank
4bb87ef430 macros always end at the start of a line comment 2018-09-15 10:52:18 -07:00
Justin Frank
e32d5ec88e tweaked some of the c-family highlighting of defines 2018-09-14 19:03:49 -07:00
Justin Frank
fa9d13700a Added deindenting of single statements 2018-09-11 21:21:25 -07:00
Maxime Coste
2a3e3f0514 Tweak various scripts to improve the time they take to load
As requested in #2152, startup time should be slightly better.
2018-07-19 18:32:29 +10:00
Maxime Coste
63d4c8c311 Change a on end of line behaviour to be consistent
`a` will just jump on next line, `a` on last end of line opens a new
line beneath it.

Fixes #1164
2018-07-05 08:00:14 +10:00
Maxime Coste
2e0e206951 Make recurse regex opt-in with a -recurse switch instead of opt-out 2018-07-05 07:54:28 +10:00
Maxime Coste
e486a97ad8 Fix highlighters in rc/core post syntax refactoring 2018-07-05 07:54:28 +10:00
Maxime Coste
b0ccf97b44 Refactor RegionsHighlighters to define each region as a separate command 2018-07-05 07:54:28 +10:00
Maxime Coste
b4b335155e Refactor add-highlighter to make naming explicit
The highlighter name must be given as part of the path of the
highlighter, as the last element.

Fixes #1712
2018-07-05 07:54:28 +10:00
Maxime Coste
2729042f83 Fix c-family.kak static_words definition 2018-07-05 07:54:28 +10:00
Maxime Coste
e9fc54538d Convert some of the rc/ scripts to the new list syntax
Other scripts relying on lists are broken at the moment, and will
be fixed. This commit is a proof of concept of the new way to work
with lists.
2018-07-05 07:54:28 +10:00
Maxime Coste
cad5f37efd Fix register saving post -save-regs behaviour change 2018-07-05 07:54:28 +10:00
Maxime Coste
ec16969609 Do not reparse %sh{...} strings
Automatic reparsing of %sh{...}, while convenient in many cases,
can be surprising as well, and can lead to security problems:

'echo %sh{ printf "foo\necho bar" }' runs 'echo foo', then 'echo bar'.
we make this danger explicit, and we fix the 'nop %sh{...}' pattern.

To reparse %sh{...} strings, they can be passed to evaluate-commands,
which has been fixed to work in every cases where %sh{...} reparsing
was used..
2018-07-05 07:54:28 +10:00
Maxime Coste
8c6af54db3 c-family.kak: Fix comment line continuation behaviour
Fixes #2043
2018-05-19 14:15:16 +10:00
Maxime Coste
8e1646b702 c-family.kak: Remove unneeded itersel
itersel can get very expensive with many selections, it should only
be used when necessary.
2018-05-17 07:41:32 +10:00
Maxime Coste
f99f0020dc Fix (again) C++ raw string highlighting 2018-04-25 21:19:04 +10:00
Maxime Coste
fea6bc9524 c-family.kak: Fix highlighting of raw strings 2018-04-22 09:40:45 +10:00
Maxime Coste
5c247bf1dd c-family.kak: Do not mistake '\"' for a double quoted string start
Fixes #1893
2018-03-01 14:01:09 +11:00
Maxime Coste
43f50c0852 Convert bundled scripts to ModeChange hook 2018-01-21 10:35:05 +11:00
Maxime Coste
35d2b2b4bc c-family.kak: Use regex custom text object to simplify some indent 2017-12-03 17:48:04 +08:00
Maxime Coste
1a38849086 c-family.kak: indent after parenthesis at end of line 2017-12-03 17:47:44 +08:00
Maxime Coste
2ab9f65b36 c-family.kak: Use <a-S> in various auto indent hooks 2017-11-14 13:32:46 +08:00
Maxime Coste
9c964e97f0 c-family.kak: Highlight character literals later
That way it overrides integer literal highlighters in the case where
they conflict.
2017-11-14 11:45:30 +08:00
fsub
ee695ecf95 c-familiy.kak: improve highlighting of C++ literals 2017-11-12 18:16:20 +01:00
Maxime Coste
add7f7e76b Revert "c-family.kak: Remove invalid 'compl' keyword from C++ highlight"
This reverts commit f8dee65d6e.

compl is actually the alternate keyword for `~`.
2017-11-11 09:54:32 +08:00
Maxime Coste
f8dee65d6e c-family.kak: Remove invalid 'compl' keyword from C++ highlight 2017-11-09 10:43:46 +08:00
Maxime Coste
5791632a98 c-family.kak: use space separated words list 2017-11-09 10:25:03 +08:00
fsub
db15f7adc5 c-family.kak: Add missing C++ keywords, attributes, and types 2017-11-05 10:11:59 +01:00
fsub
1ad83745c2 c-family.kak: Sort keywords, attributes, values, and decorators 2017-11-05 10:11:59 +01:00
Frank LENORMAND
9127ed0d55 src rc: Rename exec/eval into execute-keys/evaluate-commands 2017-11-03 11:09:45 +03:00
Frank LENORMAND
c9b280b712 rc: Don't use command aliases to highlight keywords properly 2017-11-03 10:34:41 +03:00