-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
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.
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.
this will only highlight elm 0.19 (latest) properly
very close to how https://ellie-app.com/ highlights
- anything that starts with an upper case letter is a type
- anything that starts with a lower case letter is a function
- function declaration is just a function at the start of a line
note: the default color scheme looks too colorful
For clojure.kak and haskell.kak, set extra_word_chars on the buffer
and not the window, so that the buffer's word db is updated correctly
for word completion.
Document this.
Also, minor refactor of clojure.kak.
Closes#3108
When trimming indent, the last line, if only containing
whitespaces does not need to match the indent, so that
this indentation style works:
-docstring %{
indented string
}
Check if buffile is a full path by checking for the beginning
'/' character in editorconfig-load command. This avoids a parsing
error from feeding a *scratch*/*debug*/*grep*/etc. buffer name to the
editorcofig command. Don't clear editorconfig hooks until after checking
for a valid bufffile path. This way, opening the *debug* buffer will
not clear the hooks from a previously parsed .editorconfig file. If
trim_trailing_whitespace is true, print the hook directly from awk. This
removes the need to save a editorcofig_trim_trailing_whitespace option.
Note: Setting the max_line_length requires a window to be created.
Therefore, a global hook to load .editorconfig settings should be:
hook global WinCreate .* %{editorconfig-load}
* Adapt the char literal highlighter from c-family.kak
* Fix line comment adjacent to char literal not being highlighted
* Fix single quote terminating a double quote string
* Fix keywords in comments being highlighted
* Highlight Nim's escape sequences for strings
* Highlight common comment tags
* Add on/off to the highlighted boolean values
* Remove redundant regex highlighter for comments
* Fix autoindent indenting lines more than it should
Before:
```nim
type
MyType = tuple
myint: int # This line needs to be indented manually
```
After:
```nim
type
MyType = tuple
myint: int # Lines after 'tuple' are now indented automatically
```
Make sure decorators are on their own line, and don't stop highlighting at
the first dot when they are imported, e.g.
```
import enum
@enum.unique
class A(enum.Enum):
…
```
Ideally highlighting shouldn't stop at the first parenthesis either
(e.g. `@foo(['1'])`), but the current code somewhat highlights the contents
of the parens already, which is good enough in most cases.
This attempts to support a simple formatting and intentation style for
plain sh syntax (and other sh-compatible code which doesn't stray too
far from portable sh).
The complexity of sh syntax means that we have to be opinionated -
attempting to be more flexible would require extensive context
awareness, and would require something more akin to a proper
autoformatting tool or a language server.
The formatting style used here makes use of vertical whitespace as the
primary delimiter, so that code ends up looking like this:
if [ $foo = "bar" ]; then
thing1
else
thing2
fi
for i in foo bar baz; do
thing1
thing2
done
case "$foo" in
bar) thing1;;
baz)
thing1
thing2
;;
esac
Since the formatting style used is very opinionated the 'sh_auto_indent'
option can be used to disable auto-indentation, with the default set to
'no'.