Commit Graph

1252 Commits

Author SHA1 Message Date
Delapouite
5305c6b1ff Add 'nop' keyword highlighting in .kak files 2018-06-01 10:46:05 +02:00
Hao Deng
57b71f0750
Update tmux-repl.kak 2018-05-31 09:37:50 -04:00
Hao Deng
aeddf067d0
Update tmux-repl.kak 2018-05-31 09:35:28 -04:00
Hao Deng
9e0fb5da5f tmux-send-text can take 1 parameter now. 2018-05-30 22:26:26 -04:00
Maxime Coste
ffdeab8aba Merge remote-tracking branch 'Delapouite/lint-counters' 2018-05-30 23:46:28 +10:00
Maxime Coste
9c59f59999 Merge remote-tracking branch 'Delapouite/grep' 2018-05-30 23:45:19 +10:00
Delapouite
bbf484c596 Limit highlighter to line in grep buffers 2018-05-30 14:40:29 +02:00
Maxime Coste
d6101bc10a Merge remote-tracking branch 'JJK96/master' 2018-05-29 08:13:08 +10:00
Jan-Jaap Korpershoek
d1feae6716 Add check for i3 filetype 2018-05-28 11:04:34 +02:00
Maxime Coste
5ad188e14c rc/: Escaping cleanups in bundled scripts
Remove escapes that trigger errors when experimenting with doubling-up
escaping.
2018-05-26 21:32:50 +10:00
Maxime Coste
6ce248b59c tupfile.kak: regex escaping cleanup 2018-05-26 21:31:57 +10:00
Delapouite
712feed7e5 Display a more comprehensive status message for lint command 2018-05-26 12:30:01 +02:00
Maxime Coste
4effa577da Merge branch 'patch-2' of git://github.com/co-dh/kakoune 2018-05-26 09:46:50 +10:00
Jan-Jaap Korpershoek
29c06b46e4 Add syntax highlighting for i3/sway config file 2018-05-24 21:47:45 +02:00
Delapouite
678085a685 Fix truncated message in lint.kak 2018-05-24 19:36:32 +02:00
Hao Deng
7276b182ea
save pane id instead of index
pane index '#P' will change when new pane added.
2018-05-23 22:13:37 -04:00
Alyssa Ross
08c948f52b
Insert spaces after line comment markers
Every other text editor I've ever used does this, and this makes Kakoune
consistent with how comments work in e.g. its own source code.
2018-05-22 12:24:54 +01:00
Maxime Coste
8c6af54db3 c-family.kak: Fix comment line continuation behaviour
Fixes #2043
2018-05-19 14:15:16 +10:00
Maxime Coste
1e3d941fdc Merge remote-tracking branch 'h-3-0/add-toml' 2018-05-17 08:15:47 +10:00
Henri Jones
809f825e66 Add TOML v4.0.0 config 2018-05-16 23:00:05 +01:00
Maxime Coste
8e1646b702 c-family.kak: Remove unneeded itersel
itersel can get very expensive with many selections, it should only
be used when necessary.
2018-05-17 07:41:32 +10:00
Maxime Coste
b204e773d4 Do not push jumps implicitely in transient contexts
This should improve performance in draft contexts.
2018-05-14 08:23:00 +10:00
Maxime Coste
095ccfedb4 Merge remote-tracking branch 't6/patch-freebsd-tmux' 2018-05-09 23:03:13 +10:00
Maxime Coste
3c29bf1ea6 ctags.kak: Improve shell compatibility in ctags-funcinfo 2018-05-09 23:02:38 +10:00
gspia
bbd1fd6576 Comments for Idris 2018-05-04 10:22:17 +03:00
Tim Allen
7e124eef98 markdown.kak: backtick spans should be non-greedy.
Previously, due to a typo, Kakoune would highlight backtick spans from the first backtick to the last backtick in a paragraph, no matter how many backticks were in between. Now spans correctly stop at the first backtick after the opening backtick.
2018-05-02 13:54:45 +10:00
Maxime Coste
72bf881488 git-tools.kak: Remove not (yet) existing -with-hooks switch use
Fixes #2015
2018-04-27 19:44:58 +10:00
Maxime Coste
869736359a Make all fifo cleanup hooks run always
Those should not get prevented from running just because the user
disabled hooks, they are important for cleanup.
2018-04-26 08:31:36 +10:00
Maxime Coste
f99f0020dc Fix (again) C++ raw string highlighting 2018-04-25 21:19:04 +10:00
Tobias Kortkamp
bb124895b7
tmux-repl fails on FreeBSD and claims that tmux' version is too old
even though tmux 2.7 is installed.

