Commit Graph

1319 Commits

Author SHA1 Message Date
Jimmy Thrasher
576f7b13b9 Don't highlight Ruby eigenclass definitions as here docs
E.g. for the following code snippet, the code was highlighted as a string
```ruby
class Bob
	class <<self
		def hello
		end
	end
end
```
2018-11-21 16:45:07 -05:00
Olivier Perret
808580056f doc: don't pollute command history with mapping 2018-11-21 17:30:58 +01:00
Maxime Coste
3ed7ec21bd Merge branch 'python_add_async_await_keywords' of http://github.com/Roger/kakoune 2018-11-19 21:07:53 +11:00
Maxime Coste
c4ffd95570 Merge remote-tracking branch 'JJK96/master' 2018-11-19 20:50:11 +11:00
Maxime Coste
f46b53a441 Merge branch 'gas-hex-fix' of http://github.com/andreyorst/kakoune 2018-11-19 20:49:40 +11:00
lePerdu
41d2176179 Add back list marker highlighting 2018-11-18 10:34:11 -05:00
lePerdu
9053a1cdc1 Make list items match as regions 2018-11-18 10:34:06 -05:00
Frank LENORMAND
70097a98b3
Sinplify regex
Co-Authored-By: JJK96 <jjkorpershoek96@gmail.com>
2018-11-18 08:28:50 +01:00
Frank LENORMAND
7dd81ec516 rc git: Support notes 2018-11-17 16:47:29 +03:00
Jan-Jaap Korpershoek
7fc43252f1 Make header clearer 2018-11-16 13:56:48 +01:00
Jan-Jaap Korpershoek
1228eddc00 Add markdown sql language support 2018-11-16 13:54:43 +01:00
Andrey Orst
3e194fbb2e fix hex numbers for gas filetype - add missing a-f letters 2018-11-13 13:02:04 +03:00
lePerdu
e539347f2a Give lua block comments higher match precedence 2018-11-12 15:39:34 -05:00
roger
b672e7c100 python: add async/await keywords highlighting 2018-11-12 15:03:32 +01:00
Muffindrake
a807dbf1e0 Add missing highlighting for time/wctype 2018-11-11 15:33:55 +01:00
Muffindrake
3012bf48e5 Convert subshells to strings 2018-11-08 18:26:16 +01:00
Muffindrake
3c9f9255d7 Add macros for float.h 2018-11-08 18:03:31 +01:00
Muffindrake
f088dd957a Update C grammar
This highlighting and static completion for types and macros that were
previously missing. No functions are included, but some macros are
highlighted as such, even if they're function-like macros.
2018-11-08 10:30:27 +01:00
Maxime Coste
9bc893e70b Merge remote-tracking branch 'laelath/c-indent-fixes' 2018-11-06 20:22:50 +11:00
Maxime Coste
bcd50d7dd8 Merge remote-tracking branch 'eraserhd/clojure-indent-fix' 2018-11-06 20:16:57 +11:00
Justin Frank
521e5032c9 Don't require content in parens for single statment indent 2018-11-01 00:21:48 -07:00
Justin Frank
ee65954ed4 Make statement after if/else/while/for optional for indenting c-family 2018-10-31 16:09:13 -07:00
Jason Felice
db937beff0 Make lisp/clojure indent work for append 2018-10-29 12:16:13 -04:00
Ruslan Prokopchuk
b65a6493aa replace usage of the deprecated 'e' face attribute with the new 'F' one
and update set-face docstring
2018-10-28 08:52:14 +11:00
Maxime Coste
433e39566d Merge remote-tracking branch 'lenormf/highlight-troff' 2018-10-23 08:20:21 +11:00
Jason Felice
e399bf7562 EDN files are Clojure syntax 2018-10-22 10:23:26 -04:00
Frank LENORMAND
2999702b01 rc troff: Highlight *ROFF files
Fixes #2508
2018-10-21 16:24:14 +03:00
Maxime Coste
7470c85a1a Merge remote-tracking branch 'maximbaz/do-not-enforce-autoformat-ocaml' 2018-10-21 18:45:16 +11:00
Maxime Coste
7dbca46bf0 Merge remote-tracking branch 'schickm/bugfix/hbs-highlighter-toggling' 2018-10-21 11:52:22 +11:00
Sébastien Lerique
681942e44b Support commenting syntax in Elm 2018-10-09 11:40:07 +02:00
Matt Schick
8e698e0054 Simplify handlebars adding/removal hooks
Removing the handlebars highlighters when a client toggles away from hbs window unintentionally causes
other clients attached to hbs windows to no longer highlight correctly.  The only other option is to
copy the entire html highlighter and all of it's rules, but that seems like a maitenance headache.
So instead, just leave the hbs rules injected into the html rules once the user opens any handlebars file.
It's not ideal, but I'd say it's the least bad option.
2018-10-06 08:39:01 -05:00
Maxime Coste
888ec60adf Fix kakrc shell script completion region definitions 2018-10-06 10:49:14 +10:00
Maxime Coste
5bdcfab018 Merge remote-tracking branch 'laelath/shell-command-completion' 2018-10-06 10:47:23 +10:00
Maxime Coste
81fa2ad300 Merge remote-tracking branch 'laelath/kitty-repl-cwd' 2018-10-04 20:17:22 +10:00
Maxime Coste
d9e95ff1fc Merge branch 'patch-1' of https://github.com/andreyorst/kakoune 2018-10-04 20:16:47 +10:00
Justin Frank
ab6bc41358 Added shell command completion support to define-command and prompt
This commit also introduces a regression in that I decided that the best way to
avoid overly long and confusing names was to rename the current shell-*
switches to script-*, and have the shell command completion be
shell-completion.

