Commit Graph

7034 Commits

Author SHA1 Message Date
Daniel Lewan
0ae88593d3 add highlighting and static words to editorconfig 2018-09-29 14:21:31 +02:00
Jason Felice
e237bf6f15 Better Lisp and Clojure indent
Algol-like indenting doesn't work for Lisp as we tend to open (and
close) many forms on one line.  This generally puts the cursor
where it should be, though it is probably confused by strings
with brackets and things.
2018-09-29 11:25:11 +01:00
Dheepak Krishnamurthy
1549c18b8e Add single_string highlighter 2018-09-28 03:41:10 -06:00
Tim Allen
f12ac7164b Make it explicit that buffer-scope items are available in window-scope. 2018-09-28 18:01:17 +10:00
Tim Allen
b57784e06c Spaces around ellipses. 2018-09-28 18:00:20 +10:00
Maxime Coste
004ed72f44 Merge remote-tracking branch 'laelath/kitty-qol-commands' 2018-09-27 19:08:47 +10:00
Maxime Coste
6a82398d0f Merge remote-tracking branch 'schickm/hbs-highlighter-refactor' 2018-09-27 19:08:09 +10:00
Maxime Coste
f3d6586df2 Merge remote-tracking branch 'laelath/clang-format-fixes' 2018-09-27 18:55:50 +10:00
Tim Allen
3c8d160a62 Address code-review comments. 2018-09-27 15:37:38 +10:00
Justin Frank
7e15f200b1 Fixed several clang output formatting errors 2018-09-26 11:22:30 -07:00
Matt Schick
e7e87db94e Rework the handlebars highlighter
- Removes -recurse from handlebars comments. Handlebars parsers (janl/mustache.js, ember-cli/ember-cli-htmlbars), do not treat comments as recursive, so don't highlight them as so.
- Creates shared/hbs-file highligher group. This represents a handlebars file, which is html that happens to contain some handlebars tags.
- Augments the shared/html highlighter when needed. Because handlebars lives inside of html, we need to add the highlighter inside of it. Since there's no way to scope modifications of a shared highlighter to a window, here I'm modifying/unmodifying the shared/html highlighter whenever the user attaches/detaches a filetype of "hbs" to/from the window.
- Matches namespaced helpers as well. In htmlbars, helpers (components) can have '/'s in them, so make sure to continue highlighting through those. Also removes unused capturing groups.
- Allows for de-indenting when closing a block expression
- Brings in html highlighter hooks
- Improves indent matching on close of yielded blocks. Previous version just flat out didn't work.
2018-09-26 06:12:24 -05:00
Tim Allen
c7d1ec0a09 mapping.asciidoc: add tips for mappings that trigger commands 2018-09-25 18:42:07 +10:00
Tim Allen
e493eba46d expansions.asciidoc: Rewrite to make Kakoune syntax the primary reference.
Also, moved the "Markup strings" section to faces.asciidoc, since it wasn't
anything to do with expansions, and updated various hyperlinks to point at the
new location.
2018-09-25 18:31:29 +10:00
Andrey Orst
ab09864bd5
Update c-family.kak 2018-09-25 10:23:07 +03:00
Olivier Perret
93f913705a Misc fixes 2018-09-24 09:54:21 +02:00
Justin Frank
d06e8d662d Added focus-tab call to kitty-focus 2018-09-23 21:12:07 -07:00
Maxime Coste
cb8b882878 Fix broken test after change in cursor faces 2018-09-24 08:15:12 +10:00
Maxime Coste
2f2b273fd8 Merge branch 'matching-char-docs' of http://github.com/ejmr/kakoune 2018-09-24 08:12:23 +10:00
Maxime Coste
0ef192ae7e Merge remote-tracking branch 'Delapouite/unmap' 2018-09-24 08:08:49 +10:00
Justin Frank
903ae46b5d Added more kitty integration 2018-09-23 13:15:29 -07:00
Delapouite
b60613259c Add a way to unmap all keys of a given mode at once 2018-09-23 19:40:38 +02:00
Eric James Michael Ritz
a2f844cfb4 Improve the documentation for the 'm' key
The GitHub issue referenced below describes the default behavior of
the 'm' key in a way that was unknown to me.  As the issue says,
"'m' is a pretty misunderstood key", and goes on to describe how
the documentation makes it sound as if the cursor must be on the
matching character before 'm' will work.  However, this is not true;
pressing 'm' will jump forward to "select the next sequence enclosed
in balanced chars".  This patch updates the documentation so that it
describes that behavior.

GitHub-Issue: #2425
Special-thanks: Delapouite
2018-09-23 12:43:22 -04:00
Olivier Perret
fb1688bebb Make all cursor-related faces final 2018-09-23 16:17:23 +02:00
Maxime Coste
1631a7d8d9 Replace the Exclusive face attribute with Final
Final is more granular, it consists of FinalFg (f), FinalBg (g)
and FinalAttr (a) which control if a face's fg, bg, or attributes
fully overwrite the previous face (instead of merging) and if
following faces apply on top of this face or not.

Fixes #2388 if the Whitespace face has the FinalFg flag.
2018-09-23 23:27:14 +10:00
Maxime Coste
09546a950e doc.kak: Fix rendering of indented code blocks
Fixes #2376
2018-09-23 22:42:30 +10:00
Maxime Coste
dbfed1306f git.kak: Refactor commit message highlighting
Use regions to avoid highlighting the commit message as a diff.
The new method will fail if one line of the commit message matches
'^diff --git' but that is fairly unlikely.

