Commit Graph

429 Commits

Author SHA1 Message Date
David Arnold
1ff9895fe4 just: re-implment bash/sh interpreter 2020-09-15 16:32:07 -05:00
David Arnold
3857696df6
just-highlighter: pre call out to shebang regions 2020-09-15 16:10:40 -05:00
David Arnold
3770baaab0 fix justfile highlighter
This fixes serveral shortcomings of the current implementation:

- valid recipt definitions eg
foo bar="quz":
where previously interrupted by justfile/double_string
and therefore they where not highlighted correctly

- global variable assignments where not captured at all
2020-09-15 15:52:00 -05:00
Maxime Coste
6f260c2ab2 Merge remote-tracking branch 'm-kru/latex' into master 2020-09-08 19:06:56 +10:00
Michał Kruszewski
0f63dd339a Provide better support for Go language.
1. Highlight short variable declaration operator :=.
2. 'while' is not go keyword.
3. Auto insert ')', '}', when line ends with '(' or '{'.
2020-09-07 21:48:06 +02:00
Maxime Coste
cfbff4e132 Merge remote-tracking branch 'kayhide/purescript-filetype' into master 2020-09-06 11:23:48 +10:00
Michał Kruszewski
705712f13b Improve latex support.
Auto insert "\end{[word]}" for "\begin{[word]}".
2020-09-05 16:14:22 +02:00
Hideaki Kawai
c613e3c7f1 Create purescript filetype 2020-09-04 11:33:08 +09:00
Johannes Altmanninger
e1de4aa118 python.kak: Do not indent after comments ending in :
Fixes #3693

This will not work for lines like the one below but I think that's okay
because it does work for most comments.

	foo() # foo:
2020-09-02 06:44:36 +02:00
Frank LENORMAND
3145e3e939 rc markdown: Highlight trailing spaces properly
This commit addresses the following issues:

* highlight trailing space characters with the `meta` face, instead of
  `PrimarySelection`
* make the regex more readable by using a capture group in stead of
  `\K`
* specifically match space characters, not other horizontal whitespace
  characters
* match two or more space characters

Reference[1]:

> When you do want to insert a <br /> break tag using Markdown, you
> end a line with two or more spaces, then type return.

[1] https://daringfireball.net/projects/markdown/syntax#p

Note that the original reproducer doesn't seem to work anymore,
probably because of changes made to how lists are highlighted.

Fixes #911
2020-09-01 13:12:58 +03:00
Johannes Altmanninger
9a7d8df447 Avoid accidentally using environment variables in sh scopes
On the instances with altfile this was already the case, but this makes it more obvious.

Closes #3673
2020-08-24 19:01:05 +02:00
Maxime Coste
4b7fd68d48 Merge remote-tracking branch 'krobelus/indent-after-keyword' 2020-08-24 19:24:19 +10:00
Maxime Coste
beeaf19801 Merge remote-tracking branch 'krobelus/highlight-nested-variable-expansions' 2020-08-24 19:23:35 +10:00
Johannes Altmanninger
ab76ec981a Avoid extra indent when line does not end on keyword
For example there was an indent after a line like "echo todo" with filetype sh
because the "do" in "todo" was recognised as keyword.
2020-08-23 19:15:52 +02:00
Johannes Altmanninger
473967df04 fish.kak: add missing highlighting for builtins true and string
I forgot them last time, sorry for the noise
2020-08-23 19:15:52 +02:00
Johannes Altmanninger
caf9739329 sh.kak: Don't leak highlighting of nested variable expansions
Fixes #3675
2020-08-23 19:15:52 +02:00
Alex Leferry 2
3f8d3dcf86 kakrc: Add trigger-user-hook keyword 2020-08-22 23:16:46 +02:00
Maxime Coste
0b3b912ffc Merge remote-tracking branch 'SolitudeSF/nim' 2020-08-20 19:00:36 +10:00
Maxime Coste
4e4a65e944 Merge branch 'sh-insert' of http://github.com/SeerLite/kakoune 2020-08-17 20:03:12 +10:00
Maxime Coste
83685501ea Merge remote-tracking branch 'caksoylar/fix-python-ops' 2020-08-17 19:59:43 +10:00
SeerLite
e0c756d943 kakrc.kak: Split auto-insert and auto-indent hooks 2020-08-14 23:43:43 -04:00
SeerLite
1af4a1b1a8 sh.kak: Split auto-insert and auto-indent hooks 2020-08-14 23:42:52 -04:00
Cem Aksoylar
03032d6c3e Add assignment expression := (walrus) operator 2020-08-12 23:12:35 -07:00
Cem Aksoylar
e9b0e9a57d Fix <> and ** operators highlighting 2020-08-12 23:11:43 -07:00
Parasrah
151fe01a5c
fix #3651
Similar to Jinja, getting `eex` highlighting in *.ex files
will require users to setup a filetype hook similar to the
following:

hook global WinSetOption filetype=elixir %{
    require-module eex
    add-highlighter window/eex ref eex
}

This is done both to fix a circular dependency between the `elixir`
and `eex` modules, and avoid polluting `elixir` files with false
positives from `eex` highlighting given `eex` is framework specific
2020-08-12 19:14:27 -06:00
SolitudeSF
328ef122ae
Update keywords and suffixes in nim.kak 2020-08-07 12:59:00 +03:00
Maxime Coste
ba7831035f Merge remote-tracking branch 'johnisom/crystal-filetype' 2020-08-03 18:57:45 +10:00
John Isom
72f658f896 Replace my implementation of crystal-insert-on-new-line with already-existing ruby one
This fixed a weird bug where if you were typing in the top level scope of a
program (no indentation before statements), the `end`s wouldn't be inserted
for you.
2020-08-02 11:39:59 -06:00
John Isom
f59bdc614f Fix typo in comment 2020-08-02 11:33:56 -06:00
John Isom
fdf38ecc5e Fix auto indentation for if/case and else 2020-08-02 11:28:27 -06:00
John Isom
6cf39a5f4f Fix auto indentation for if/case and else 2020-08-02 11:22:28 -06:00
Maxime Coste
f60b0a1441 Merge remote-tracking branch 'johnisom/ruby-indentation' 2020-08-02 16:25:07 +10:00
John Isom
8a02bafe0d Beautify indenting in add-highlighter region for percent literals 2020-08-01 13:54:16 -06:00
John Isom
dee96f8e82 Improve syntax highlighting of Ruby percent literals
The syntax highlighting has been broken down into 3 main categories:
string: string, array of words
variable: symbol, array of symbols
meta: regexp, shell execution
2020-08-01 13:37:40 -06:00
John Isom
92558bb675 Add rule for % string literals without bracket/style chars; no recurse yet
Becuase %Q^hello^ is a perfectly valid Ruby string literal. Strange, I know.
2020-08-01 13:18:47 -06:00
John Isom
e858df3ca2 Add 'else' to auto deindent/align logic in context of 'case' statement 2020-08-01 12:12:48 -06:00
John Isom
57e9719c25 Add 'else' to auto deindent/align logic in context of 'case' statement 2020-08-01 11:57:38 -06:00
John Isom
322d0659fd Add 'when' to list of keywords that signifies end for ruby-insert-on-new-line 2020-08-01 11:54:57 -06:00
John Isom
dbb548af2d Fill in implementation of crystal-insert-on-new-line 2020-08-01 11:46:35 -06:00
John Isom
c36583524c Reorder definition of 3 indent/insert commands 2020-08-01 11:32:16 -06:00
John Isom
0d4dfbc349 Implement copying comment char (#) and whitespace after it 2020-08-01 11:31:28 -06:00
John Isom
8f0843978e Beautify indentation of 'crystal-indent-on-char' 2020-08-01 11:19:36 -06:00
John Isom
a6329b4bfc Fix deindentation of end to make it go to the right level 2020-08-01 11:18:41 -06:00
John Isom
d6e3c1ff19 Fix deindenting nested blocks/statements 2020-08-01 10:52:26 -06:00
John Isom
145f2db741 Add rule to align 'end' with opening statement 2020-08-01 10:35:34 -06:00
John Isom
0fe71ebada Add deindentation rule for 'rescue' statement 2020-08-01 10:33:35 -06:00
John Isom
21c083f47c Add rule to align 'when' to 'case' 2020-08-01 10:32:45 -06:00
John Isom
b7490d853d Add support for deindenting rescue statment when part of def (instead of just begin) 2020-08-01 10:28:54 -06:00
John Isom
76eadef00b Add rule to align else/elsif to opening if 2020-08-01 10:27:51 -06:00
John Isom
e84ebfdfab Replace ') <a-&>' with '1<a-&>' 2020-08-01 10:16:48 -06:00