renamed script-{completion,candidates} to shell-script-*

Updated docs with new switch names

Added -shell-completion switch to x11-repl and kitty-repl
2018-10-03 09:46:31 -07:00
Justin Frank
74fb175da1 Made kitty repl window start in the current working directory
Enclose PWD expansion
2018-10-03 09:44:49 -07:00
Andrey Orst
44483e06f7
Simplifed regex variant by mawww 2018-10-03 15:16:16 +03:00
Maxime Coste
fd00776012 Merge remote-tracking branch 'schickm/html-highlighter-indent-bugfix' 2018-10-03 21:44:43 +10:00
Andrey Orst
5dce923785
use more complex regex to handle all suffix combinations 2018-10-02 19:01:53 +03:00
Matt Schick
1d731dbdd0 Fix/improve html-indent-on-new-line
* Fixes erroring execute-keys statement by using '<lt>' rather then '<'
* Reworks hook to not indent after self closing tags
2018-10-02 06:09:14 -05:00
Tim Allen
8385212f98 doc.kak: Fix bashism.
Fixes #2442.
2018-10-01 15:45:28 +10:00
Maxime Coste
150ee05077 Merge remote-tracking branch 'lenormf/fix-doc-anchor' 2018-10-01 11:18:20 +10:00
Maxime Coste
c9467ea959 Merge remote-tracking branch 'lenormf/fix-extended-std-c' 2018-10-01 11:13:16 +10:00
Maxime Coste
dc7f9a813c Merge remote-tracking branch 'TeddyDD/editorconfig' 2018-10-01 11:12:05 +10:00
Maxime Coste
2e0b58a43f Merge remote-tracking branch 'eraserhd/lisp-indent' 2018-10-01 11:11:11 +10:00
Maxime Coste
5709ff7f20 Merge branch 'kd/fix-nim-singlequote-highlighter' of git://github.com/kdheepak/kakoune 2018-10-01 11:10:42 +10:00
Frank LENORMAND
798a7ec351 rc doc: Fix the anchor jump error message
Fixes #2442
2018-09-30 10:43:27 +03:00
Frank LENORMAND
51ced99286 rc c: Highlight more standard types and macros
Related to #2438
2018-09-29 17:43:06 +03:00
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
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
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
Andrey Orst
ab09864bd5
Update c-family.kak 2018-09-25 10:23:07 +03:00
Justin Frank
d06e8d662d Added focus-tab call to kitty-focus 2018-09-23 21:12:07 -07:00
Justin Frank
903ae46b5d Added more kitty integration 2018-09-23 13:15:29 -07: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
49645f8efc Merge remote-tracking branch 'laelath/spell-clear' 2018-09-23 17:05:51 +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
Justin Frank
5700587926 added spell-clear convenience command 2018-09-21 12:30:13 -07: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
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
Justin Frank
f6d5b23122 fixed hooks running when entered character was not alone on the line 2018-09-16 20:53:23 -07:00
Justin Frank
391e58625f fixed mistakenly indenting matching characters 2018-09-16 17:05:32 -07:00
Justin Frank
2c753889ca changed order of git hide-diff in menus 2018-09-16 13:52:17 -07:00
Justin Frank
f422b8c725 added git hide-diff convenience command 2018-09-16 00:30:46 -07:00
Justin Frank
4bb87ef430 macros always end at the start of a line comment 2018-09-15 10:52:18 -07:00
Justin Frank
e32d5ec88e tweaked some of the c-family highlighting of defines 2018-09-14 19:03:49 -07:00
Maxime Coste
c8fd1e1cf6 Merge remote-tracking branch 'laelath/c-indent-edits' 2018-09-13 20:42:04 +10:00
Maxime Coste
b8d312cfe0 Merge remote-tracking branch 'laelath/kakrc-indent-edit' 2018-09-12 21:01:33 +10:00
Justin Frank
22bda7a7d2 removed unnecessary gi in matching deindent hook 2018-09-12 00:04:05 -07:00
Justin Frank
852d22a543 changed opening matching regexes to be simpler 2018-09-12 00:04:05 -07:00
Justin Frank
2f0b0d468c added auto deindent to kak files 2018-09-12 00:04:05 -07:00
Justin Frank
fa9d13700a Added deindenting of single statements 2018-09-11 21:21:25 -07:00
Maxime Coste
d65c99a448 Further fixes in go-tools.kak to improve its robustness 2018-09-10 21:22:32 +10:00
Maxime Coste
73b6f0994f Merge remote-tracking branch 'swdunlop/master' 2018-09-10 21:18:07 +10:00
Maxime Coste
d57203f41f Merge remote-tracking branch 'laelath/clang-fixes' 2018-09-10 19:41:08 +10:00
Justin Frank
0f8caceac5 fixed highlighting of exec lines 2018-09-08 14:00:00 -07:00
Justin Frank
5c8a756d56 fixed showing parse errors not working 2018-09-08 11:39:30 -07:00
Justin Frank
558d4b864a added autoindentation and comment copying to i3 syntax support 2018-09-06 21:53:04 -07:00
Jason Felice
1b1119e85c Improve Clojure highlighting 2018-09-04 20:44:25 -04:00
Scott W. Dunlop
575b02b171 go-tools.kak: quote completions and scope
Since the gocode completions contain white space, they cannot be used without quotations.

Also, since I'm in there, the buffer should be quoted for heathens who use white space in their paths.
2018-09-04 11:41:35 -07:00
Scott W. Dunlop
48f23f0312 go-tools.kak: fix set-options for go completions
Restores Go completions, as discussed in #2215
2018-09-04 10:58:57 -07:00
Justin Frank
15bf1c7614 updated kitty integration to use the no-response switch 2018-09-01 12:14:33 -07:00
Emerson Ferreira
5e8727ad1b
Add support for Void Linux package templates
These templates are simple shell scripts, similar to PKGBUILDs.
They reside in srcpkgs, so we can use this to identify if
`template` really is a Void Linux package template.
2018-08-20 14:29:32 -03:00
Maxime Coste
a91fc83bfe Merge remote-tracking branch 'lenormf/fix-git' 2018-08-20 07:56:32 +10:00
Maxime Coste
1904202d05 Merge remote-tracking branch 'lenormf/fix-lisp' 2018-08-20 07:49:21 +10:00