Fixes #2371
2018-09-23 18:00:51 +10:00
Maxime Coste
bb1cb0dbf1 doc.kak: Tweak paragraph joining logic
Fixes #2378
2018-09-23 17:40:16 +10:00
Maxime Coste
5d0ea2936d Ignore errors in write_stdout
Fixes #2418
2018-09-23 17:16:09 +10:00
Maxime Coste
fa993768da Merge remote-tracking branch 'eraserhd/script-docs' 2018-09-23 17:06:25 +10:00
Maxime Coste
49645f8efc Merge remote-tracking branch 'laelath/spell-clear' 2018-09-23 17:05:51 +10:00
Maxime Coste
5df264376e Merge remote-tracking branch 'eraserhd/fix-clojure-numbers' 2018-09-23 17:01:12 +10:00
Jason Felice
538f2a74c7 Fix clojure numbers
- Fix issue where numbers which were part of symbols were highlighted.
- Fix issue where hexidecimals weren't highlighted past the 'x'
2018-09-22 16:16:36 -04:00
Maxime Coste
9c1c763a37 Reject hook names that are not alphanumeric _ or - or start with -
Fixes #2414
2018-09-22 22:11:21 +10:00
Maxime Coste
9db9fe612d Merge remote-tracking branch 'Screwtapello/cleanup-hook-docs' 2018-09-22 22:05:47 +10:00
Maxime Coste
3f4c86b12f Merge remote-tracking branch 'Delapouite/rename-completions' 2018-09-22 22:02:58 +10:00
Tim Allen
3819304589 hooks.asciidoc: Make sure all parts of the hook command are described.
Also, some minor grammar fixes.
2018-09-22 18:43:56 +10:00
Justin Frank
5700587926 added spell-clear convenience command 2018-09-21 12:30:13 -07:00
Jason Felice
6c4593b18a Document that -f starts with whole file selected 2018-09-21 10:01:20 -04:00
Delapouite
d8747bc1e0 Add completion for rename-buffer, rename-client and rename-session 2018-09-20 19:01:47 +02:00
Maxime Coste
1e2a389c6f Merge remote-tracking branch 'Screwtapello/describe-text-expansion' 2018-09-20 21:14:39 +10:00
Maxime Coste
fd107b8b5e Merge remote-tracking branch 'Delapouite/remove-hooks' 2018-09-20 21:14:22 +10:00
Maxime Coste
8618b286c5 Merge remote-tracking branch 'laelath/highlighter-fixes' 2018-09-20 21:14:01 +10:00
Tim Allen
00bdb041b0 Describe the %val{text} expansion. 2018-09-20 12:46:52 +10:00
Delapouite
425aa56eaf Use remove-hooks regex in rc 2018-09-19 19:59:57 +02:00
Andrey Orst
b3f817c1ff
Fix highlighting of unsigned long long in C filetype
Values like `0xffffffffffffffffull` were highlighted only till first `u` leaving `ll` without highlighting. This change addresses this issue. It also adds uppercase `ULL` highlighting in values.
2018-09-19 16:50:26 +03:00
Maxime Coste
7956e893be Merge remote-tracking branch 'laelath/git-hide-diff' 2018-09-18 22:30:50 +10:00
Maxime Coste
0fca6ae3dd Merge remote-tracking branch 'Screwtapello/code-regions-for-markdown' 2018-09-18 22:30:07 +10:00
Tim Allen
9e142c6643 markdown.kak: Use lookahead/lookbehind assertions for formatting spans.
Previously, one of the syntaxes for italic was (greatly summarized) something
like this:

    [^_]_[^_]+_[^_]

That is to say, the regex matched the blanks on both sides of the italic span,
as well as the actual span content. That means that if you had consecutive
italic words:

    _some_ _italic_ _words_

...only the odd-numbered words would be highlighted: the space after "_some_"
was counted as part of that span, so it wasn't available as part of "_italic_"
and therefore "_italic_" wouldn't be highlighted. Likewise, if the first word
in a buffer was italic, it wouldn't be highlighted because the first underscore
was not preceded by a non-underscore character!

Now we use lookahead/lookbehind assertions, which don't count as part of the
matched span, so consecutive spans don't interfere with one another.

Fixes #2111.
2018-09-18 19:21:28 +10:00
Tim Allen
535abe2ba7 markdown.kak: Clean up code-block and code-span formatting.
Previously, a code block was anything between triple-backtics, including inline
blocks:

        some text ```
        not a codeblock, but highlighted as one
        ``` other text

and even if the closing backticks had the wrong indent:

        ```
        this is a code block containing a triple backtick
            ```
        this is still a code block, but Kakoune thinks otherwise
        ```

Now we use the -match-capture flag to ensure the start and end fences have
exactly the same indent.

Previously, the generic code-block region was defined first, which meant that
it took priority over all the language-specific highlighters. Now we define
the generic code-block highlighting *after* the others, which fixes #2304.

Previously, code-spans were defined as ordinary inline markup, but in Markdown
ordinary formatting doesn't work inside code-spans. Therefore, they are now
regions unto themselves, defined according to section 6.3 of the CommonMark
spec <https://spec.commonmark.org/0.28/#code-spans>, which addresses a comment
on #2111.
2018-09-18 19:18:32 +10:00
Jason Felice
fbd733f49c Homebrew Brewfile is ruby 2018-09-17 10:29:05 -04:00