Commit Graph

175 Commits

Author SHA1 Message Date
Dan Rosén
8dd2373db1 Remove duplicated scopes highlight in kakrc.kak 2020-02-06 17:33:16 +01:00
Maxime Coste
1a2bf7b105 Merge branch 'patch-2' of http://github.com/Ordoviz/kakoune 2020-02-05 20:47:25 +11:00
Maxime Coste
7d4ae422d2 Merge remote-tracking branch 'lenormf/docstring-pretty' 2020-02-05 20:40:10 +11:00
Lennard Hofmann
8dbc86c54a [sh] Do not highlight keywords if preceded/succeeded by a hyphen 2020-02-03 21:34:36 +01:00
Frank LENORMAND
275abb227e rc: Make docstrings more readable
This cosmetics commit makes use of the auto-deindentation syntax,
available to docstrings.
2020-02-03 20:53:28 +01:00
Lennard Hofmann
75bb796b2b
[sh] Allow more characters in aliases and function names
Which characters are allowed?
- Aliases: https://www.gnu.org/software/bash/manual/html_node/Aliases.html
- Functions: https://unix.stackexchange.com/questions/245331/shell-valid-function-name-characters

For aliases I chose [\w-.] instead of blacklisting many forbidden characters. For functions I chose \S.
2020-02-03 18:59:46 +00:00
Lennard Hofmann
c6eb9bd8f0
Fix #2832 2020-02-03 18:33:27 +00: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
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
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
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
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
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
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
Daniel Gorin
2666d69e6d Add filetype for terraform files with syntax hl 2019-11-18 20:41:42 +00: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
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
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
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