The problem is that
```
expr "$(tmux -V)" : 'tmux \([0-9]*\|master\)'
```
fails on FreeBSD.  It works fine with GNU expr.

Replace the expression with cut(1) and a simple parameter expansion
which should hopefully work fine on any POSIX system.

Signed-off-by: Tobias Kortkamp <git@tobik.me>
2018-04-24 20:16:32 +02:00
Maxime Coste
ee604fd863 Merge remote-tracking branch 'Delapouite/set-option' into master 2018-04-22 09:41:15 +10:00
Maxime Coste
4c5a3c1dff git-tools.kak: improve completion support and no-message detection 2018-04-22 09:40:45 +10:00
Maxime Coste
fea6bc9524 c-family.kak: Fix highlighting of raw strings 2018-04-22 09:40:45 +10:00
Delapouite
9eb1bb4481 Docs: fix docstrings in rc files set-optionset 2018-04-19 19:28:32 +02:00
Maxime Coste
567c82840a ruby.kak: Refactor end autoinsertion logic to be more robust
Fixes the bug described by PR #1994
2018-04-14 12:47:42 +10:00
Maxime Coste
57baad4afd Make FaceRegistry scoped
set-face now takes a scope argument, and faces can be overridden on
a buffer or window basis.

colorscheme apply on global scope, which should be good enough for
now.

Fixes #1411
2018-04-07 16:27:50 +10:00
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
8eee5500ea Revert "Simplify comment-line command using trimming primitive"
This reverts commit e661fece72.
2018-03-30 09:29:05 +11:00
Maxime Coste
4a2125f752 make.kak: Fix Ninja compatibility for directory entering messages 2018-03-30 09:18:06 +11:00
Delapouite
e661fece72 Simplify comment-line command using trimming primitive 2018-03-27 19:53:13 +02:00
Maxime Coste
e9e83cdb8d Merge remote-tracking branch 'lenormf/fix-kakrc' 2018-03-26 07:47:59 +11:00
Maxime Coste
f236e837f4 Merge remote-tracking branch 'lenormf/fix-d' 2018-03-25 18:54:52 +11:00
Frank LENORMAND
66f99a3802 rc kakrc: Highlight boolean values 2018-03-25 10:27:12 +03: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
Maxime Coste
3fe93db610 Merge remote-tracking branch 'alyssais/patch-1' 2018-03-24 08:17:41 +11:00
Maxime Coste
3ae94d017d iterm.kak: use command argument instead of sending text
Instead of starting the default shell and sending it text (hoping
it will support POSIX like shell syntax), just use the `env` utility
to set the correct environment and exec kakoune.
2018-03-24 08:06:36 +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
42404ddb3a Merge remote-tracking branch 'Delapouite/kakrc' 2018-03-23 07:42:38 +11:00
Maxime Coste
c31b66f3a0 Merge git://github.com/gspia/kakoune 2018-03-23 07:42:12 +11: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
Delapouite
754a96eb3e Add hl for declare-user-mode and enter-user-mode in kakrc.kak 2018-03-22 15:08:59 +01:00
gspia
056560131a Add a space to haskell commment-line comment string. 2018-03-22 13:56:07 +02:00
Maxime Coste
796fbc6c1f java.kak: Add some highlighted keywords and highlight annotations 2018-03-22 20:48:18 +11:00
Maxime Coste
f8e297acef Merge remote-tracking branch 'topisani/master' 2018-03-22 07:49:49 +11:00
topisani
2682e3021d [rc] Improve php.kak
- Added <?php and ?> tags, and highlight everything outside as html
 - Highlight documentation comments and @fields
 - Added basic string interpolation highlighting
