Commit Graph

464 Commits

Author SHA1 Message Date
Maxime Coste
1de058cdf8 Fix rust highlighting after regions highlighter behaviour change 2020-10-12 13:04:08 +11:00
Maxime Coste
600be827b3 Merge remote-tracking branch 'pickfire/indent-yaml' into master 2020-10-08 19:51:05 +11:00
Maxime Coste
7fefb206dc Merge remote-tracking branch 'SeerLite/lua-fixes' into master 2020-10-08 19:50:41 +11:00
Ivan Tham
c148fdbe9a Rust always indent after { 2020-10-04 23:40:49 +08:00
Ivan Tham
b0ae30a443 Add missing rust indent after function { 2020-10-04 14:19:33 +08:00
SeerLite
3c3a4ec985 lua.kak: Correct -trim-indent hook and fix indent 2020-10-03 16:38:43 -03:00
Ivan Tham
1809035c15 Yaml indent after - 2020-10-02 14:24:04 +08:00
Maxime Coste
fcabffefe1 Merge remote-tracking branch 'pickfire/rust-indent' into master 2020-10-01 19:07:05 +10:00
Maxime Coste
88f6b65f35 Merge remote-tracking branch 'lboklin/master' into master 2020-09-30 21:29:38 +10:00
Maxime Coste
c9b4b0e355 Merge remote-tracking branch 'tototest99/ninjafile-upd' into master 2020-09-30 19:43:11 +10:00
Ivan Tham
bfca07da4d Rust not to indent on hash 2020-09-30 00:37:35 +08:00
Ivan Tham
56e12013c8 Rust indent keyword check boundary 2020-09-28 00:09:12 +08:00
Ivan Tham
df68a77ed2 Rust reindent where to match block 2020-09-28 00:03:53 +08:00
Ivan Tham
785cbaeaed Add rust test for empty line indent 2020-09-27 23:34:08 +08:00
Ivan Tham
5c8dfcdfa9 Rust improve align after partial statement 2020-09-27 15:53:15 +08:00
Ivan Tham
11d98a07dc Rust align open paren for if and for 2020-09-27 15:52:42 +08:00
Simon Fowler
83277d5545 Improve shell indentation implementation.
Use the custom object match command for copying indentation of blocks,
rather than simply increasing/decreasing indentation when start and end
statements are encountered.

This fixes an issue where a newline added after an already correctly
placed `else` or `fi` would trigger an unnecessary deindent. Tests have
been added to ensure no regression in this behaviour.
2020-09-26 22:10:31 +10:00
antab
737134b993 fix: improve regex for build region 2020-09-22 13:49:11 +02:00
Maxime Coste
dd1a582b30 Merge branch 'patch-3' of http://github.com/blaggacao/kakoune into master 2020-09-22 21:28:41 +10:00
Maxime Coste
fa375d1c46 Merge remote-tracking branch 'krobelus/dont-highlight-escaped-expansion' into master 2020-09-22 21:23:00 +10:00
Maxime Coste
154e11181f Merge remote-tracking branch 'krobelus/perl-quoting' into master 2020-09-22 21:20:14 +10:00
David Arnold
0d476aaa95
just: highlight function expressions 2020-09-22 00:24:29 -05:00
antab
d0ee3dfe94 fix: add subninja and include to static_words 2020-09-21 13:41:19 +02:00
antab
d5ccdcfed4 fix(ninja filetype): add subninja and include declarations and fix builddir highlights 2020-09-21 13:34:27 +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
Johannes Altmanninger
50775b26e4 *sh.kak: do not highlight expansions if their $ is escaped 2020-09-19 08:06:46 +02:00
Johannes Altmanninger
19b54a8a6e Highlight more Perl quoting syntaxes
This adds highlighting for

- quoting operators qw, qr, and qx, like `qw< some words >`
- angle brackets after a quoting operator, like `q<string>`
- punctuation as quoting delimiter, like `q|string|`
- POD sections, which start with ^=\w and and with ^=cut
- heredocs; the marker can be a bare word, or a quoted word, like

	print <<~ 'EOF'
		single quoted heredoc
	EOF

Closes #3736

No attempt is made to use different highlighting for interpolated (qq or
"") strings just yet. Recognizing quote boundaries is more important.
2020-09-18 20:55:12 +02:00
Maxime Coste
b8f56a65ed Merge remote-tracking branch 'deviant/add-go-alternative-file' into master 2020-09-17 19:38:59 +10:00
Maxime Coste
cb047a4a7d Merge remote-tracking branch 'tototest99/ninja-syntax' into master 2020-09-17 19:34:54 +10:00
Maxime Coste
81163ce48a Merge remote-tracking branch 'Aajn/python-highlighter' into master 2020-09-17 19:33:51 +10:00
antab
810689ad60 fix: variables adjacent to = and in build declaration 2020-09-16 21:09:27 +02:00
antab
ea4f2b8837 feat: add basic ninjafile support 2020-09-16 00:03:17 +02:00
David Arnold
1ff9895fe4 just: re-implment bash/sh interpreter 2020-09-15 16:32:07 -05:00
David Arnold
3857696df6
just-highlighter: pre call out to shebang regions 2020-09-15 16:10:40 -05:00
David Arnold
3770baaab0 fix justfile highlighter
This fixes serveral shortcomings of the current implementation:

- valid recipt definitions eg
foo bar="quz":
where previously interrupted by justfile/double_string
and therefore they where not highlighted correctly

- global variable assignments where not captured at all
2020-09-15 15:52:00 -05:00
Piotr Chrominski
bfbf4d2080 Fix python docstring highlighter
Escaped ' or " at the end of a docstring no longer break highlighting.
2020-09-15 22:01:55 +02:00
V
c6b7e3d74a Add :alt command for go files 2020-09-10 00:23:46 +02:00
Maxime Coste
6f260c2ab2 Merge remote-tracking branch 'm-kru/latex' into master 2020-09-08 19:06:56 +10: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
Maxime Coste
cfbff4e132 Merge remote-tracking branch 'kayhide/purescript-filetype' into master 2020-09-06 11:23:48 +10:00
Michał Kruszewski
705712f13b Improve latex support.
Auto insert "\end{[word]}" for "\begin{[word]}".
2020-09-05 16:14:22 +02:00
Hideaki Kawai
c613e3c7f1 Create purescript filetype 2020-09-04 11:33:08 +09:00
Johannes Altmanninger
e1de4aa118 python.kak: Do not indent after comments ending in :
Fixes #3693

This will not work for lines like the one below but I think that's okay
because it does work for most comments.

	foo() # foo:
2020-09-02 06:44:36 +02:00
Frank LENORMAND
3145e3e939 rc markdown: Highlight trailing spaces properly
This commit addresses the following issues:

* highlight trailing space characters with the `meta` face, instead of
  `PrimarySelection`
* make the regex more readable by using a capture group in stead of
  `\K`
* specifically match space characters, not other horizontal whitespace
  characters
* match two or more space characters

Reference[1]:

> When you do want to insert a <br /> break tag using Markdown, you
> end a line with two or more spaces, then type return.

[1] https://daringfireball.net/projects/markdown/syntax#p

Note that the original reproducer doesn't seem to work anymore,
probably because of changes made to how lists are highlighted.

Fixes #911
2020-09-01 13:12:58 +03:00
Ludvig Böklin
0e84cdb016 Mercury-lang filetype support 2020-08-31 16:36:43 +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
Maxime Coste
4b7fd68d48 Merge remote-tracking branch 'krobelus/indent-after-keyword' 2020-08-24 19:24:19 +10:00
Maxime Coste
beeaf19801 Merge remote-tracking branch 'krobelus/highlight-nested-variable-expansions' 2020-08-24 19:23:35 +10:00
Johannes Altmanninger
ab76ec981a Avoid extra indent when line does not end on keyword
For example there was an indent after a line like "echo todo" with filetype sh
because the "do" in "todo" was recognised as keyword.
2020-08-23 19:15:52 +02:00
Johannes Altmanninger
473967df04 fish.kak: add missing highlighting for builtins true and string
I forgot them last time, sorry for the noise
2020-08-23 19:15:52 +02:00