Commit Graph

584 Commits

Author SHA1 Message Date
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
Johannes Altmanninger
eb3beff959 rc: make insertion hooks more consistent 2021-04-17 20:56:23 +02:00
Johannes Altmanninger
3ab2b98ec3 rc: remove spurious tabs
This makes it easier to be consistent.

Also replace "<<-EOF" by "<<EOF", since the former only does trims
tabs, not spaces.
2021-04-17 20:56:23 +02:00
Johannes Altmanninger
787ff5d002 rc sass: highlight and copy full comments, and support CSS comments 2021-04-17 20:56:23 +02:00
Johannes Altmanninger
9fadda0df4 rc nim: follow our convention 2021-04-17 20:56:23 +02:00
Johannes Altmanninger
997059fed1 rc javascript: fix line comment prefix 2021-04-17 20:56:23 +02:00
Maxime Coste
5696ed02e4 Fix invalid insertion of ; after } closing some functions
Function taking a parameter with a struct tag on the last line
before the opening { were wrongly treated as structs. Add some
additional regex logic to try to catch those cases.

Fixes #4136
2021-04-08 20:14:02 +10:00
Maxime Coste
abf68320fa Merge remote-tracking branch 'c7skasku/d-nested-block-comments' 2021-04-07 20:08:21 +10:00
Cormac Stephenson
710f121a54 d.kak: highlight nested block comments recursively
https://dlang.org/spec/lex.html#comment
2021-04-06 13:45:04 +01:00
SeerLite
3397737b16 rc markdown: Fix code fence regex
The invalid regex `)\b` currently matches anything, so this didn't cause
any errors.
It is still invalid though, so I fixed it by moving the `\b` to the end
of the non-raw_attribute language name (like the original regex). The
raw_attribute one shouldn't need this because the `}` marks the end of
the language name anyway.

Fixes #4025
2021-04-01 22:53:44 -03:00
SeerLite
e84dd80244 rc markdown: Fix trailing whitespace removal
Modified the test cases accordingly too
2021-04-01 22:27:30 -03:00
SeerLite
5c03e2bd54 rc markdown: Add -insert hook 2021-04-01 22:22:08 -03:00
Maxime Coste
212242cc60 Slight cleanup of the c-family highlighters
* Extract raw strings to the C++ specific section
* Merge different documetnation comment formats in single regions
2021-03-31 21:24:45 +11:00
Maxime Coste
d8fbe3105d Merge branch 'lua-auto-indent-improvement' of http://github.com/cipharius/kakoune 2021-03-23 19:57:46 +11:00
cipharius
78a0b5e4c7 Improves Lua auto indent and end insertion
Current solution makes it difficult to use common Lua practices of having one-liner if statements and using anonymous functions.
New solution prevents auto-indentation and end insertion, if the previous line contains an "end" keyword.
It does not attempt to match each structure with corresponding end, since using multiple end keywords in single line is a very rare occurance in Lua.
2021-03-23 10:36:05 +02:00
Lennard Hofmann
8d24041c1a rc markdown: Fix HTML highlighting in inline code
Because the HTML highlighter was higher up in the hierarchy than the code
highlighter, it took precedence. I fixed it by making it an inline region.
Using my new knowledge of "inline" I was able to remove one line of code.

Fixes #4091
2021-03-21 09:52:00 +01:00
SeerLite
c0e8dceb5d js: Highlight special variables at start of file 2021-03-17 23:59:05 -03:00
Maxime Coste
c12d1c16b7 Merge remote-tracking branch 'hristost/hristost/swift-multiline-strings' 2021-03-11 08:02:53 +11:00
Maxime Coste
835eaf5495 Merge remote-tracking branch 'pickfire/rust-indent' 2021-03-11 07:51:08 +11:00
hss
566143ac6d rc swift: highlight multiline strings 2021-03-07 21:26:31 -05:00
Ivan Tham
ebe7f82bb2 Support rust visibility for enum and others 2021-03-07 14:22:43 +08:00
Ivan Tham
8df5621334 Support dedent with rust fn qualifiers 2021-03-07 14:12:01 +08:00
Maxime Coste
60c44e1623 Merge remote-tracking branch 'andreyorst/fennel-filetype' 2021-03-02 21:13:25 +11:00
Andrey Listopadov
877cc9cf88 add fennel filetype 2021-03-01 19:51:36 +03:00
Maxime Coste
ca5e6f835c Merge remote-tracking branch 'gf3/graphql-syntax' 2021-03-01 08:27:36 +11:00
Maxime Coste
a0f567f5e6 Merge remote-tracking branch 'm-kru/troff_comment' 2021-03-01 08:26:02 +11:00
Isa Cichon
0fc91b9576 Fix usages of ModeChange hook
hook param always begins with either push: or pop:

Fixes #4078
2021-02-28 21:07:21 +01:00
Michał Kruszewski
b7def7350c Add comment highlighter for troff files.
Add comment highlighter for troff files.
Also highlight the end of the macro definition.
2021-02-25 20:18:10 +01:00
Maxime Coste
70548ecc14 Merge remote-tracking branch 'rwpeterson/juliahl' 2021-02-25 20:23:10 +11:00
Bob Peterson
c457c2b1c1 rc julia: add multiline comments 2021-02-21 19:20:03 +01:00
Ivan Tham
4e594e034a Dedent rust await function with ? 2021-02-17 01:17:17 +08:00
Ivan Tham
049591f6b4 Dedent rust empty match 2021-02-17 01:17:14 +08:00
Maxime Coste
fb30d3751c Merge remote-tracking branch 'krobelus/yaml-comment' 2021-02-11 20:30:34 +11:00
Maxime Coste
1440db3f89 Merge remote-tracking branch 'krobelus/rest-leaked-code-highlighting' 2021-02-11 20:29:43 +11:00
Johannes Altmanninger
7ddaf071c7 rc java: highlight byte/short/long primitive types 2021-02-10 21:09:30 +01:00
Johannes Altmanninger
41059b3f0c rc yaml: "#" inside a word is not a comment 2021-02-10 21:09:25 +01:00
Johannes Altmanninger
cfae4dda91 rc restructuredtext: don't highlight first character of next line as code
Reproduce by creating a *.rst buffer with the text below. The "N" used to
be highlighted as code.

::

    code

Not code
2021-02-10 21:09:16 +01:00
Maxime Coste
69f1c8cae5 Merge remote-tracking branch 'Ordoviz/markdown' 2021-01-28 21:02:47 +11:00
Lennard Hofmann
61fabee03f rc markdown: Highlight HTML tags 2021-01-19 15:42:37 +01:00
Maxime Coste
2578759252 Merge remote-tracking branch 'chambln/pfm' 2021-01-19 20:55:03 +11:00
Maxime Coste
86997bfa09 Merge remote-tracking branch 'SeerLite/js-multiline-division' 2021-01-19 20:54:32 +11:00
Maxime Coste
5b7048dc34 Merge remote-tracking branch 'ifreund/meson-fix' 2021-01-19 20:54:25 +11:00
Isaac Freund
033b55c3ac
zig.kak: fix highlighting of empty doc comment
If a line contains three slashes directly followed by a new line, the
next line is also erroneously highlighted as a doc comment currently.
Using a lookahead instead fixes this.
2021-01-18 00:44:32 +01:00
Gianni Chiappetta
fe3f8d2271
chore(rc): support nested field strings in graphql 2021-01-14 15:46:50 -05:00
Gianni Chiappetta
69a152d680
chore(rc): change graphql block delimiters to support better regexs 2021-01-14 11:40:17 -05:00
Gianni Chiappetta
ec80d83e71
feat(rc): improve graphql field arguments highlighter 2021-01-13 21:37:08 -05:00
Gianni Chiappetta
d8f65bd0ec
feat(rc): match .graphqls file extension as graphql filetype 2021-01-13 21:31:29 -05:00
Gianni Chiappetta
1c639f7810
feat(rc): improve graphql syntax highlighters 2021-01-13 21:29:03 -05:00
Isaac Freund
233b990275
meson: improve highlighting, add static words
Now all functions are highlighted and builtins are highlighted
with their own face.
2021-01-13 15:44:38 +01:00
SeerLite
569267b18d rc js: Correctly highlight multiline division. 2021-01-11 13:06:38 -03:00