Commit Graph

270 Commits

Author SHA1 Message Date
Maxime Coste
e6a9e14872 markdown.kak: Do not use regions for single/double ` spans
Using a region for them breaks any other regex based highlighter
we would want to apply on top of them.

Fixes #1870
2018-04-04 07:40:03 +10:00
Maxime Coste
510be03910 ctags.kak: Fix compatibility with OSX by using custom realpath implementation 2018-03-30 09:30:18 +11:00
Maxime Coste
f236e837f4 Merge remote-tracking branch 'lenormf/fix-d' 2018-03-25 18:54:52 +11:00
Frank LENORMAND
757e9de1c8 rc d: Improve D highlighting 2018-03-25 10:25:52 +03:00
Maxime Coste
2d85e94516 Fix uses of rotate selection in rc/ files 2018-03-25 11:45:27 +11:00
Alyssa Ross
7c0d10f458
ruby.kak: support squiggly heredocs
Squiggly heredocs were introduced in Ruby 2.3.

They work like `<<-` but strip indentation.
2018-03-23 13:42:48 +00:00
Maxime Coste
2139173d89 Merge remote-tracking branch 'bclinthall/jsBracketAlign' 2018-03-23 07:38:58 +11:00
Clint Hall
06cc993cd4 Fix javascript close bracket alignment 2018-03-22 12:31:43 -04:00
Maxime Coste
796fbc6c1f java.kak: Add some highlighted keywords and highlight annotations 2018-03-22 20:48:18 +11:00
Delapouite
d09256ec4c Add extra_word_chars '-' to css.kak 2018-03-21 07:59:40 +01:00
Maxime Coste
b27d4afa8d Regex: Only allow SyntaxCharacter and - to be escaped in a character class
Letting any character to be escaped is error prone as it looks like
\l could mean [:lower:] (as it used to with boost) when it only means
literal l.

Fix the haskell.kak file as well.

Fixes #1945
2018-03-20 04:57:47 +11:00
Dan Rosén
6fdb9db5d9 Improve JS/TS highlighter slightly 2018-03-19 11:31:38 +01:00
Maxime Coste
8479b33861 Merge remote-tracking branch 'Screwtapello/more-markdown-highlighting-improvements' 2018-03-15 23:23:44 +11:00
Tim Allen
0a4a9f1c3d Markdown inline formatting should not span paragraphs.
Previously, two underscore characters in a document would mark the entire
space between them as italic, no matter how far apart. Now we only accept a
single consecutive newline within an inline-formatted span, so hard-wrapped
documents will still format nicely but stray characters won't mess up your
entire document.

Note that the highlighter for backtick-enclosed spans was modified,
even though it's redundant with the code-block highlighting introduced
in 5bc62c694.
2018-03-15 18:26:20 +11:00
Tim Allen
78f1e1ca98 Highlight footnote-style hyperlinks.
As well as the traditional `[text](url)` syntax, Markdown allows the text to
be followed by a tag in square brackets. If the text is followed by nothing
at all, then the tag for that link is the text itself. The actual URL
is supplied later in the document, like a footnote at the bottom of the page:

	Some text with [a link][tag] and [another link].

	[tag]: http://www.example.com/link1
	[another link]: http://www.example.com/link2

This adds the "link" face to the URL in such footnote lines.
2018-03-15 18:16:47 +11:00
Alex Leferry 2
1ede2b89bb Add application media-type to file-type detection 2018-03-14 17:04:03 +01:00
Delapouite
e46251db69 Add ctagscmd option
Fixes #1611
2018-03-11 15:13:19 +01:00
Maxime Coste
65258934d3 lua.kak: Rework 'end' auto insertion logic
Fixes #1525
2018-03-04 10:36:32 +11:00
Maxime Coste
4d11bb20c3 Always collapse jumps in exec/eval, remove -collapse-jumps switch
There does not seem to be any reasonable use cases of not collapsing
jumps when the input is not comming from the user. Always collapse
them.

It could make sense to move jump collapsing out of context_wrap as
in general any action not comming directly from the user should
collapse them, at the moment a comment or mapping will not collapse
jumps, which is unfortunate.
2018-02-24 19:02:15 +11:00
Maxime Coste
4f75358ce3 lua.kak: Fix string highlighting with -match-capture regions
With the introduction of -match-capture for the lua region highlighter,
the string closing regex had spurious captures that were not going to
match.

Fixes #1850
2018-02-18 16:21:05 +11:00
Maxime Coste
f8861734cf rc/: Replace simple uses of sed with tr 2018-02-18 15:00:30 +11:00
Maxime Coste
82c8a6e9dd Merge remote-tracking branch 'alexherbo2/rc-ruby' 2018-02-18 11:36:42 +11:00
Alex Leferry 2
04b57539e8 Recognize .gemspec files as Ruby 2018-02-18 00:49:09 +01:00
Frank LENORMAND
f25e8640b8 base javascript: Tweak variable highlighting
This commit avoids false positives when highlighting literals such as
`$window`, which is a regular variable but still highlighted as a
special value.

Special highlighting of variables that start with a dollar sign `$`
was also removed, as not all variables start with a dollar sign,
and we don't have a reliable way yet to detect variables.
2018-02-17 11:53:56 +03:00
Maxime Coste
f5e39972eb Merge remote-tracking branch 'jacobdufault/lua-better-strings' 2018-02-15 23:35:01 +11:00
Jacob Dufault
42f78dfac3 Highlight nested == comments/strings in lua.
For example,

  [==[ string ]==]
2018-02-11 22:23:49 -08:00
Maxime Coste
d95530b171 lint.kak: Update lint info when the linting data changed
Fixes #1836
2018-02-11 22:03:24 +11:00
Maxime Coste
c939c30135 ocaml.kak: remove invalid unset-option static_words hook
unsetting static_words whenever any buffer filetype is set to non ocaml
is wrong, it breaks static_words for every filetype whose filetype hook
run before the ocaml ones.
2018-02-11 21:51:32 +11:00
Maxime Coste
01259bf22c Merge remote-tracking branch 'MilanVasko/lua-comment-fix' 2018-02-11 19:10:24 +11:00
Milan Vaško
128e0f53ff Fixed Lua block comment highlighting
Block comments in Lua were broken, apparently due to the opening
sequence being interpreted as a line comment. Changing the order in the
highlighter seems to fix this issue.
2018-02-10 13:40:48 +01:00
Alex Leferry 2
39c0c03351 Highlight Ruby control access keywords 2018-02-08 13:34:40 +01:00
Dan Rosén
3ac328c1f7 Highlight JSX
Additionally merges the javascript and typescript highlighters.

Fixes #1700
2018-02-04 08:31:03 +01:00
Maxime Coste
cfa497362c Merge remote-tracking branch 'alexherbo2/rc-javascript' 2018-01-31 09:39:40 +11:00
Alex Leferry 2
6fe8b9eb70 Highlight JavaScript static keywords 2018-01-30 19:19:12 +01:00
Jimmy Thrasher
7bf235b0ee Add heredoc support for ruby.kak 2018-01-26 07:56:36 -05:00
Maxime Coste
43f50c0852 Convert bundled scripts to ModeChange hook 2018-01-21 10:35:05 +11:00
Dan Rosén
969f416027 Generate the markdown highlighter code 2017-12-13 07:27:45 +01:00
Maxime Coste
cb2ff7eb5f Merge remote-tracking branch 'danr/fence' 2017-12-12 17:57:26 +11:00
Dan Rosén
5bc62c6942 Fix highlight references in Markdown fenced code blocks
Fixes #1735

We need \K to not interfer with languages own interpretation of ` like multiline strings in javascript

