Commit Graph

1689 Commits

Author SHA1 Message Date
Lennard Hofmann
c6eb9bd8f0
Fix #2832 2020-02-03 18:33:27 +00:00
Gregory Chamberlain
548c6b0b7e rc git: Use git-log filetype for ‘:git show’
The git-log filetype is more appropriate for ‘git show’ output
because it highlights both diffs and commit data.
2020-02-02 00:26:46 +00:00
Frank LENORMAND
90ba4d0903 rc spell: Handle errors returned on the first line
The first line returned by `aspell` isn't always an identification
string, it can also be an error.

This commit prevents the first line from being ignored in any case,
and allows errors to be reported consistently.

Related to #3330
2020-02-01 16:04:58 +01:00
Frank LENORMAND
0c4c744362 rc: Highlight embedded documentation
This commit adds a `documentation` face to the builtin themes, used
to highlight common documentation syntaxes:

	/**
	 * JavaDoc
	 */

	/*!
	 * QtDoc
	 */

	/// Inline documentation

	## Inline documentation

The face is only an alias to the `comment` one for now.

Closes #1944
2020-01-29 20:03:21 +01:00
Gregory Chamberlain
f4e8585981 rc git: Expand highlighting of git status
Adds support for highlighting git-status(1) output in short format
(--short) and with branch name (--branch), including file renames and
commits ahead/behind information.
2020-01-29 17:19:23 +00:00
Gregory Chamberlain
eb1b629829 rc git: Improve git-log highlighters
Adds support for highlighting git-log(1) output with the ‘--graph’
and ‘--pretty=oneline’ options.
2020-01-29 12:48:08 +00:00
Frank LENORMAND
5ea2f26efa
rc ctags: Escape backslash in {\} faces
Using `{\}` in an Awk script results in the following error being printed:

```
awk: cmd. line:18: warning: escape sequence `\}' treated as plain `}'
```
2020-01-28 10:05:10 +00:00
Maxime Coste
9842e24fc4 Merge remote-tracking branch 'alexherbo2/crystal' 2020-01-27 16:27:06 +11:00
Alex Leferry 2
2f05aebfff Use POSIX -E of sed for extended regular expressions 2020-01-21 14:45:33 +01:00
Alex Leferry 2
d7e2094f1c Crystal: Slight style change 2020-01-21 11:31:43 +01:00
Maxime Coste
da1320eda2 Merge remote-tracking branch 'alexherbo2/crystal' 2020-01-20 07:09:14 +11:00
Maxime Coste
fcf682e74f Merge branch 'patch-1' of http://github.com/Ordoviz/kakoune 2020-01-20 07:08:29 +11:00
Alex Leferry 2
c13e123096 Give an explicit name to the Crystal highlighter 2020-01-17 23:37:17 +01:00
Jonas Cosandey
b084e66897 Add html module to hbs filetype to correctly highlight hbs files 2020-01-16 10:20:35 +01:00
Maxime Coste
5f126ee267 Merge branch 'master' of https://github.com/aecepoglu/kakoune 2020-01-16 20:01:14 +11:00
Maxime Coste
60f9a474ab Merge remote-tracking branch 'lenormf/jinja-templates' 2020-01-16 19:59:51 +11:00
Maxime Coste
20b0ad8b84 Merge branch 'latex-headings' of http://github.com/Ordoviz/kakoune 2020-01-16 19:57:30 +11:00
Lennard Hofmann
71e4ac4574
[sh] Allow hyphens in variables but not every character
Co-Authored-By: Frank LENORMAND <lenormf@gmail.com>
2020-01-15 13:56:25 +00:00
Lennard Hofmann
1e9353a24b [latex] Highlight section headings 2020-01-14 17:31:35 +01:00
Lennard Hofmann
b84d852723 [sh] Merge two %sh blocks into one
It simply needed a newline
2020-01-13 17:51:18 +01:00
Maxime Coste
dabe4c3d92 Merge branch 'master' of http://github.com/nunzioc/kakoune 2020-01-13 20:33:10 +11:00
Alex Leferry 2
fed8f01e47 x11-terminal: Leverage the shell quoting of lists for perfect forwarding
Fixes x11-terminal forwarding
2020-01-13 05:26:08 +01:00
Lennard
a8bbdc71d9 [sh] Separate keywords and builtins; fix variables
Previously, the keywords were a mess. They contained the shell’s
reserved words and some arbitrarily selected builtins. I generated
the word list using bash because it contains all POSIX builtins and
is common for scripting.

In variable assignments some characters that are allowed to be in
variables used to not be highlighted, e.g. hyphens. With this commit
all characters except whitespace are considered to be part of the
variable.
2020-01-12 11:41:12 +01:00
NunzioCicone
dfbc69abeb Allow empty elements in jsx 2020-01-11 06:40:21 -05:00
aecepoglu
8b00458330
better scheme highlighter for char,string,comment 2020-01-09 17:07:23 +03:00
YohananDiamond
99ea0c2169 julia.kak: added keywords "mutable" and "struct" 2020-01-08 15:21:08 -03:00
Frank LENORMAND
5dc4ce5281 rc jinja: Highlight Jinja statements/expressions
This commit implements a standalone shared highlighter group that
highlights Jinja statements and expressions.

The traditional way of highlighting file contents is to hook on the
file extension, and assign a custom filetype/highlighter group to
the current buffer. However, since Jinja templates can be based on
any text file format in existence, we do not have a specific file
extension to hook, and consequently, no custom "jinja" filetype.

The user is expected to add the `jinja` highlighter whenever required:

```
require-module jinja
add-highlighter window/ ref jinja
```

Alternatively, file extensions that are known to occasionally pair
with Jinja can be hooked from the user configuration:

```
hook global WinCreate .+\.html %[
    try %[
        execute-keys -draft \%s \{%|\{\{ <ret>
        require-module jinja
        add-highlighter window/ ref jinja
    ]
]
```

The above hook auto-detects statements/expressions (respectively
{%…%} and {{…}} expansions), but will cause false positives
(in terms of highlighting), and therefore isn't part of `jinja.kak`
by default.
2020-01-08 12:22:34 +01:00
Jason Felice
0ed3bd662c {clojure,lisp}.kak: handle doubled brackets 2020-01-03 15:14:56 -05:00
Maxime Coste
f2159750d2 Slight code cleanup in grep.kak 2019-12-31 12:50:19 +11:00
Maxime Coste
90ec9434b7 Fix clang completion output parsing 2019-12-15 10:32:14 +11:00
Evan Relf
77ec8b70a8
Fix Haskell multi-line quasiquoter highlighting 2019-12-12 16:00:50 -08:00
Evan Relf
991ed97f4c
Fix incomplete highlighting of Haskell via keyword 2019-12-12 15:45:43 -08:00
Evan Relf
9eb9747396 Improve highlighting of Haskell function names 2019-12-12 15:27:48 -08:00
Evan Relf
024a3afff0 Highlight Haskell type and data family keyword 2019-12-12 15:27:48 -08:00
Evan Relf
63bbfc253b Relocate Haskell quasiquote region highlighter 2019-12-12 15:27:48 -08:00
Frank LENORMAND
7b9ae595c0 rc repl tmux: Do not check for the Tmux version
This commit removes attempts to auto-detect the version of the local
Tmux binary.

The Tmux package that ships with OpenBSD doesn't have a version
number[1], and therefore doesn't provide any way to check if it's
compatible with the REPL module, making the feature disabled by
default in that distribution.

Fixes #3237.

[1] https://github.com/tmux/tmux/issues/1141#issuecomment-340244302
2019-12-10 12:15:08 +01:00
Frank LENORMAND
fde2550478 rc git: Highlight commands differently from pick
The `pick` command in a rebase commit is virtually a no-op, but other
commands actually do things. This commit visually communicates
that fact.

Fixes #3208.
2019-12-08 13:49:53 +01:00
Maxime Coste
ee2985739b Merge remote-tracking branch 'lenormf/window-range' 2019-12-04 21:16:11 +11:00
Las
df9995b216
Recognize .mjs files as javascript files
.mjs is the extension for javascript modules
2019-12-03 15:05:40 +09:00
Maxime Coste
805675b731 Merge remote-tracking branch 'jcpetruzza/syntax-terraform' 2019-11-28 20:35:16 +11:00
Maxime Coste
b19dae13fc Merge remote-tracking branch 'lenormf/fix-clang-autocomplete' 2019-11-28 20:34:17 +11:00
Maxime Coste
2904d13420 Add a {\} marker to disable markup processing 2019-11-28 20:23:52 +11:00
Maxime Coste
8691ee8d4a Modularize r file support 2019-11-26 21:32:52 +11:00
Maxime Coste
2209b5d415 Improve perl regex and qq string highlighting 2019-11-26 21:32:52 +11:00
Frank LENORMAND
657eeb02d2 rc clang: Factorize multiple calls to gsub 2019-11-22 09:43:39 +01:00
Frank LENORMAND
3161a6255c rc clang: Handle nested tags in completion
Some completion candidates have e.g. `{#…#}` tags in their
name/description. They can be nested, which the cleanup regex doesn't
take into account.
2019-11-22 09:30:30 +01:00
Maxime Coste
82e5346904 Add a -atomic switch to write and change clang.kak to take advantage 2019-11-21 23:38:32 +11:00
Daniel Gorin
2666d69e6d Add filetype for terraform files with syntax hl 2019-11-18 20:41:42 +00:00
Maxime Coste
0dd6ea83d8 Merge remote-tracking branch 'evanrelf/haskell' 2019-11-18 20:03:14 +11:00
Maxime Coste
2804479b27 Merge remote-tracking branch 'JJK96/comment' 2019-11-18 20:01:37 +11:00
Evan Relf
199b4e2f66
Highlight Haskell deriving strategies keywords 2019-11-18 00:15:33 -08:00
Evan Relf
237acbcfeb
Improve Haskell quasiquote highlighting
Now only the inside of the quasiquote gets the string coloring applied.
2019-11-18 00:14:41 -08:00
Evan Relf
f40064b8d6
Add forall unicode character as Haskell keyword 2019-11-18 00:14:22 -08:00
Maxime Coste
7368678e26 Merge remote-tracking branch 'lenormf/fix-rust-formatcmd' 2019-11-17 10:41:47 +11:00
Maxime Coste
49f3a72bdc Merge remote-tracking branch 'Anfid/update-lua-highlight' 2019-11-17 10:39:00 +11:00
Maxime Coste
d220ac049e Merge remote-tracking branch 'Anfid/hunk-next-prev' 2019-11-17 10:38:52 +11:00
Maxime Coste
7582c5d5e7 Merge remote-tracking branch 'lenormf/fix-fail-errors' 2019-11-17 09:59:28 +11:00
Maxime Coste
090efcb1b1 Merge remote-tracking branch 'lePerdu/elm-lang-fixes' 2019-11-17 09:50:33 +11:00
Mikhail Pogretskiy
304f10bea2 rc lua: Improve syntax highlighting 2019-11-15 23:05:54 +07:00
Frank LENORMAND
5b1f9255a1 rc: Use the standard fail command to report errors
Merely using `echo` with markup doesn't log errors in the debug
buffers, and is also less readable.
2019-11-14 08:32:55 +01:00
Mikhail Pogretskiy
e159acaa19 Add git next-hunk and prev-hunk commands
Fixes #2423
2019-11-13 22:55:03 +07:00
Jan-Jaap Korpershoek
d655af04cd Change markdown block comment 2019-11-12 13:21:54 +01:00
Frank LENORMAND
fa6396405e rc rust: Don't set an arbitrary formatter
Users who want to use a formatter are free to pick a tool of their
choosing and set `formatcmd` in their user configuration.
2019-11-11 14:20:26 +01:00
lePerdu
c5fad3cab6 Don't set formatcmd in the syntax file 2019-11-11 08:14:18 -05:00
Maxime Coste
b464822f1b Merge branch 'fsharp-filetype-bugfix' of http://github.com/pema99/kakoune 2019-11-11 21:57:01 +11:00
Maxime Coste
d2d0e629fa Merge remote-tracking branch 'lenormf/spell-lang' 2019-11-11 21:51:57 +11:00
pema99
43b8f1338b Fix literal '"' in fsharp highlighting. 2019-11-11 06:25:37 +01:00
lePerdu
a805844e20 Fix type, variable, and function patterns
The old ones are functionally correct (I think), but are un-necessarily
complex and not don't semantically fit what they are trying to match.
2019-11-10 19:35:11 -05:00
lePerdu
a0d6d8a03f Remove where keyword and add port keyword 2019-11-10 19:24:12 -05:00
lePerdu
44bc51a90a Put - first in character class patterns
If `-` is not first or last in a character classes, it matches a range based on
the character code. This applies to special characters as well as to
alphanumeric characters.
2019-11-10 18:29:07 -05:00
lePerdu
7c455db52e Properly highlight Elm operators
- Highlight `=` and `|` as keywords (like `->` and `:`)
- Highlight custom operators (I guess they aren't really custom as of Elm 0.19
  but there are still a bunch "built in").
2019-11-10 18:12:45 -05:00
lePerdu
166049f128 Highlight multiline strings in Elm 2019-11-10 18:12:17 -05:00
lePerdu
3232ba8a4c Use elm-format for formatcmd in Elm 2019-11-10 18:11:36 -05:00
lePerdu
6aab2f54dd Copy doc comment (///) prefix to new lines 2019-11-09 09:41:11 -05:00
lePerdu
2167374496 Add Gluon highlighting/indent 2019-11-09 09:22:19 -05:00
Maxime Coste
11975b7f31 Merge remote-tracking branch 'AJChapman/dhall' 2019-11-09 09:09:14 +11:00
Maxime Coste
88944c7b6a Merge remote-tracking branch 'nhey/fsharp-filetype' 2019-11-09 09:06:44 +11:00
Frank LENORMAND
a7bf625236 rc modeline: Support spelling language options 2019-11-08 17:56:36 +01:00
Nikolaj Hey Hinnerskov
1f19b44b88 Add syntax highlighting for F#
Co-authored-by: pema99 <pemamalling@gmail.com>
2019-11-08 13:01:36 +01:00
Frank LENORMAND
be8d0e6726 rc spell: Allow storing a language in an option
This commit adds a `spell_lang` option that will be used by the
`spell` command when no language is passed to it directly.

Setting a buffer/window local option allows using `:spell` seamlessly
across several buffers, written in different languages.
2019-11-08 12:44:55 +01:00
Maxime Coste
d5f2744e59 Merge remote-tracking branch 'JJK96/xml' 2019-11-07 20:16:58 +11:00
Maxime Coste
f13239764b Merge branch 'patch/fix-python-operator-highlighter' of http://github.com/cipharius/kakoune 2019-11-07 20:08:59 +11:00
Maxime Coste
50a4964910 Merge remote-tracking branch 'Delapouite/patch-3' 2019-11-07 20:06:02 +11:00
Maxime Coste
44047a69c5 Fix c-family include highlighting 2019-11-05 17:35:44 +11:00
Jan-Jaap Korpershoek
fcc8ed5df3 [html] Fix indentation when entering a newline while in the middle of a tag
Example:

```
        <tag>|</tag>
```
Then press enter

Old behaviour:
```
        <tag>
            </tag>
```
New behaviour:
```
        <tag>
        </tag>
```

I also added a test for it
2019-11-03 12:25:02 +01:00
Alex Chapman
6a3421d285 Add support for quoted labels, empty record values and their type 2019-10-30 10:22:31 +11:00
Alex Chapman
9381277274 Add Dhall multi-line string literals 2019-10-30 10:22:23 +11:00
Alex Chapman
80a4e66622 Add syntax support for the Dhall configuration language. 2019-10-30 10:22:12 +11:00
cipharius
988b92d948 Fix python operator highlighter 2019-10-27 15:49:04 +02:00
Bruno Heridet
3726fd000c
filetype: add support for .make extension
While building fish-shell which uses `cmake`, a lot of regular Makefiles are generated with this extension.
2019-10-25 14:14:30 +02:00
Maxime Coste
5b34a6ed81 Merge remote-tracking branch 'eraserhd/tmux-version-check' 2019-10-23 22:36:11 +11:00
Maxime Coste
74275b82e1 Merge remote-tracking branch 'lenormf/python-highlight-module' 2019-10-23 22:32:10 +11:00
Maxime Coste
a49ae162f4 Add a -verbatim switch to evaluate-commands for perfect forwarding
-verbatim will disable argument parsing in evaluate-commands, making
it possible to forward a single command to a different context without
triggering a reparsing of the arguments.

Fixes -try-client support in grep.kak

Closes #3153
2019-10-23 22:30:23 +11:00
Maxime Coste
362021c1d3 Merge remote-tracking branch 'lenormf/key-semicolon' 2019-10-23 22:10:06 +11:00
Jason Felice
6f443537e4 Accept tmux pre-release and rc versions 2019-10-22 10:25:41 -04:00
Frank LENORMAND
e3ba7f7d56 rc swift: Remove highlighting of non-standard comments
Highlighting arbitrary words in Swift comments should be done from the
user configuration, plus hardcoding the `red` color doesn't play well
with all colorschemes.
2019-10-22 11:12:10 +02: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
Frank LENORMAND
2ed70ad5cc rc man: Expose the actual buffer-space's width
Fixes #675
2019-10-20 21:38:58 +02:00
Frank LENORMAND
38746b169e rc python: Highlight modules in import statements 2019-10-20 20:21:08 +02:00
Maxime Coste
a5d662f7fe Fix d.kak invonluntary modification 2019-10-17 22:39:07 +11:00