2018-03-21 14:44:52 +01: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
Marc
b3cc80126a Remove unused var in racer support 2018-03-18 10:46:46 +00:00
Marc
484164580e CARGO_HOME to identify racer dependencies 2018-03-17 20:27:11 +00:00
Marc
ee7cab82b4 Make racer support scripts more POSIX compliant 2018-03-16 12:25:17 +00:00
Maxime Coste
ebd47d538b Merge remote-tracking branch 'marcesquerra/racer-extra-commands' 2018-03-16 15:17:11 +11:00
Marc
898dfea8a1 racer-go-definition forces readonly on files external to the project 2018-03-15 20:37:27 +00: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
Marc
2bf8941d99 Clean racer support functions 2018-03-14 15:56:25 +00:00
Marc
2f41fdb683 Tweak the bash code on the racer support 2018-03-13 13:52:09 +00:00
Marc
67ce6946d2 Add jumpToDefinition and showDoc support for rust (with racer) 2018-03-12 12:47:47 +00:00
Delapouite
e46251db69 Add ctagscmd option
Fixes #1611
2018-03-11 15:13:19 +01:00
Maxime Coste
c6c501eb5b asciidoc.kak: Fix highlighting of _itallic_ markup
`_` is a word character, so the regex cannot be exactly the same
as for `*`.
2018-03-05 11:20:56 +11:00
Maxime Coste
56e005e996 Merge remote-tracking branch 'marcesquerra/racer-fix-for-mac' 2018-03-05 07:41:18 +11:00
Marc
2ef1ac0b3b Fix racer complation on Mac 2018-03-04 20:14:53 +00:00
Maxime Coste
e4e2ed2a42 Merge remote-tracking branch 'fsub/arch-linux' 2018-03-05 00:39:37 +11:00
Maxime Coste
8acedacf7c Merge remote-tracking branch 'marcesquerra/racer-tweaks' 2018-03-04 10:59:31 +11:00
Maxime Coste
65258934d3 lua.kak: Rework 'end' auto insertion logic
Fixes #1525
2018-03-04 10:36:32 +11:00
fsub
e583b9a258 Fix #1838: Introduce 'arch-linux.kak' 2018-03-03 19:59:54 +01:00
Maxime Coste
5c247bf1dd c-family.kak: Do not mistake '\"' for a double quoted string start
Fixes #1893
2018-03-01 14:01:09 +11:00
Maxime Coste
3e50d39f8e comment.kak: recognize xml files 2018-02-28 15:07:25 +11:00
Marc
f6a3fd2e4e Unify racer code completion format
Makes all the suggestions on the completion menu have the same format:
  {type}{suggestedWord}{extra description}

the type column is aligned to 6 characters wide (and aligned to the right),
to allow the suggestion to be easily visually detectable and, as a bonus,
the type too.

For example, a bit of menu would look like this:
        fn stdout() -> Stdout
     trait BufRead: Read
    struct BufReader<R>

Type is one of the following:
  -     fn
  -   enum
  -    mod
  -  trait
  - struct