We need \b in e.g. java\b otherwise it blocks javascript

I couldn't get the bare ``` to not block the other highlighters when introducing \K any other way than negative lookahead of all possible highlighers
2017-12-10 23:00:26 +01:00
Francesco Mazzoli
fa61d7aac0 fix regression in highlighting of qualified Haskell variables
Commit 870d2d22d7 introduced a regression
in the highlighting of qualified Haskell variables, such as `Foo.bar`.
After that commit `Fo` was highlighted as a constructor (note, not
`Foo`, just `Fo` without the trailing `o`). This restores the original
behavior.
2017-12-10 21:04:03 +01:00
Maxime Coste
19556d5fbe Merge remote-tracking branch 'Geemili/fix-inline-markdown' 2017-12-10 10:18:51 +11:00
Maxime Coste
9071e2a6bf Merge remote-tracking branch 'Geemili/feature-restructuredtext' 2017-12-10 10:18:23 +11:00
LeRoyce Pearson
4f069edca6 Add reStructuredText support script
- headers
- bold emphasis
- regular emphasis
- code highlighting
- inline literals
2017-12-09 14:15:00 -06:00
LeRoyce Pearson
3acf3aa5a2 Fix overlapping inline markup
Make it some some text like "**bold**" wil not be marked as italic and bold.
2017-12-08 16:04:43 -06:00
Nicholas Ochiel
908e0c1f8c * Crude implementation of focus: use the current region to switch to the desired window.
- The proper way to do this would be to switch focus to the target client's region but GNU Screen offers no obvious way to do that.

- Remove screen region after client is closed.

- Assumed: Kak server runs in screen.
2017-12-03 20:05:02 +03:00
valerdi
4d4c6aa82b
added AbstractString to keywords 2017-11-30 15:44:12 +01:00
Maxime Coste
386f595a49 screen.kak: use define-command full name instead of def alias 2017-11-16 12:56:42 +08:00
Nicholas Ochiel
133fcb0ce4 code review: typos. 2017-11-15 17:42:37 +03:00
Nicholas Ochiel
d9a574acd5 Integration with GNU screen; based on tmux.kak
- Hack: kak sets `/proc/self/fd/0 -> /dev/null`. Get the client process tty because Screen needs to know the controlling terminal. Else Screen will use the last known tty and will open new windows on a different terminal if one is connected.
2017-11-15 06:10:26 +03:00
Delapouite
29e2a73638 Fix lint.kak evaluate-commands → eval 2017-11-06 10:51:55 +01:00