Commit Graph

8556 Commits

Author SHA1 Message Date
Piotr Chrominski
bfbf4d2080 Fix python docstring highlighter
Escaped ' or " at the end of a docstring no longer break highlighting.
2020-09-15 22:01:55 +02:00
Piotr Chrominski
ef10d07be8 Piotr Chrominski Copyright Waiver
I dedicate any and all copyright interest in this software to the
public domain.  I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors.  I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
2020-09-15 21:56:05 +02:00
Maxime Coste
ec3d7c3104 Add support for removing from options
`set -remove ...` will remove from the current option value, substracting
from int, removing elements from vectors and maps.
2020-09-09 21:00:30 +10: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
Michał Kruszewski
7d358e9ea1 Michał Kruszewski Copyright Waiver
I dedicate any and all copyright interest in this software to the
public domain.  I make this dedication for the benefit of the public at
large and to the detriment of my heirs and successors.  I intend this
dedication to be an overt act of relinquishment in perpetuity of all
present and future rights to this software under copyright law.
2020-09-06 07:46:59 +02:00
Maxime Coste
cfbff4e132 Merge remote-tracking branch 'kayhide/purescript-filetype' into master 2020-09-06 11:23:48 +10:00
Maxime Coste
c98d6c3062 Merge remote-tracking branch 'krobelus/initialize-shell-vars' into master 2020-09-06 10:52:07 +10:00
Maxime Coste
cf7955cdfb Merge remote-tracking branch 'lenormf/docstring-newline-format' into master 2020-09-06 10:50:51 +10:00
Maxime Coste
f84c550d30
Apply suggestions from code review
Co-authored-by: Screwtapello <thristian@gmail.com>
Co-authored-by: Johannes Altmanninger <aclopte@gmail.com>
2020-09-06 10:56:37 +10:00
Maxime Coste
22676647fe Merge remote-tracking branch 'krobelus/python-no-indent-after-comment' into master 2020-09-06 10:48:49 +10:00
Maxime Coste
97fd0c0510 Merge remote-tracking branch 'lenormf/repl-normalise' into master 2020-09-06 10:48:08 +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
Hideaki Kawai
c87e41c195 Hideaki Kawai Copyright Waiver
I dedicate any and all copyright interest in this software to the
  public domain.  I make this dedication for the benefit of the public at
  large and to the detriment of my heirs and successors.  I intend this
  dedication to be an overt act of relinquishment in perpetuity of all
  present and future rights to this software under copyright law.
2020-09-04 11:27:06 +09:00
Jiri Konecny
b77e5f0364
Update spec file to newer version 2020-09-02 14:57:59 +02:00
Frank LENORMAND
0cd706254a rc clang grep: Make docstrings more readable 2020-09-02 11:57:34 +03:00
Johannes Altmanninger
407c72d90a Clear unwanted environment variable
This adds two things I forgot in
9a7d8df4 (Avoid accidentally using environment variables in sh scopes)

Mea culpa, the problem was that I was skipping matches with "filetype"
because that's usually just a hook parameter as in "WinSetOption filetype=.."

	rg --pcre2 '\b(?!filetype=)\w+=' rc/

So I missed these two cases where a shell variable is actually called "filetype".

The one in git.kak was not a problem because show_git_cmd_output is only
ever called with sane inputs.  However, file.kak does use the filetype
environment variable for many mime types, for example:

	filetype=somefiletype\''; echo -debug injection; nop '\' kak /dev/null

Will run the echo since /dev/null has mime type "inode/chardevice"
2020-09-02 06:54:19 +02: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
Maxime Coste
e0d2602e6a Kakoune 2020.09.01 2020-09-01 20:37:20 +10:00
Frank LENORMAND
87f9be6723 rc repl: Normalise REPL commands
It's unclear what the `send-text` alias does at first glance,
so prefixing it with "repl-" both fixes that and helps make it
discoverable via the command prompt's fuzzy matcher.

The `repl` alias also seems too generic a name, the "-new" suffix
should hopefully give a hint that it creates a new window.
2020-09-01 13:34:52 +03: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
Maxime Coste
6c85c0cb29 Use alpha blending for gruvbox selections 2020-08-30 12:14:57 +10:00
Maxime Coste
4793a4e8ce Allow multiple arguments in tmux repl
Fixes #3680
2020-08-30 10:53:03 +10:00
Maxime Coste
1fd1a0052d Trigger InsertCompletionHide hook when switching to explicit completion
Previously we would just bypass that hook making it impossible to
act on the inserted text when triggering an explicit completion after
inserting text from the previous completer.
2020-08-30 10:35:15 +10:00
Maxime Coste
f56c1107e0 Fix face attributes to string conversion with F shorthand
Previously a `F` attribute would end up being converted to Ffga which
is confusing as F *means* fga.
2020-08-30 10:12:21 +10: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
Maxime Coste
ca195ffd7b Merge branch 'docs' of http://github.com/migueldvb/kakoune 2020-08-23 14:01:01 +10:00
Maxime Coste
78a7c5fe9b Merge remote-tracking branch 'alexherbo2/kakrc' 2020-08-23 13:59:41 +10:00
Maxime Coste
7f5959d295 Merge branch 'grep' of http://github.com/vbauerster/kakoune 2020-08-23 13:57:40 +10:00
Alex Leferry 2
3f8d3dcf86 kakrc: Add trigger-user-hook keyword 2020-08-22 23:16:46 +02:00
Maxime Coste
01daf7c2e7 Merge remote-tracking branch 'lenormf/fix-faq' 2020-08-20 19:24:35 +10:00
Maxime Coste
033a28dca2 Merge branch 'patch-3' of https://github.com/icefoxen/kakoune 2020-08-20 19:02:34 +10:00
Maxime Coste
0b3b912ffc Merge remote-tracking branch 'SolitudeSF/nim' 2020-08-20 19:00:36 +10:00
Maxime Coste
1020438462 Clear inserted_ranges after updating insert completions candidates
They were getting out-of-sync with the stored timestamp, leading
to invalid ranges being computed and crashes.

Fixes #3666
Fixes #3571
2020-08-18 20:35:48 +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
Maxime Coste
63e7d443c4 Merge branch '3651-elixir' of http://github.com/Parasrah/kakoune 2020-08-17 19:58:32 +10:00
Maxime Coste
40aa687601 Do not fork in daemon mode
Leave that to the shell or external service management tools

Fixes #3618
2020-08-17 19:56:00 +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
Vladimir Bauer
649e252f75 bring *grep* buffer to front in context of toolsclient 2020-08-14 00:52:22 +05: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