It also trims the module extra bits to only 30 characters long (it can be a lot longer than that)
2018-02-26 13:07:41 +00:00
Marc
d79e680e71 Remove trailing ':' from racer execution
When AWK processes the racer response, it adds a trailing ':' that
kakoune completion expects to lead to a row having an 'a|b|c' shape,
but it's empty instead. Removing the extra ':' allows the racer
complation to actually work.
2018-02-26 12:24:12 +00: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
e93c31ff0d doc.kak: stricter parsing of formatted text
Format markers such as *, _ or ` must be followed/preceeded by a non
whitespace character to be considered formatting marker.
2018-02-22 22:22:13 +11:00
Maxime Coste
026cf8af3a doc.kak: fix handling of lines begining with * or -
Those were considered as any other lines for paragraph joining,
threat them as a new paragraph start, to correctly handle asciidoc
lists.
2018-02-22 22:09:00 +11:00
Maxime Coste
9b5b974397 iterm.kak: Implement focus support 2018-02-20 20:56:06 +11:00
Maxime Coste
9755f7f8f2 make.kak: Fix echoing of error message when jumping
The use of `%{...%reg{...}}` was not being expanded correctly, as
the enclosing %{...} prevents the internal %expand{...} from being
considered.

The introduction of an additional command allows us to bypass
quoting hell as the expansion of %reg{5} could contain arbitrary
text.
2018-02-19 21:43:43 +11:00
Maxime Coste
cbf11d7a07 nim.kak: Fix wrong tr invocation 2018-02-19 21:24:36 +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
Maxime Coste
fb07e2cfcf clang.kak: workaround OSX awk strange parsing of bracket expressions
For some reason `[[:alnum:]{}_]` does not match `{` when
`[{}_[:alnum:]]` does
2018-02-07 19:40:45 +11: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
9883cf5f75 Merge remote-tracking branch 'nochiel/nochiel-fix-tmux-repl' 2018-02-04 09:33:52 +11:00
Daniel Lewan
bc876fa4b6 add justfiles support 2018-02-03 14:43:20 +01:00
Nicholas Ochiel
ca8cbf316c Check if tmux was compiled from master.
Fixes #1827.
2018-02-03 01:14:25 +03: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
a612432c8d Highlight python operators 2018-01-07 23:36:41 +01:00
Dan Rosén
40aaf63338 Highlight python doctests in docstrings 2018-01-07 23:36:41 +01:00
Maxime Coste
4740dbf9fa doc.kak: Fix anchor name completion 2017-12-29 09:37:04 +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
Maxime Coste
593a75acbe Merge remote-tracking branch 'lenormf/fix-pony' 2017-12-12 17:55:18 +11:00
Maxime Coste
82b7f462dc Merge remote-tracking branch 'SolitudeSF/nim' 2017-12-12 17:55:02 +11:00
Frank LENORMAND
996168f504 rc pony: Remove hardcoded indentation settings 2017-12-11 18:27:28 +03:00
SolitudeSF
8ae8e7b31a Removed indentation settings 2017-12-11 10:26:06 +02: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
Maxime Coste
62f47b780b Merge branch 'fix-haskell-variables-regression' of git://github.com/bitonic/kakoune 2017-12-11 08:54:23 +11:00
Maxime Coste
d494b9de34 Merge remote-tracking branch 'SolitudeSF/nim' 2017-12-11 08:48:50 +11: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
SolitudeSF
6eabec908e Expand nim support 2017-12-09 23:02:59 +02: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
Maxime Coste
2f9deaf067 Merge remote-tracking branch 'nochiel/nochiel-screen' 2017-12-07 19:54:11 +08:00
Maxime Coste
7072e65a28 Merge remote-tracking branch 'danr/typescript-comment' 2017-12-07 10:46:26 +08:00
Dan Rosén
fbe312e0d0 Add typescript to comment.kak 2017-12-06 20:50:05 +01:00
Maxime Coste
1b44056fce man.kak: Better support for renaming a man buffer
Fixes #1718
2017-12-06 14:49:38 +08:00
Maxime Coste
a9f1a23f35 man.kak: use shell-candidates instead of shell-completions 2017-12-06 14:10:10 +08:00
Maxime Coste
363a0c3a0d man.kak: Fix behaviour when called with no params with Posix shells
Seems dash nevers falls back for ${@-$blah}, it does not considers $@
to be empty. Use ${1-$blah} instead as we never have more than one
parameter.
2017-12-06 13:23:39 +08:00
Frank LENORMAND
e5742fd6b1 - Fix: proper escaping of kak_{session, client} 2017-12-06 02:30:42 +03:00
Nicholas Ochiel
494d046fb2 * Integrate ranger with GNU Screen.
- Ensure ranger opens with the currently focused client tty if multiple screen clients are connected to the same session.
- Ensure args are passed to ranger correctly.
- Ensure command-line args are passed to ranger correctly. (Only strict long format works e.g. `ranger --cmd="echo foo"`)
- Change the current directory because `screen -X` uses screen's cwd not kakoune's.
- Use heredoc to make escaping and quoting easier to debug and slightly less unpredictable.
- Use ranger's `--choosefiles` option instead of mapping keys and having to do multiple levels of escaping and quoting of args esp. command-line args which were unusable in `screen -X eval`.
- Remove screen region when user quits ranger.
2017-12-06 02:29:40 +03: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
Maxime Coste
23fdb914bf Merge remote-tracking branch 'lenormf/fix-dockerfile' 2017-12-03 18:13:39 +08:00
Maxime Coste
c83f7d5b1e Merge remote-tracking branch 'lenormf/nim-support' 2017-12-03 18:13:30 +08:00
Maxime Coste
35d2b2b4bc c-family.kak: Use regex custom text object to simplify some indent 2017-12-03 17:48:04 +08:00
Maxime Coste
1a38849086 c-family.kak: indent after parenthesis at end of line 2017-12-03 17:47:44 +08:00
Frank LENORMAND
f3238f4e65 rc dockerfile: Remove a left-over debug instruction 2017-12-01 17:12:41 +03:00
Maxime Coste
e9e3dc862c Merge git://github.com/valerdi/kakoune 2017-12-01 16:40:31 +08:00
Maxime Coste
90c91ca3a2 Merge remote-tracking branch 'lenormf/fix-dockerfile' 2017-12-01 16:39:50 +08:00
valerdi
4d4c6aa82b
added AbstractString to keywords 2017-11-30 15:44:12 +01:00
Frank LENORMAND
e102251880 rc: Implement basic Nim support 2017-11-29 19:15:00 +03:00
Maxime Coste
74b0c98769 Merge remote-tracking branch 'occivink/comment' 2017-11-24 16:29:30 +08:00
Olivier Perret
ee117b9499 set registers directly instead of expanding options in exec 2017-11-23 10:30:10 +01:00
Frank LENORMAND
58ccf6b295 rc python: Highlight built-in exceptions 2017-11-18 11:56:47 +03:00
Maxime Coste
386f595a49 screen.kak: use define-command full name instead of def alias 2017-11-16 12:56:42 +08:00
Maxime Coste
281890ea7a Merge remote-tracking branch 'nochiel/nochiel-screen' 2017-11-16 12:56:09 +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
Maxime Coste
77b0ee1e19 Merge remote-tracking branch 'lenormf/extend-python-highlighters' 2017-11-14 18:08:27 +08:00
Frank LENORMAND
105d7a1276 rc python: Extend highlighted keywords and numbers 2017-11-14 12:50:20 +03:00
Maxime Coste
2ab9f65b36 c-family.kak: Use <a-S> in various auto indent hooks 2017-11-14 13:32:46 +08:00
Maxime Coste
9c964e97f0 c-family.kak: Highlight character literals later
That way it overrides integer literal highlighters in the case where
they conflict.
2017-11-14 11:45:30 +08:00
fsub
ee695ecf95 c-familiy.kak: improve highlighting of C++ literals 2017-11-12 18:16:20 +01:00
Maxime Coste
add7f7e76b Revert "c-family.kak: Remove invalid 'compl' keyword from C++ highlight"
This reverts commit f8dee65d6e.

compl is actually the alternate keyword for `~`.
2017-11-11 09:54:32 +08:00
Maxime Coste
f8dee65d6e c-family.kak: Remove invalid 'compl' keyword from C++ highlight 2017-11-09 10:43:46 +08:00
Maxime Coste
5791632a98 c-family.kak: use space separated words list 2017-11-09 10:25:03 +08:00
Maxime Coste
a131edb9b3 Merge remote-tracking branch 'fsub/c-family' 2017-11-09 10:09:58 +08:00
Maxime Coste
8aa35c0724 doc.kak: Use a github compatible anchor generation
Convert session names to lowercase and replace spaces with minus
to generate anchor names.
2017-11-08 20:15:46 +08:00
Maxime Coste
b8fdcff7b0 doc.kak: anchor/section completion support 2017-11-08 17:20:37 +08:00
Maxime Coste
b63f16e7a2 doc.kak: Support anchors and internal links
Underline links, support jumping to a specific anchor either in
the current page or another one, use those new features in some
pages.
2017-11-08 16:32:49 +08:00
Maxime Coste
d6b5240bdf doc.kak: Remove unused lines 2017-11-06 20:53:50 +08:00
Maxime Coste
73182de20c doc.kak: Support jumping on links using <ret> 2017-11-06 20:52:24 +08:00
Maxime Coste
19cda837ff doc.kak: Simplify completion script 2017-11-06 20:47:12 +08:00
Delapouite
29e2a73638 Fix lint.kak evaluate-commands → eval 2017-11-06 10:51:55 +01:00
fsub
db15f7adc5 c-family.kak: Add missing C++ keywords, attributes, and types 2017-11-05 10:11:59 +01:00
fsub
1ad83745c2 c-family.kak: Sort keywords, attributes, values, and decorators 2017-11-05 10:11:59 +01:00
Maxime Coste
b5de3064e0 Merge remote-tracking branch 'lenormf/fix-tupfile' 2017-11-05 12:22:18 +08:00
Tim Allen
f9351d65eb rust.kak: Support Rust's documentation comments.
As well as ordinary `//` line-comments, Rust regards `///` comments
as documentation applying to the following item, and `//!` comments as
documentation applying to the enclosing item, so we should copy those
to new lines, too.
2017-11-04 21:54:48 +11:00
Frank LENORMAND
61ab3a1d26 rc: Fix Tupfile highlighting 2017-11-04 10:56:20 +03:00
Frank LENORMAND
ff557a0cf0 rc: Simplify Dockerfile support, highlight values and additional keywords 2017-11-04 10:45:58 +03:00
Olivier Perret
16f42fe3a6 refactor comment.kak
* move most of the kakoune implementation outside of the shell scope
  to avoid unnecessary escaping
* let kakoune do the option expansions to avoid injection of special
  characters
* split block commenting options into two and do the < to <lt>
  conversion directly
* show error messages directly in the buffer rather than in *debug*

Fixes #1600 and #875
2017-11-03 13:20:02 +01:00
Olivier Perret
00d8716c79 commenting: move rust to the C-style group 2017-11-03 13:13:42 +01:00
Maxime Coste
9b216e0e79 Merge remote-tracking branch 'lenormf/fix-rc-aliases' 2017-11-03 19:32:30 +08:00
Frank LENORMAND
9127ed0d55 src rc: Rename exec/eval into execute-keys/evaluate-commands 2017-11-03 11:09:45 +03:00
Frank LENORMAND
c9b280b712 rc: Don't use command aliases to highlight keywords properly 2017-11-03 10:34:41 +03:00
Kylie McClain
79f725a558 sh: support mksh 2017-11-02 23:23:54 -04:00
Maxime Coste
b3daf6b746 doc.kak: Support rendering _italic_ text as well 2017-11-02 17:42:16 +08:00
Maxime Coste
4fabba3d12 doc.kak: Render documentation internally instead of relying on man
doc.kak now behaves as a basic asciidoc renderer. Asciidoc is unfortunately
still a dependency to generate the manpage of the `kak` command.
2017-11-02 10:03:24 +08:00
Maxime Coste
90865b65cd asciidoc.kak: Highlight ^=+ syntax sections 2017-11-02 09:52:18 +08:00
Maxime Coste
424b2389cb kakrc.kak: Fix highlighting of key words at start of buffer 2017-11-02 01:28:37 +08:00
Maxime Coste
5e6077acc2 html.kak: Change </...> align hook to only run after inserting '>'
Improve the hook to support nesting of tags as well.
2017-10-30 17:04:54 +11:00
Maxime Coste
c8257a58a5 kakrc.kak: set '-' as an additional word char 2017-10-28 13:43:04 +08:00
Maxime Coste
d7671f0cdf kakrc.kak: Fix static word definition 2017-10-28 13:43:04 +08:00
Maxime Coste
d49555fc75 Move highlighters into Scopes
That means we can now have highlighters active at global, buffer, and
window scope. The add-highlighter and remove-highlighter syntax changed
to take the parent path (scope/group/...) as a mandatory argument,
superseeding the previous -group switch.
2017-10-28 13:43:04 +08:00
Maxime Coste
c95bd83ea1 haskell.kak: remove complex lookarounds
Highlighting is going to be slightly less correct, but we get rid
of the last incompatible regex in rc/
2017-10-25 10:29:27 +08:00
Maxime Coste
d09924d24b asciidoc.kak: use a more tolerant block regex for
Get rid of the nasty backreference we were relying on.
2017-10-25 10:29:27 +08:00
Maxime Coste
591ddb86e3 markdown.kak: Remove fenced block support from
Its not in the spec, except for code blocks that we handle differently
anyway. More importantly it currently relies on backreference.
2017-10-25 10:29:11 +08:00
Maxime Coste
7dc800c213 Simplify lookaround use in moon.kak
(?=[A-Z]\w*) is strictly the same as (?=[A-Z]) as \w* will always
at least match an empty string.
2017-10-25 10:29:11 +08:00
Maxime Coste
870d2d22d7 haskell.kak: Remove some complex lookarounds 2017-10-25 10:28:59 +08:00
Maxime Coste
0fa59e5fd2 rc/: Tweak some regexes to be compatible with our impl limitations
The upcoming custom implementation does not support arbitrary lookarounds,
and other advanced regex features. Simplify the regexes to avoid those.
2017-10-25 10:27:39 +08:00
Maxime Coste
bf6e5daa08 Use stricter regex syntax
boost regex tolerates non-escaped special characters, and escaped
non-special characters. Standardize on stricter syntax, where
special characters must be escaped, and non-special characters must
not.
2017-10-25 10:27:39 +08:00
Maxime Coste
80d661e6a7 rc/: More consistent uses of regex syntax
Always use \A \z for subject start/end, always \b for word boundaries
2017-10-25 10:27:25 +08:00
Maxime Coste
30ce5a0055 Merge remote-tracking branch 'nochiel/nochiel-modelines' 2017-10-23 16:34:17 +08:00
Maxime Coste
214f321951 Merge remote-tracking branch 'danr/Fix-introduced-mistake-in-kakrc-highlighting' 2017-10-23 16:33:26 +08:00
Maxime Coste
6d65d8e778 kakrc.kak: refactor grammar handling 2017-10-23 10:56:45 +08:00
Dan Rosén
577d84217a Fix introduced mistake in kakrc highlighting 2017-10-22 01:23:12 +02:00
Nicholas Ochiel
d168c75002 vim modeline regex should accept not one but "at least one" whitespace. 2017-10-21 21:04:39 +03:00
Maxime Coste
6740e3cc0c Add some more keywords to kakrc highlighting 2017-10-21 18:48:35 +08:00
Maxime Coste
e6009f7f9b Merge remote-tracking branch 'danr/Improve-kakrc-highlighter' 2017-10-21 17:36:08 +08:00
Dan Rosén
5b0f070300 Improve kakrc highlighter 2017-10-21 10:08:50 +02:00
Dan Rosén
1310193a0a Fix typescript highlighter
Before this patch keywords are highlighted in comments etc
2017-10-21 09:56:38 +02:00
Maxime Coste
f76535613e Merge remote-tracking branch 'helvetie/ini-comments' 2017-10-20 17:29:02 +08:00
helvetie
7edc1a57a3 ini.kak: add ';' as a valid comment character 2017-10-19 15:05:17 +02:00
wheatdog
6f6e76a245 Fix latex.kak
Solve #1346
2017-10-17 21:14:08 +08:00
Maxime Coste
209113aa1c Merge remote-tracking branch 'nochiel/nochiel-fix-autorestore' 2017-10-17 10:30:24 +08:00
Maxime Coste
431e226fc8 Merge remote-tracking branch 'danr/Add-support-for-typescript' 2017-10-15 22:51:44 +08:00
Nicholas Ochiel
24e9b86562 ref vim options.txt 2017-10-15 06:04:19 +03:00
Alex Suraci
c702c915c1 iterm: use 'exec' so pane auto-closes with editor
this uses 'export' to set $TMPDIR instead; fish provides an 'export'
function for bash-compatibility, so this should work for both shells.

note that prior to this change, opening new panes with fish did not
work, as fish does not support `FOO=1 bar` syntax.
2017-10-13 16:01:06 -04:00
Nicholas Ochiel
040a096f36 Do not restore old backup files. This check is necessary for cases where
- the file was edited with a different editor/program or
- kak didn't restore a backup or
- if old backups weren't purged or
- if autorestore wasn't loaded (e.g. `kak -n`) after backups were generated.
2017-10-12 15:33:21 +03:00
Dan Rosén
ad724ab1a8 Add support for typescript 2017-10-10 10:23:25 +02:00
Maxime Coste
397e5ef0e1 Fix potential bug in clang.kak 2017-10-10 10:53:12 +08:00
Frank LENORMAND
1cfee17a16 rc man/doc: Don't show groff warnings
Sometimes the implementation of `man` will display errors, e.g.

```
<standard input>:4808: warning [p 54, 13.2i]: can't break line
```

Those errors are harmless but are still reported on the debug buffer,
so we hide them by redirecting the standard error stream to /dev/null.
2017-09-30 08:23:10 +03:00
Frank LENORMAND
1e3c343773 rc doc: Use POSIX flag -name instead of -iname 2017-09-30 08:15:14 +03:00
Frank LENORMAND
18e64c5c7d rc doc: Implement the -i flag of sed in a POSIX manner 2017-09-29 22:16:31 +03:00
Frank LENORMAND
f26854694e rc doc: Remove window hooks automatically assigned
When using the `man` filetype to make use of the text highlighters
of the `man.kak` script, the documentation pages inherit from the
window resizing hooks that won't work on `doc` buffers.

Fixes #1591
2017-09-29 22:12:09 +03:00
Nicholas Ochiel
755cbd4436 Fix: glob for backup files. 2017-09-27 00:34:05 +03:00
exitium
a4ba9b339e Fix Lua comment delimiter insertion (see #1584) 2017-09-23 10:20:02 -04:00
Maxime Coste
a303cf5698 Merge remote-tracking branch 'lenormf/fix-perl' 2017-09-18 10:08:13 +09:00
Maxime Coste
9fea868e9e Merge remote-tracking branch 'Delapouite/css' 2017-09-18 10:02:43 +09:00
Maxime Coste
902724e558 c-family: auto close unions with a semicolon as well 2017-09-18 09:41:26 +09:00
Frank LENORMAND
1b11412796 rc perl: Don't highlight regex, fix string escapes
Highlighting perl regex patterns with regular expressions (with
highlighters) caused several misses that made most of the file
unreadable. This commit makes `perl.kak` not try to highlight
those patterns in the code, and also addresses issues with string
highlighting.
2017-09-14 14:16:58 +03:00
Maxime Coste
661047795c Merge remote-tracking branch 'lenormf/mercurial-support' 2017-09-11 21:11:27 +08:00
Frank LENORMAND
90961b0990 rc: Add support for MySQL, SQL Server and MS Access
Closes #1540
2017-09-09 11:54:24 +03:00
Frank LENORMAND
3cb159f056 rc: Add support for Mercurial
The script only highlights comments in commit messages, but it's a basis
to improve upon if more features are needed in a later time.
2017-09-08 14:44:55 +03:00
Delapouite
2001a9a087 css.kak: add hl to more common CSS length units 2017-09-06 12:08:49 +02:00
Maxime Coste
4c2ed2062a Merge remote-tracking branch 'lenormf/fix-html' 2017-08-31 11:22:09 +07:00
Philippe Daouadi
f56c5d687e Check for gocode, goimports and gogetdoc on go-tools loading 2017-08-30 10:19:13 +02:00
Frank LENORMAND
4f8211ecea rc base html: Highlight attributes with no value 2017-08-29 14:17:28 +03:00
Maxime Coste
716816966f Merge remote-tracking branch 'lenormf/fix-html' 2017-08-26 16:16:07 +07:00
Frank LENORMAND
eb0786e001 rc base html: Highlight the DOCTYPE and tag attributes 2017-08-26 11:28:56 +03:00
Maxime Coste
27ba416ddf Merge remote-tracking branch 'danr/Improve-Haskell-highlighter' 2017-08-26 10:48:21 +07:00
Maxime Coste
c8335a6515 Merge remote-tracking branch 'blastrock/go-tools-error' 2017-08-26 10:47:04 +07:00
Enrico Lumetti
59e5a4126d editorconfig.kak: fix awk typo 2017-08-23 21:11:46 +02:00
Dan Rosén
ef1a1e6bd3 Improve Haskell highlighter
Import keywords are put in keyword face instead of meta face.
This leaves room for pragmas and macros to be in the meta face.

Operator keywords are put in keyword face too.

Finally, expression keywords are put in face attribute.
2017-08-22 16:29:27 +02:00
Philippe Daouadi
9fafb1aba1 Show error when using go-jump and jq is not installed 2017-08-21 10:02:47 +02:00
Maxime Coste
420c6aca23 Change documentation directory towards $kak_runtime/doc 2017-08-03 15:00:02 +07:00
Tim Allen
e640e6d859 Consecutive markdown list bullets are not a valid list prefix.
Previously, if you opened a new line after an underlined heading (what
the CommonMark spec calls a "Setext heading") or inserted a newline into
a line that started with `**strong emphasis**` the Markdown autoindent
hook would assume the leading symbols were list bullets and paste them
at the beginning of the new line.

However, the CommonMark specification says that list bullets must be
followed by at least one horizontal whitespace character, so Setext
heading underlines and strong emphasis are not valid list bullets and
should not be matched by the autoindent pattern.

This commit changes the regex that selects the pastable prefix of the
previous line so that it must match either:

  - One or more `>` characters with optional whitespace between them
    (a blockquote prefix), optionally followed by a list bullet; or
  - An optional blockquote prefix and a list bullet

Since we don't strictly need either the blockquote prefix nor the list
bullet, we could concievably just make both optional... but for lines
without either, the regex would find a zero-length match, and for the
purposes of copy/paste Kakoune treats that as a one-character match.
Therefore, the regex is written to fail if neither pattern is found.
2017-08-01 20:36:40 +10:00
Maxime Coste
4dac61c864 Fix grep-next/prev-match not jumping correctly to first/last match
When used just after grepping, grep-next-match ended up jumping to
the second match, as `0g` is the same as `g`.

The fix itself is pretty ugly, a better one might be to distinguish
the `0` count from no count given, so that `0g` could fail with
"no such line" or similar.
2017-07-29 03:02:11 +07:00
Maxime Coste
6ab98f8bf8 Fix grep-jump on eol 2017-07-29 03:02:11 +07:00
Maxime Coste
337a38552b Fix sakura termcmd setup
Sakura `-e` is xterm compatible, so would require a `sh -c`, but it
also provides `-x` which takes a single argument, switch to that.
2017-07-25 10:26:52 +02:00
Maxime Coste
d1de9912c0 Merge remote-tracking branch 'lenormf/fix-git' into c++14 2017-07-19 17:20:18 +02:00
Maxime Coste
9c4448ac41 Remove echo -color support, superseeded by echo -markup
`echo -color Error "blah"` is the same as `echo -markup '{Error}blah'`
Fixes #1512
2017-07-19 17:18:52 +02:00
Frank LENORMAND
21847a5f85 rc man: Avoid undefined behavior on expr
Looking up the man page for `index` was failing on systems using
GNU/coreutils. The `:man` command matched whatever page it was given with
the `expr` utility. This tool behaves as expected when it follows strictly
the POSIX standard but the GNU implementation introduces additional commands
(including `index`), about which the standard states:

```
The use of string arguments length, substr, index, or match produces unspecified results.
```

As a result, parsing the man page number is now implemented with pure
shell expansions, to avoid triggering an undefined behavior when the topic
searched is one of the keywords above.
2017-07-17 21:24:41 +03:00