Commit Graph

2612 Commits

Author SHA1 Message Date
Maxime Coste
253dcde976 Merge remote-tracking branch 'TheDaemoness/patch-1' 2021-09-04 09:38:01 +10:00
ioh
b739ca4ca6 Fix unterminated string in rc/filetype/php.kak 2021-09-02 14:54:47 -07:00
TheDaemoness
330515154d Stop editorconfig.kak from setting aligntab 2021-08-29 11:55:33 -07:00
Maxime Coste
13eb5a677f Merge remote-tracking branch 'StatPal/master' into HEAD 2021-08-28 13:55:11 +10:00
Maxime Coste
b4c994c4ea Merge remote-tracking branch 'listentolist/x11-repl' into HEAD 2021-08-28 13:54:38 +10:00
notquiteamonad
b9c02d48ab
Fix regex for nix paths 2021-08-23 11:06:14 +01:00
Subrata
25ffbacb70 In the tmux-repl, it tackles the situations where there is already some other tmux pane open
and we want to send text (or do other works) in that specific pane.
2021-08-22 09:57:09 -05:00
Tilman List
0d74268451 add module dtach-repl 2021-08-21 18:42:29 +02:00
Maxime Coste
94388dc51e Merge remote-tracking branch 'alexherbo2/fix-typos' 2021-08-17 08:48:47 +10:00
Maxime Coste
e63ab10424 Merge remote-tracking branch 'gustavo-hms/master' 2021-08-17 08:43:25 +10:00
Maxime Coste
3a6ab49d5c Merge remote-tracking branch 'kkga/gdscript.kak' 2021-08-17 09:41:10 +10:00
Maxime Coste
d4d5a2f32c Merge http://github.com/mujo-hash/kakoune 2021-08-17 08:29:24 +10:00
Maxime Coste
74ae6469e3 Merge remote-tracking branch 'krobelus/fish-snowflakes' 2021-08-17 08:27:17 +10:00
Johannes Altmanninger
89229bab39 Teach :comment-line about the fennel language
Fixes #4292
2021-08-09 22:45:57 +02:00
Johannes Altmanninger
faba50d528 rc fish: fix keyword highlighting false positive
"command" is a built-in, but these are not:

	$command
	some-command
	command-some
2021-08-09 22:45:52 +02:00
ioh
4932aad623 Add gentoo linux ebuild filetype detection. 2021-08-06 11:30:06 -07:00
Maxime Coste
580869fd49 Merge remote-tracking branch 'StatPal/master' into HEAD 2021-08-05 11:00:30 +10:00
Hugo Musso Gualandi
4f0f3eefd0 Remove a duplicate highligher rule for _G/_ENV 2021-08-04 13:24:16 -03:00
Hugo Musso Gualandi
dc88220e4a Recognize and/or/not in a separate rule
This is the usual style
2021-08-04 13:24:16 -03:00
Hugo Musso Gualandi
be09ff4680 lua.kak: highlight and/or/not as operators 2021-08-04 13:24:16 -03:00
Hugo Musso Gualandi
d3d3c77ab9 lua.kak: highlight Lua 5.4 variable attributes 2021-08-04 13:24:16 -03:00
Hugo Musso Gualandi
3621a98170 lua.kak: Treat "local" as a normal keyword 2021-08-04 13:24:16 -03:00
Hugo Musso Gualandi
ceb3f55f3c lua.kak: the builtin is called _ENV, not _E
The Lua highlighting was highlighing `_E` instead of `_ENV`
2021-08-04 13:24:16 -03:00
Hugo Musso Gualandi
43d9f59fda lua.kak: keyword should have higher priority than function call
Currently, the "return" in `return {}` is highlighted as a function call, instead of being highlighted as a keyword
2021-08-04 13:24:16 -03:00
Subrata
8d27d8d581 R file highliight change. Merged into single highlighter for math, summary and complex functions. 2021-07-30 11:29:29 -05:00
Maxime Coste
52087a506d Merge remote-tracking branch 'hugomg/rockspec-highlighting' 2021-07-30 07:37:36 +10:00
Maxime Coste
8a7f8f67be Merge remote-tracking branch 'hugomg/lua-comment-insert-indent' 2021-07-30 07:37:01 +10:00
Hugo Musso Gualandi
52f7999705 Recognize ".rockspec" file extension as a Lua file
rockspec files are used by [Luarocks](https://luarocks.org/), the
most prominent package manager for Lua. Despite the different file
extension, these files are actually Lua files and should be syntax
highlighted as such.

For what it is worth, Neovim also does the same thing that I am doing in
this commit. They recognize both ".lua" and ".rockspec" as being Lua
files (and no other extensions, as far as I know).
2021-07-26 17:41:00 -03:00
Subrata
a466f2f6d0 R file highlights. Added :: etc, added new functions from base::Ops and method::Ops, tried to correct inconsistency with %any% case. Added indexing and assign operator. 2021-07-22 23:11:40 -05:00
Maxime Coste
9cf79bfd1e Merge remote-tracking branch 'listentolist/pascal-filetype' 2021-07-20 22:40:06 +10:00
Tilman List
807be115b2 make pascal filetype compatible with bash
When using bash, the whitespaces before the delimiting identifier `EOF`
cause an error as well as a missing `\` before `$`.
2021-07-17 20:01:12 +02:00
Robin Stumm
507e16ff23 comment.kak: add cue 2021-07-16 17:55:10 +02:00
Hugo Musso Gualandi
f440a1c109 Lua: insert comment prefix *after* the indent
This fixes a bug in how the Lua scripts handle new comment lines.
Currently if we have a comment that is indented, when we add a new line
it inserts the `--` prefix before the automatic indentation.

```
  --ABC
--  XYZ
```

After the fix, it correctly inserts the comment prefix after the
indentation:

```
  --ABC
  --XYZ
```

The solution I used is inspired by the ruby.kak script.
2021-07-13 13:28:30 -03:00
Maxime Coste
911edf6ea3 Merge branch 'patch-1' of http://github.com/catdevnull/kakoune 2021-07-12 10:16:01 +10:00
throwawayaccount12345-1
719b23c54f
Fix #3957
If the session wasn't valid anymore by the time the linter finishes,
writing to "$dir"/fifo would hang forever leaving temporary files in
/tmp/kak-lint.XXX and the process alive. This commit fixes that by
not writing to the fifo if the session was not valid.

throwawayaccount12345-1 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.
2021-07-09 22:18:25 -03:00
Nulo
b13e0598e2
Spawn a shell when using xfce4-terminal
Previously, commands like repl broke because of this
2021-07-08 01:44:17 +00:00
Maxime Coste
2b68b6737c Update spell.kak to use command/response fifo 2021-07-07 19:25:06 +10:00
Maxime Coste
699050d2d6 Merge remote-tracking branch 'alexherbo2/add-missing-eruby-indent-group' 2021-07-07 19:15:28 +10:00
Maxime Coste
8c2ee492fe Merge remote-tracking branch 'dmerejkowsky/dart-extension-keyword' 2021-07-07 19:13:29 +10:00
Maxime Coste
29b6f06577 Merge remote-tracking branch 'maximbaz/spell-ignore-minus' 2021-07-07 19:13:02 +10:00
Maxime Coste
5b7d544299 Merge remote-tracking branch 'Frojdholm/markdown-codeblock-highlighting' 2021-07-07 19:09:05 +10:00
Hampus Fröjdholm
e0731b70cf Improve highlighting of markdown lists
Removes the inline code highlighter for lists to improve
readability in indented lists.
2021-07-06 13:32:23 +02:00
Maxim Baz
0289131c24
spell.kak: ignore another undocumented control char 2021-07-01 21:52:59 +02:00
Dimitri Merejkowsky
0c1e89a010 dart: add extension to the list of keywords 2021-07-01 16:03:30 +02:00
Maxime Coste
4fd0fc3d80 Merge remote-tracking branch 'alexherbo2/fix-windowing-detection-priority' 2021-06-26 12:54:24 +10:00
Hristo Staykov
69c9d00569
rc swift: Add open and internal keywords 2021-06-24 14:29:10 +03:00
Taupiqueur
3fe4367ce0 Fix windowing detection priority 2021-06-21 16:05:09 +02:00
Taupiqueur
59d39c60d7 Add missing eRuby indent group 2021-06-15 14:30:35 +02:00
Maxime Coste
8fdda6d980 Merge remote-tracking branch 'greenfork/improve-elixir-hooks' 2021-06-15 20:48:06 +10:00
Maxime Coste
682426bf7b Merge remote-tracking branch 'greenfork/improve-ruby-hooks' 2021-06-15 20:47:26 +10:00
Maxime Coste
a1a924f9a5 Merge remote-tracking branch 'ktiy/zig' 2021-06-15 20:45:43 +10:00
Maxime Coste
3497e05fce Merge remote-tracking branch 'gkrrr/master' 2021-06-15 20:44:21 +10:00
Taupiqueur
ad1dc79789 Fix typos 2021-06-13 04:12:03 +02:00
c piapiac
bdd7a956f3
rc zig: auto-insert multiline string prefix on newline 2021-06-12 03:38:27 -07:00
c piapiac
73910efce8
rc zig: 0.8.0 language changes
* adds nosuspend keyword
* adds @extern builtin
* removes @TagType builtin
2021-06-12 03:26:32 -07:00
Gadzhi Kharkharov
4f51130fc9 rc: add gdscript.kak 2021-06-06 14:08:13 +03:00
Dmitry Matveyev
2f22fef5bd Rename exec->execute-keys for consistency 2021-06-06 14:29:51 +06:00
Dmitry Matveyev
a65501a1d9 Rename exec->execute-keys for consistency 2021-06-06 14:28:28 +06:00
Dmitry Matveyev
0b1654b0cf Better comment inserting tests and fix implementation 2021-06-06 14:13:34 +06:00
Dmitry Matveyev
167cffb3da Better comment inserting tests and fix implementation 2021-06-06 14:08:40 +06:00
Dmitry Matveyev
8867e40929 Fix elixir copying comment # sign
Elixir uses # for comments, not --.
Implementation is copied from Nim.
2021-06-06 01:32:56 +06:00
Dmitry Matveyev
0f49e7375e Add auto-inserting of "end" keyword to Elixir
fixup! Add auto-inserting of "end" keyword to Elixir
2021-06-06 01:32:53 +06:00
Dmitry Matveyev
fcc04384d1 Fix Ruby <ret> mid-comment
Implementation is copied from Nim.
2021-06-06 00:38:36 +06:00
Dmitry Matveyev
02e625e8fb Remove electric behavior for end keyword
Correctly indentint on "end" keyword seems very hard,
it is simpler to remove it. And we already insert "end"
in ruby-insert-on-new-line hook, so the removal shouldn't
hurt too much.
2021-06-06 00:30:50 +06:00
Girish Kumar
95d224a21d fix: iterm focus client from different tab or window
currently focus client doesn't work if target pane of the client is in different tab or window from current one.
select window, select tab should be triggered in order to select a pane on a currently not focused tab or window.
2021-06-02 12:05:03 +05:30
Răzvan C. Rădulescu
c24cbebe47 Fix purescript comments and keywords 2021-05-30 15:39:58 +03:00
Maxime Coste
d758bbf09b Merge remote-tracking branch 'yerlaser/patch-1' 2021-05-28 20:55:25 +10:00
Maxime Coste
b37a282845 Merge remote-tracking branch 'yerlaser/patch-2' 2021-05-28 20:53:18 +10:00
raingloom
51c9811c7a add sps and sls file extensions for scheme
These extensions are the ones used automatically by the Akku package
manager when generating a new package, so they should probably be
added.
2021-05-28 20:51:06 +10:00
Taupiqueur
5ba51b377a Fix eRuby detection 2021-05-24 13:18:50 +02:00
Yerlan
48a07888de
Fixing strings in Dart
1. Deleted back-tick strings which are not a valid Dart syntax
2. Added string interpolation for ${}
3. NOT adding string interpolation for $var as this is considered a bad practice
2021-05-19 22:44:27 +02:00
Yerlan
a390a6f356
Highlight extra chars in literal
This commit adds highlighting characters other than the first with red color helping to get immediate feedback of the syntax error.
This helps those who come from languagles like JS where single quotes also denote multi-character strings.
2021-05-18 20:51:52 +02:00
Maxime Coste
38f85706ff Merge remote-tracking branch 'danr/jedi' 2021-05-18 21:06:28 +10:00
Maxime Coste
67e5ecc816 Merge branch 'perl_allow_strref' of http://github.com/fennewald/kakoune 2021-05-18 21:05:35 +10:00
Maxime Coste
db24a78e2c Merge remote-tracking branch 'dead10ck/fix-rust-solarized' 2021-05-18 21:02:10 +10:00
Maxime Coste
b9c02091a7 Merge remote-tracking branch 'hristost/hristost/swift-extension-keyword' 2021-05-18 21:01:14 +10:00
Yerlan
0dcbf52216
Java: add highlighting for char literal 2021-05-17 21:15:30 +02:00
Yerlan
c483d65594
Simplifying regex
As suggested by @krobelus.
However, I figured that highlighting characters as strings is not correct as they are more like values.
2021-05-17 20:54:29 +02:00
Yerlan
c7f7e01bba
Kotlin: string interpolation and character literal
Adding highlighting for string interpolation inside double-quoted strings and character literals inside single-quotes.

Avoiding string interpolation in the form of $var as this is considered bad practice.
2021-05-17 20:45:48 +02:00
fennewald
eb205cf3c2 Allowed for references of strings 2021-05-17 14:30:33 -04:00
Yerlan
dff23f2f3f
Kotlin: Add highlight for character literals 2021-05-17 18:44:10 +02:00
hss
92800c07ef rc swift: highlight "extension" and "fileprivate" keywords 2021-05-13 23:44:22 -04:00
Dan Rosén
6198ebe37d Fix jedi off-by-one and refactor jedi
The off-by-one was introduced by cd9b1e66 which changed `column-1` to `column`.

The refactoring solves some esoteric quoting errors: I think cases like
unbalanced braces in the bufname and client were not supported.
2021-05-04 20:57:13 +02:00
Skyler Hawthorne
fb04102fe3 add TODO comment highlighting 2021-05-02 20:38:42 -04:00
Markus F.X.J. Oberhumer
c4c093d764 doc: small UX improvements.
Place the cursor at the beginning of the file (and not at
the end of the first line) and improve error message in
case of failure.
2021-05-02 11:27:48 +02:00
Maxime Coste
7090be59df Merge remote-tracking branch 'occivink/c-family-quote-variable' 2021-05-01 14:42:03 +10:00
Skyler Hawthorne
a25ef2bd6d fix rust pub highlight 2021-05-01 00:35:56 -04:00
Olivier Perret
0bcbcef7dc c-family.kak: properly quote shell variable
This will fail with filenames with spaces otherwise
2021-04-30 11:53:18 +02:00
Michał Kruszewski
b8aae26586 [VHDL] Add 'character' to types highlight. 2021-04-29 13:38:15 +02:00
Maxime Coste
f09844c7e5 Merge remote-tracking branch 'dead10ck/fix-rust-solarized' 2021-04-29 21:04:39 +10:00
Maxime Coste
5467a8eada Merge remote-tracking branch 'yerlaser/master' 2021-04-29 21:04:04 +10:00
Skyler Hawthorne
488798d977 improve colors for rust/solarized
* bring colors more aligned with upstream solarized implementations
  (e.g. vim, emacs)
* tweak rust syntax
    * add more details, like operators, highlighting certain traits and
      types from std, etc
    * remove certain highlighters, like user types. This has the effect
      of just highlighting almost the whole code base one color, and
      wasn't really correct either. CamelCase for types is only convention
2021-04-28 21:27:43 -04:00
Yerlan
0f99fb53bc
Removing more kotlin_ prefix
Done. Please review again :)
2021-04-28 19:07:32 +02:00
Taupiqueur
f65fbd1a2d Ruby: Add require_relative keyword 2021-04-28 14:25:51 +02:00
Maxime Coste
3b147bca0a Merge branch 'patch-1' of https://github.com/dzamo/kakoune 2021-04-28 08:14:52 +10:00
Yerlan
381cc1dec3
Addressing comments by mawww
Done. Thanks!
2021-04-27 19:52:15 +02:00
dzamo
cd9b1e66f0
Update jedi.kak
I needed this patch accommodating minor Jedi API changes to get Jedi completion working.  I've got Jedi 0.18.0.
2021-04-27 17:42:29 +02:00
Taupiqueur
afc30a8940 Markdown: Add Crystal
https://crystal-lang.org
2021-04-26 22:06:48 +02:00
Yerlan
d7d160757a
Kotlin.kak new attempt
Updates to address these comments:
"I still dont quite see why we need to introduce all those options, especially with names that dont say anything about kotlin. I would expect a single kotlin_static_words option to be enough.
Similarly, a single highlighter should be enough here."
2021-04-26 19:29:22 +02:00
Markus F.X.J. Oberhumer
2b3e5bc972 rc doc: do not require arguments for ":doc" or ":help"
When no arguments are given simply run ":doc doc".
2021-04-26 00:13:01 +02:00
Maxime Coste
40270a9c8b Merge remote-tracking branch 'Eluminae/master' 2021-04-25 20:23:10 +10:00
eli
453cb7f367 Fix issue with tmux.kak setting empty TMPDIR variable 2021-04-24 17:59:13 +01:00
Gustavo Henrique Montesião de Sousa
2454cf3345 Add basic support for the Janet language 2021-04-23 14:49:24 -03:00
Maxime Coste
e973991c49 Merge remote-tracking branch 'SolitudeSF/suffix' 2021-04-18 17:07:30 +10:00
Maxime Coste
732ee04c84 Merge branch 'better_headerguards' of http://github.com/fennewald/kakoune 2021-04-18 17:04:40 +10:00
Johannes Altmanninger
0a9c90fecf rc: use a separate *-insert hook to auto-insert comments
This should cover all filetypes that already auto-insert comments,
except for rust.kak, which is left for a follow-up.

Most of these are straightforward, some explanation for special cases:

rc/filetype/zig.kak rc/filetype/cue.kak

  These indent hooks used their own logic to indent after "{" only if
  no comment was inserted. Replace this logic by checking if a comment
  was inserted. This works because these "*-insert" hooks are run
  before their respective "*-indent" hooks.
 
rc/filetype/php.kak

  This also has some logic to insert "*" after "/*" lines. Basic
  usage seems to work still. In future this should borrow from the
  c-family one, which works a bit better.
2021-04-17 20:56:23 +02:00
Johannes Altmanninger
0264c84742 rc: when auto-inserting comments, include trailing spaces from previous line
We already do this in most places.
2021-04-17 20:56:23 +02:00
Johannes Altmanninger
eb3beff959 rc: make insertion hooks more consistent 2021-04-17 20:56:23 +02:00
Johannes Altmanninger
3ab2b98ec3 rc: remove spurious tabs
This makes it easier to be consistent.

Also replace "<<-EOF" by "<<EOF", since the former only does trims
tabs, not spaces.
2021-04-17 20:56:23 +02:00
Johannes Altmanninger
787ff5d002 rc sass: highlight and copy full comments, and support CSS comments 2021-04-17 20:56:23 +02:00
Johannes Altmanninger
9fadda0df4 rc nim: follow our convention 2021-04-17 20:56:23 +02:00
Johannes Altmanninger
997059fed1 rc javascript: fix line comment prefix 2021-04-17 20:56:23 +02:00
Maxime Coste
5696ed02e4 Fix invalid insertion of ; after } closing some functions
Function taking a parameter with a struct tag on the last line
before the opening { were wrongly treated as structs. Add some
additional regex logic to try to catch those cases.

Fixes #4136
2021-04-08 20:14:02 +10:00
Maxime Coste
abf68320fa Merge remote-tracking branch 'c7skasku/d-nested-block-comments' 2021-04-07 20:08:21 +10:00
Cormac Stephenson
710f121a54 d.kak: highlight nested block comments recursively
https://dlang.org/spec/lex.html#comment
2021-04-06 13:45:04 +01:00
SeerLite
3397737b16 rc markdown: Fix code fence regex
The invalid regex `)\b` currently matches anything, so this didn't cause
any errors.
It is still invalid though, so I fixed it by moving the `\b` to the end
of the non-raw_attribute language name (like the original regex). The
raw_attribute one shouldn't need this because the `}` marks the end of
the language name anyway.

Fixes #4025
2021-04-01 22:53:44 -03:00
SeerLite
e84dd80244 rc markdown: Fix trailing whitespace removal
Modified the test cases accordingly too
2021-04-01 22:27:30 -03:00
SeerLite
5c03e2bd54 rc markdown: Add -insert hook 2021-04-01 22:22:08 -03:00
Carson Riker
b98ec3836b Stripped directory prefix from c-family autogenerated header guards 2021-03-31 17:33:04 -04:00
Maxime Coste
212242cc60 Slight cleanup of the c-family highlighters
* Extract raw strings to the C++ specific section
* Merge different documetnation comment formats in single regions
2021-03-31 21:24:45 +11:00
SolitudeSF
fe66b8a390
rc nim: update suffix spec 2021-03-24 17:11:26 +02:00
Maxime Coste
c507863a00 Merge remote-tracking branch 'Eluminae/wayland' 2021-03-23 21:50:27 +11:00
Maxime Coste
d8fbe3105d Merge branch 'lua-auto-indent-improvement' of http://github.com/cipharius/kakoune 2021-03-23 19:57:46 +11:00
cipharius
78a0b5e4c7 Improves Lua auto indent and end insertion
Current solution makes it difficult to use common Lua practices of having one-liner if statements and using anonymous functions.
New solution prevents auto-indentation and end insertion, if the previous line contains an "end" keyword.
It does not attempt to match each structure with corresponding end, since using multiple end keywords in single line is a very rare occurance in Lua.
2021-03-23 10:36:05 +02:00
Reed Wade
feab20260a
Permit usage on wayland environments.
Some wayland wm will not setup a DISPLAY environment variable. Kakoune
should allow x11 windowing toolkit for those wm also.
2021-03-21 13:41:40 +01:00
Lennard Hofmann
8d24041c1a rc markdown: Fix HTML highlighting in inline code
Because the HTML highlighter was higher up in the hierarchy than the code
highlighter, it took precedence. I fixed it by making it an inline region.
Using my new knowledge of "inline" I was able to remove one line of code.

Fixes #4091
2021-03-21 09:52:00 +01:00
SeerLite
c0e8dceb5d js: Highlight special variables at start of file 2021-03-17 23:59:05 -03:00
Maxime Coste
7f8f748d06 Merge remote-tracking branch 'basbebe/kitty_command' 2021-03-11 20:41:30 +11:00
basbebe
1183e716bc
make kitty repl command consistent with other kitty commands 2021-03-11 10:40:14 +01:00
basbebe
8d5d0d7d90
use kitty launch command, make commands consistent
`new-window` is a legacy command (see https://github.com/kovidgoyal/kitty/issues/2708).
`KITTY_WINDOW_ID` should be set for any kitty window anyways.
2021-03-11 10:36:30 +01:00
Maxime Coste
c12d1c16b7 Merge remote-tracking branch 'hristost/hristost/swift-multiline-strings' 2021-03-11 08:02:53 +11:00
Maxime Coste
835eaf5495 Merge remote-tracking branch 'pickfire/rust-indent' 2021-03-11 07:51:08 +11:00
hss
566143ac6d rc swift: highlight multiline strings 2021-03-07 21:26:31 -05:00
Ivan Tham
ebe7f82bb2 Support rust visibility for enum and others 2021-03-07 14:22:43 +08:00
Ivan Tham
8df5621334 Support dedent with rust fn qualifiers 2021-03-07 14:12:01 +08:00
Maxime Coste
60c44e1623 Merge remote-tracking branch 'andreyorst/fennel-filetype' 2021-03-02 21:13:25 +11:00
Andrey Listopadov
877cc9cf88 add fennel filetype 2021-03-01 19:51:36 +03:00
Maxime Coste
bdee3abd88 Match on kitty window id when available
This ensures new window are created in the same os window as the
current client instead of the default one.

Closes #4009
2021-03-01 08:47:09 +11:00
Maxime Coste
ca5e6f835c Merge remote-tracking branch 'gf3/graphql-syntax' 2021-03-01 08:27:36 +11:00
Maxime Coste
a0f567f5e6 Merge remote-tracking branch 'm-kru/troff_comment' 2021-03-01 08:26:02 +11:00
Isa Cichon
0fc91b9576 Fix usages of ModeChange hook
hook param always begins with either push: or pop:

Fixes #4078
2021-02-28 21:07:21 +01:00
Michał Kruszewski
b7def7350c Add comment highlighter for troff files.
Add comment highlighter for troff files.
Also highlight the end of the macro definition.
2021-02-25 20:18:10 +01:00
Maxime Coste
726b96da69 Merge remote-tracking branch 'forbesmyester/master' 2021-02-25 20:24:54 +11:00
Maxime Coste
70548ecc14 Merge remote-tracking branch 'rwpeterson/juliahl' 2021-02-25 20:23:10 +11:00
Maxime Coste
84211d2b60 Merge branch 'add-comment-chars-for-scheme' of https://github.com/Calum-J-I/kakoune 2021-02-25 20:22:02 +11:00
Maxime Coste
475e1ccf28 Merge commit 'refs/pull/4047/head' of https://github.com/mawww/kakoune 2021-02-25 20:20:25 +11:00
Bob Peterson
c457c2b1c1 rc julia: add multiline comments 2021-02-21 19:20:03 +01:00
Calum
3e456ae34e use lisp comments for scheme 2021-02-22 01:21:04 +13:00
Ivan Tham
4e594e034a Dedent rust await function with ? 2021-02-17 01:17:17 +08:00
Ivan Tham
049591f6b4 Dedent rust empty match 2021-02-17 01:17:14 +08:00
Maxime Coste
dea44e4964 Merge remote-tracking branch 'lenormf/fix-spell' 2021-02-11 20:40:50 +11:00
Maxime Coste
fb30d3751c Merge remote-tracking branch 'krobelus/yaml-comment' 2021-02-11 20:30:34 +11:00
Maxime Coste
1440db3f89 Merge remote-tracking branch 'krobelus/rest-leaked-code-highlighting' 2021-02-11 20:29:43 +11:00
Johannes Altmanninger
7ddaf071c7 rc java: highlight byte/short/long primitive types 2021-02-10 21:09:30 +01:00
Johannes Altmanninger
41059b3f0c rc yaml: "#" inside a word is not a comment 2021-02-10 21:09:25 +01:00
Johannes Altmanninger
cfae4dda91 rc restructuredtext: don't highlight first character of next line as code
Reproduce by creating a *.rst buffer with the text below. The "N" used to
be highlighted as code.

::

    code

Not code
2021-02-10 21:09:16 +01:00
Matthew Forrester
e1db59fb8d rc repl x11: do not send new line
The X11 repl is unique in that it sends the selection (or parameter) with a
new line appended.

This patch removes that new line and thus, brings it into line with the tmux
and kitty versions.
2021-02-05 06:04:16 +00:00
Samadi van Koten
057c532ba8 Fix editorconfig incorrectly matching properties with prefixes 2021-02-04 08:40:22 +00:00
Maxime Coste
5eb2be3e6b Merge remote-tracking branch 'kayhide/kitty-listen-on' 2021-01-28 21:07:16 +11:00
Maxime Coste
8738be1252 Merge branch 'master' of http://github.com/Kabouik/kakoune 2021-01-28 21:06:14 +11:00
Maxime Coste
69f1c8cae5 Merge remote-tracking branch 'Ordoviz/markdown' 2021-01-28 21:02:47 +11:00
Maxime Coste
b8f1df6458 Fix man for systems lacking the col command
At least Alpine linux with mandoc does not have the col command,
as it is easy to emulate with sed, fallback onto it when it does
not exist.
2021-01-26 09:28:24 +11:00
Hideaki Kawai
52222a52e4 Support KITTY_LISTEN_ON on kitty-terminal-tab and kitty-focus 2021-01-22 09:19:35 +09:00
Hideaki Kawai
38b914162a
Update rc/windowing/kitty.kak
Co-authored-by: Screwtapello <thristian@gmail.com>
2021-01-22 08:41:41 +09:00
Mathieu Laparie
0a978865f4 Add comment symbols for r filetypes, remove rmd for now 2021-01-21 15:35:35 +01:00
Mathieu Laparie
b74dfa1e74 Add R and Rmd options for comment.kak 2021-01-21 15:12:41 +01:00
Hideaki Kawai
0917191118 Respect KITTY_LISTEN_ON when launching terminal 2021-01-21 18:58:48 +09:00
Lennard Hofmann
61fabee03f rc markdown: Highlight HTML tags 2021-01-19 15:42:37 +01:00
Frank LENORMAND
efb6fca068 rc spell: Remove :spell-replace default value
This commit removes the default prompt value from the `spell-replace`
command.

Currently, running the command after selecting a misspelled word
might not allow the editor to propose alternative spellings because
it completes upon whatever is inserted into the prompt. If the words
returned by `aspell` are too different from the currently misspelled
word, no candidates are shown.

For example, selecting “unanymously” and running `:spell-replace`
will not show any candidates under the current implementation (the
‘y’ probably trips the fuzzy-matcher).

The user develops a habit of clearing the prompt every time, because
that's the only way to make sure all suggestions from `aspell` are
visible, so the editor might as well not have any default value for
`:spell-replace`.
2021-01-19 16:38:23 +03:00
Maxime Coste
3bb576edde Merge branch 'patch-1' of http://github.com/jhalmen/kakoune 2021-01-19 20:56:33 +11:00
Maxime Coste
52ab656fc1 Merge remote-tracking branch 'forbesmyester/master' 2021-01-19 20:56:14 +11:00
Maxime Coste
2578759252 Merge remote-tracking branch 'chambln/pfm' 2021-01-19 20:55:03 +11:00
Maxime Coste
86997bfa09 Merge remote-tracking branch 'SeerLite/js-multiline-division' 2021-01-19 20:54:32 +11:00
Maxime Coste
5b7048dc34 Merge remote-tracking branch 'ifreund/meson-fix' 2021-01-19 20:54:25 +11:00
Isaac Freund
033b55c3ac
zig.kak: fix highlighting of empty doc comment
If a line contains three slashes directly followed by a new line, the
next line is also erroneously highlighted as a doc comment currently.
Using a lookahead instead fixes this.
2021-01-18 00:44:32 +01:00
Matthew Forrester
c9d50660f1 rc repl x11: allow arg for repl send & refocus kak
tmux-send-text allows sending an argument, when supplied the argument
will be sent to the REPL instead of the current selection.

tmux-send-text also keeps kak focussed, which does not happen in the x11
variant as it uses xdotool to switch window.

this patch allows:

 * Passing an argument to x11-send-text, so that value will be sent
 instead of the current selection.
 * We capture the window id of the current (presumably kak window)
 before we use xdotool to switch window. We can therefore switch back to
 kak afterwards (which we do)
2021-01-16 15:57:32 +00:00
Gianni Chiappetta
fe3f8d2271
chore(rc): support nested field strings in graphql 2021-01-14 15:46:50 -05:00
Gianni Chiappetta
69a152d680
chore(rc): change graphql block delimiters to support better regexs 2021-01-14 11:40:17 -05:00
Gianni Chiappetta
ec80d83e71
feat(rc): improve graphql field arguments highlighter 2021-01-13 21:37:08 -05:00
Gianni Chiappetta
d8f65bd0ec
feat(rc): match .graphqls file extension as graphql filetype 2021-01-13 21:31:29 -05:00
Gianni Chiappetta
1c639f7810
feat(rc): improve graphql syntax highlighters 2021-01-13 21:29:03 -05:00
Isaac Freund
233b990275
meson: improve highlighting, add static words
Now all functions are highlighted and builtins are highlighted
with their own face.
2021-01-13 15:44:38 +01:00
jhalmen
33f44f6abc
editorconfig: fix trim_trailing_whitespace
also trim all superfluous newlines at end-of-file if `trim_trailing_whitespace` is set
2021-01-12 15:45:39 +01:00
SeerLite
569267b18d rc js: Correctly highlight multiline division. 2021-01-11 13:06:38 -03:00
Gregory Chamberlain
a49b1c4996 Adjust markdown code fences filetype regex
This highlighter (line 50 of markdown.kak) looks for the filetype
specified by the author at the top of the code fence, e.g.

``` python
print("hello")
```

and highlights the code within using Kakoune's relevant highlighter --
in this case Python.

Some flavours of markdown use curly braces and other characters in the
first line such as the following:

``` {=python}
print("hello")
```

Previously Kakoune recognised `{=python}` but not `{.python}`.  The latter
is Pandoc's flavour of markdown.  This patch adjusts the regex patterns
to recognise the dot notation as well.
2021-01-08 10:24:04 +00:00
Lennard Hofmann
f65d5210f8 rc markdown: Prevent underscores in URLs cause italic highlighting
Create regions to achieve that. Add support for inline links.
2021-01-05 18:51:37 +01:00
Maxime Coste
183bb660b7 Merge branch 'patch-5' of http://github.com/co-dh/kakoune 2021-01-04 09:44:58 +11:00
Maxime Coste
083fcff9fa Merge remote-tracking branch 'harryoooooooooo/tmux-focus' 2021-01-03 11:35:47 +11:00
Maxime Coste
c8378eb7f2 Merge remote-tracking branch 'Ordoviz/pascal' 2021-01-03 11:28:11 +11:00
Hao Deng
d6c96dc456
Update tmux.kak
When $1 or ${kak_selection} start with dash, like "-1", the command will fail, because tmux think it's an argument flag.
-- prevent this.
Also the doc (append new line) is no longer valid.
2020-12-30 16:11:02 -05:00
Lennard Hofmann
3eabeac3c9 Add Pascal/Delphi language support 2020-12-29 12:20:33 +01:00
harryoooooooooo
96df051ea3 tmux-focus: Add support for focusing a client on another window. 2020-12-28 23:04:00 +08:00
codesoap
c9f07702f9 file.kak: Acknowledge mime type application/x-shellscript 2020-12-23 22:45:07 +01:00
Maxime Coste
74b6c20a0d Merge remote-tracking branch 'pickfire/rust-indent-bracket' 2020-12-21 09:00:35 +11:00
Maxime Coste
a0f575a0f7 Merge remote-tracking branch 'tototest99/ml_v_comments' 2020-12-21 08:59:14 +11:00
Maxime Coste
45d0d0cfdc Merge remote-tracking branch 'lenormf/patch-13' 2020-12-21 08:58:02 +11:00
Maxime Coste
ec41a93c35 Merge remote-tracking branch 'greneholt/ruby-syntax' 2020-12-21 08:55:56 +11:00
Maxime Coste
c99731ebf1 Use stderr/fail to return errors in modeline.kak 2020-12-20 11:30:32 +11:00
antab
6523f57d72 feat(comment.kak): add OCaml and Coq cases 2020-12-18 08:08:56 +01:00
Frank LENORMAND
deff6b2fa9
rc doc: Hide private commands 2020-12-17 16:43:48 +03:00
Ivan Tham
1965b909e1 Rust dedent after .await 2020-12-17 20:07:44 +08:00
Ivan Tham
ffbdcaa95c Rust handle [ indent like { and ( 2020-12-17 11:19:23 +08:00
David Arnold
38efe8b421
Fix protobuf commenter 2020-12-13 20:15:02 -05:00
Maxime Coste
ce97c0dd17 Merge remote-tracking branch 'lenormf/fix-temporary-dir-template' 2020-12-05 10:53:57 +11:00
Maxime Coste
fd95e91770 Merge remote-tracking branch 'lenormf/fix-3681' 2020-12-05 10:53:08 +11:00
Maxime Coste
5849b860bd Merge remote-tracking branch 'ifreund/zig-syntax' 2020-12-05 10:50:05 +11:00
Frank LENORMAND
a548caaebe rc: Consistently use a dot as template separator
Other scripts uses a dot `.` to separate the seed from the rest of
the template, making that standard across the codebase allows running
cleanup commands like `rm -rf /tmp/kak-*.*`.
2020-11-30 14:24:06 +03:00
Frank LENORMAND
fe5f357446 rc lint: Avoid stray processes and temporary directory
This commit is an attempt at mitigating stray processes and temporary
directories, which pile up in the process tree and `$TMPDIR` over time.

To reproduce the issue, run the `lint` command in rapid successions,
or simply run `:lint; lint; lint;` in the prompt (two consecutive
calls are enough to trigger the bug).

The first call creates a `\*lint-ouput*` buffer, bound to a named
pipe that will be populated later on in an asychronous shell
process. It's that same process that runs the linter afterward, and as
soon as it has been spawned, the following call to `:lint` is executed.

Each call to `:lint` overrides the path to the named pipe that was
assigned to `\*lint-output*` by the previous one, resulting in several
asynchronous processes (that write diagnostics to the pipe) hanging
forever — the pipe is never read, and so the process idles.

The command that removes the temporary directory follows the one that
writes to the named pipe, it's never called in the above scenario,
which additionally results in `kak-lint.XXXXXXXX` directories being
left behind in `$TMPDIR`.

(Also) Fixes #3681.
2020-11-30 13:51:34 +03:00
Isaac Freund
698b028f83
zig: highlight escapes in strings, update to 0.7.0 2020-11-23 19:03:53 +01:00
Michał Kruszewski
4cb9a46f2b Python: change face for documentation to documentation. 2020-11-23 07:31:56 +01:00
Maxime Coste
14f7d2637c Fix test and re-add triple_string support in python highlighting
Triple strings are now distinct from docstrings, triple strings
only preceeded by blanks on the line are considered docstrings.

Avoid highlighting of the closing marker using a lookahead, this
is not fully correct as it will break on a double quote triple
docstring containing a single quote triple string but that seems
improbable enough; if we encounter this in the wild we can split
the two docstring formats into separate regions.
2020-11-23 08:45:59 +11:00
Maxime Coste
024e0a04f2 Merge remote-tracking branch 'm-kru/python_docstring_comment' 2020-11-22 17:02:31 +11:00
Maxime Coste
f97a4be330 Merge remote-tracking branch 'lenormf/organise-kakrc-keywords' 2020-11-22 16:56:53 +11:00
Maxime Coste
a449bcb62f Merge remote-tracking branch 'm-kru/vhdl_filetype_fix' 2020-11-22 16:55:52 +11:00
Michał Kruszewski
fd047e332f Python: Highlight docstrings with documentation face, not string. 2020-11-20 15:33:22 +01:00
connor
8b0fe9cfb0 Avoid recognizing remainder division as a percent string 2020-11-18 16:26:33 -07:00
Reed Wade
36631fc473
Detect filetype on buffer save too
This allow kaking a new file, add a shebang in the first line, and get
the right filetype detected automatically on save.
2020-11-17 22:32:09 +01:00
Frank LENORMAND
9237fc0388 rc kakrc: Add the rename-buffer keyword 2020-11-17 15:58:58 +03:00
Frank LENORMAND
8a1ac1998d rc kakrc: Add the arrange-buffers keyword 2020-11-17 15:52:18 +03:00
Frank LENORMAND
f4a387dd10 rc kakrc: Sort the keywords 2020-11-17 15:51:30 +03:00
Maxime Coste
cdcf4b0c7d Merge remote-tracking branch 'JJK96/svelte' 2020-11-17 07:19:13 +11:00
Maxime Coste
129af8dd11 Merge remote-tracking branch 'eraserhd/graphql' 2020-11-17 07:19:01 +11:00
Lennard Hofmann
8972f77f78 sh.kak: Highlight special parameters, e.g. $@, in double quotes 2020-11-14 13:53:52 +01:00
Lennard Hofmann
00857eaadc sh.kak: Do not treat bitwise operator << as here-document start 2020-11-14 11:29:32 +01:00
Jan-Jaap Korpershoek
a84fe437fa Improve svelte highlighter 2020-11-13 00:21:05 +01:00
Jason Felice
05e02e38e3 rc: add graphql filetype 2020-11-11 11:54:25 -05:00
Maxime Coste
27e95ed657 Merge remote-tracking branch 'tototest99/ninjafile' into master 2020-11-11 07:37:30 +11:00
Maxime Coste
d495369e75 Merge remote-tracking branch 'ManDay/master' into master 2020-11-11 07:25:54 +11:00
Maxime Coste
dacaad4e93 Merge remote-tracking branch 'lenormf/fix-markdown_bullet_indented' into master 2020-11-10 19:04:36 +11:00
Maxime Coste
5d81be40cf Merge remote-tracking branch 'JJK96/svelte' into master 2020-11-10 19:03:40 +11:00
Frank LENORMAND
ae9088f192 rc markdown: Fix bullet highlighting
This commit prevents the lines following the one that holds the bullet
from being highlighted with the `bullet` face when they're indented:

- The bullet is highlighted properly, so is this sentence
  but this line the ones that would follow are not

Fixes #3582
2020-11-10 08:44:17 +03:00
Jan-Jaap Korpershoek
93e85bebbb Don't use hook_param_capture_1 2020-11-09 09:53:10 +01:00
antab
858650ea57 refactor(ninjafile): simplify ninja.kak and fix few things
* fix multilines for declarations
* fix names with `-`, which Ninja allows
* fix few cases of `=` operators
* fix reserved keywords in `command = …` right-hand side

Co-authored-by: Frank LENORMAND <1379068+lenormf@users.noreply.github.com>
2020-11-08 14:13:45 +01:00
Johannes Altmanninger
cc9447c15b rc perl.kak: highlight substitution with empty replacement, like s{foo}{} 2020-11-08 06:16:27 +01:00
Johannes Altmanninger
1f4362d0ba rc perl.kak: highlight multiple regex modifiers 2020-11-08 06:16:27 +01:00
Maxime Coste
ba02c1d822 Merge remote-tracking branch 'eraserhd/nix-dash-in-word' into master 2020-11-08 15:19:20 +11:00
Maxime Coste
06b082da54 Merge remote-tracking branch 'krobelus/extra-hook-for-fish-insert' into master 2020-11-08 15:18:23 +11:00
Maxime Coste
2e7d93b2f4 Merge remote-tracking branch 'krobelus/ruby-heredoc' into master 2020-11-08 15:17:37 +11:00
Maxime Coste
086771593c Fix regex error in perl highlighting 2020-11-08 15:14:07 +11:00
Maxime Coste
7832632d02 Merge remote-tracking branch 'krobelus/perl-quoted-heredocs' into master 2020-11-08 15:07:58 +11:00
Maxime Coste
04bd899959 Merge remote-tracking branch 'krobelus/git-indented-comment' into master 2020-11-08 15:07:15 +11:00
Maxime Coste
ba015a2263 Merge remote-tracking branch 'lenormf/kakrc-highlight-numbers' into master 2020-11-08 15:05:12 +11:00
Maxime Coste
1a64a0d601 Merge remote-tracking branch 'lenormf/kakrc-highlight-str-maps' into master 2020-11-08 15:04:45 +11:00
Maxime Coste
920d1333bd Merge branch 'master' of http://github.com/tgirod/kakoune into master 2020-11-08 15:00:26 +11:00
Maxime Coste
fdd6411e69 Merge remote-tracking branch 'lenormf/fix-markdown_inline_code_blocks' into master 2020-11-08 14:57:50 +11:00
Maxime Coste
6cf3c13d97 Merge remote-tracking branch 'listentolist/tmux-repl' into master 2020-11-08 14:53:38 +11:00
Maxime Coste
19c0054e60 Merge remote-tracking branch 'npatsakula/spell_fix' into master 2020-11-08 14:50:25 +11:00
Maxime Coste
d1c27ad126 Merge remote-tracking branch 'occivink/c-alt-absolute' into master 2020-11-08 14:48:42 +11:00
Maxime Coste
e17f348a84 Merge remote-tracking branch 'Carsenal/javascript_regex_parsing' into master 2020-11-08 14:47:10 +11:00
Maxime Coste
2a5628659a Merge remote-tracking branch 'pickfire/profile' into master 2020-11-08 14:33:02 +11:00
Patsakula Nikita
ff8d4d6567
[-] spell.kak: undocumented aspell buggy-behavior avoided. 2020-11-06 15:41:12 +03:00
Olivier Perret
7e736289ce c-family: allow specifying absolute alt directory paths
alt-dirs which start with a / are considered to be absolute
2020-11-05 16:56:41 +01:00
Carson Riker
366d6fe759 Check for division before we check for regexes 2020-11-04 10:01:56 -05:00
Michał Kruszewski
f4f97835f9 VHDL filetype: fix auto inserting when indentation is mixed. 2020-11-03 19:35:05 +01:00
Maxime Coste
42301f32ca doc.kak: Render links and other elements with a single ranges highlighter 2020-11-02 08:51:44 +11:00
Ivan Tham
1e2458772d Highlight ~/.profile too 2020-11-01 17:00:12 +08:00
Maxime Coste
5d6136483c Merge remote-tracking branch 'listentolist/x11-repl' into master 2020-11-01 10:10:39 +11:00
Jan-Jaap Korpershoek
bbdcc5fdec Add very basic svelte support 2020-10-30 16:29:32 +01:00
Tilman List
d545d2c181 if the $WINDOWID is not set, use xdotool to get the window id 2020-10-30 14:35:20 +01:00
Tilman List
a5dbeeb5ee simplify x11-repl by using x11-terminal 2020-10-30 12:19:53 +01:00
tgirod
f21867d2ac
fix comment highlighting
`#` will be considered a comment only if it is the first character of the line, including blank characters.
2020-10-28 09:36:28 +01:00
Tilman List
9955cfdd8d changed scope of tmux_repl_id from global to current
By setting the tmux_repl_id in the `current` scope it is possible to have
different REPLs for different buffers or windows.
2020-10-27 17:20:33 +01:00
Tilman List
de6e86da46 changed the way the x11 REPL interaction works
Now it uses the window id to identify the REPL window. It is stored in
the option x11_repl_id. That way it is possible to have different REPLs
for different buffers or windows.
2020-10-27 14:26:27 +01:00
Cedric Sodhi
221fc38bd9 Disabled backtick escaping
Fixes issue #2377 by removing the ability to escape backticks in backticks in compliance with asciidoc's behaviour. Adjusted hooks.asciidoc, keys.asciidoc, and command-parsing.asciidoc to match accordingly.
2020-10-27 12:36:33 +01:00
Maxime Coste
90043e7df0 Replace write -atomic with write -method <method>
`-atomic` becomes `-method replace` and `-method overwrite` is now
supported explicitely instead of only available through the
writemethod option.

Fixes #3827
2020-10-27 20:20:18 +11:00
Frank LENORMAND
f8a2176ed1 rc markdown: Highlight inline code blocks properly
This commit allows code blocks to be prefixed with tabulation
characters to be picked up and highlighted by the editor.

Indenting caused by the inclusion of an inline code block into a
list item is also taken into account. However, that might cause false
positives, for example with a hard wrapped list item indented with
an amount of spaces congruent to 4.
2020-10-23 16:35:01 +03:00
Frank LENORMAND
b36f7b8440 rc kakrc: Highlight numbers 2020-10-23 14:31:38 +03:00
Frank LENORMAND
72e2b4a9be rc kakrc: Highlight str-to-str-map types 2020-10-23 14:28:43 +03:00
Johannes Altmanninger
637153270f rc git: indented # is not a comment in commit message
Git includes them in commit messages and notes, which is sometimes useful
when adding shell script snippets:

    # this is included in the commit message!

Also, in rebase buffers, # only marks a comment if it is the first nonblank
character in a line.
2020-10-21 22:08:35 +02:00
Johannes Altmanninger
816bdc91f6 rc fish.kak: split fish-insert hook out from fish-indent
Same as in sh.kak; this allows to only disable the insert hook using
%opt{disabled_hooks}.
2020-10-19 19:01:17 +02:00
Johannes Altmanninger
335ee743a4 Fix overzealous closing of ruby heredocs
Fixes #2516
2020-10-19 19:01:17 +02:00
Johannes Altmanninger
19391f8c02 rc perl: quoted heredocs can be empty
Also the closing line cannot have any trailing characters.
Leading tabs are allowed if <<~ is used.
2020-10-19 19:01:17 +02:00
Jason Felice
b6df40c586 rc nix: dash in extra_word_chars 2020-10-19 11:53:08 -04:00
Maxime Coste
296937a2a2 Merge remote-tracking branch 'Carsenal/perl_regex_highlighters' into master 2020-10-19 20:23:57 +11:00
Maxime Coste
a716923546 Merge remote-tracking branch 'SeerLite/markdown-raw-attributes' into master 2020-10-19 20:23:11 +11:00
Maxime Coste
8153f34a04 Merge remote-tracking branch 'voroskoi/gopls-fix' into master 2020-10-19 20:09:31 +11:00
Maxime Coste
2f8e8e542a Merge remote-tracking branch 'johnisom/sql-highlighting' into master 2020-10-19 20:08:50 +11:00
Maxime Coste
61f08e84f8 Merge remote-tracking branch 'eraserhd/nix-dash-fix' into master 2020-10-19 20:08:18 +11:00
voroskoi
dd6a275c3e
gopls.kak: use nop for removing temp dir
Co-authored-by: Frank LENORMAND <1379068+lenormf@users.noreply.github.com>
2020-10-17 09:47:07 +02:00
VÖRÖSKŐI András
cbbab07aab gopls: Fix format/imports error reporting
Remove unnecessary single quotes and whitespaces in %file{}
Do not delete error file before sending to debug buffer
Fix gopls definition error handling and empty sting check
Silence shellcheck warnings
2020-10-16 22:40:58 +02:00
Michał Kruszewski
4aabe33a24 Add support for VHDL filetype. 2020-10-15 09:21:04 +02:00
John Isom
860e8d55eb Fix function highlighting by adding lazy instead of greedy regexp quantifier 2020-10-14 14:54:43 -06:00
Jason Felice
c1f67972e4 rc nix: handle dashes embedded in identifiers
Some experimentation at the REPL showed that any number of leading dashes
are operators, while embedded dashes are identifier characters.

Closes #3803.
2020-10-14 07:55:06 -04:00
Maxime Coste
1de058cdf8 Fix rust highlighting after regions highlighter behaviour change 2020-10-12 13:04:08 +11:00
SeerLite
a06dcf8c10 markdown.kak: Support pandoc's raw_attribute 2020-10-11 20:53:39 -03:00
Carson Riker
21fbda7c68 Fixed ending of region, as per @krobelus 2020-10-09 13:25:26 -04:00
Carson Riker
30d5aa203d Added highlighted for curly-brace based sregexes 2020-10-09 10:45:42 -04:00
Maxime Coste
600be827b3 Merge remote-tracking branch 'pickfire/indent-yaml' into master 2020-10-08 19:51:05 +11:00
Maxime Coste
7fefb206dc Merge remote-tracking branch 'SeerLite/lua-fixes' into master 2020-10-08 19:50:41 +11:00
Ivan Tham
c148fdbe9a Rust always indent after { 2020-10-04 23:40:49 +08:00
Ivan Tham
b0ae30a443 Add missing rust indent after function { 2020-10-04 14:19:33 +08:00
SeerLite
3c3a4ec985 lua.kak: Correct -trim-indent hook and fix indent 2020-10-03 16:38:43 -03:00
Ivan Tham
1809035c15 Yaml indent after - 2020-10-02 14:24:04 +08:00
Maxime Coste
9401a9fd25 Merge remote-tracking branch 'Screwtapello/extensible-docs' into master 2020-10-01 22:16:23 +10:00
Maxime Coste
fcabffefe1 Merge remote-tracking branch 'pickfire/rust-indent' into master 2020-10-01 19:07:05 +10:00
Maxime Coste
88f6b65f35 Merge remote-tracking branch 'lboklin/master' into master 2020-09-30 21:29:38 +10:00
Maxime Coste
c9b4b0e355 Merge remote-tracking branch 'tototest99/ninjafile-upd' into master 2020-09-30 19:43:11 +10:00
Ivan Tham
bfca07da4d Rust not to indent on hash 2020-09-30 00:37:35 +08:00
Ivan Tham
56e12013c8 Rust indent keyword check boundary 2020-09-28 00:09:12 +08:00
Ivan Tham
df68a77ed2 Rust reindent where to match block 2020-09-28 00:03:53 +08:00
Ivan Tham
785cbaeaed Add rust test for empty line indent 2020-09-27 23:34:08 +08:00
Ivan Tham
5c8dfcdfa9 Rust improve align after partial statement 2020-09-27 15:53:15 +08:00
Ivan Tham
11d98a07dc Rust align open paren for if and for 2020-09-27 15:52:42 +08:00
Simon Fowler
83277d5545 Improve shell indentation implementation.
Use the custom object match command for copying indentation of blocks,
rather than simply increasing/decreasing indentation when start and end
statements are encountered.

This fixes an issue where a newline added after an already correctly
placed `else` or `fi` would trigger an unnecessary deindent. Tests have
been added to ensure no regression in this behaviour.
2020-09-26 22:10:31 +10:00
antab
737134b993 fix: improve regex for build region 2020-09-22 13:49:11 +02:00
Maxime Coste
dd1a582b30 Merge branch 'patch-3' of http://github.com/blaggacao/kakoune into master 2020-09-22 21:28:41 +10:00
Maxime Coste
c6bfce0350 Merge remote-tracking branch 'Screwtapello/spell-replace-prompt' into master 2020-09-22 21:26:22 +10:00
Maxime Coste
fa375d1c46 Merge remote-tracking branch 'krobelus/dont-highlight-escaped-expansion' into master 2020-09-22 21:23:00 +10:00
Maxime Coste
154e11181f Merge remote-tracking branch 'krobelus/perl-quoting' into master 2020-09-22 21:20:14 +10:00
Maxime Coste
57208a5481 Merge remote-tracking branch 'm-kru/go_kak_fix' into master 2020-09-22 21:18:52 +10:00
David Arnold
0d476aaa95
just: highlight function expressions 2020-09-22 00:24:29 -05:00
Tim Allen
93e5a3b51f spell.kak: Replace "kak -f" with "sed" for efficiency. 2020-09-22 01:29:03 +10:00
antab
d0ee3dfe94 fix: add subninja and include to static_words 2020-09-21 13:41:19 +02:00
antab
d5ccdcfed4 fix(ninja filetype): add subninja and include declarations and fix builddir highlights 2020-09-21 13:34:27 +02:00
Tim Allen
f75f484b84 spell.kak: Present spelling suggestions with :prompt
Previously, spelling suggestions were presented with the :menu command,
requiring the user to cycle through wild and fanciful alternatives to get to the
one they wanted. Now, we present suggestions with the :prompt command, which
allows the user to type to filter down the list, and also to customise the
replacement after they've chose it (perhaps to fix capitalisation or add
apostrophe-S).

We also use the mispelled word as the initial content of the prompt. That
filters out the wildest alternatives by default, and allows the user to edit the
original word instead of forcing them to choose from among the suggestions. To
get the full list of suggestions, it's easy enough to just backspace until the
word you want appears in the list.
2020-09-21 21:07:35 +10:00
Michał Kruszewski
f78cd6daf8 Improve '}' auto inserting for go language.
Adding "} else if ... {" was not correctly handled.
2020-09-20 12:25:26 +02:00
Johannes Altmanninger
50775b26e4 *sh.kak: do not highlight expansions if their $ is escaped 2020-09-19 08:06:46 +02:00
Johannes Altmanninger
19b54a8a6e Highlight more Perl quoting syntaxes
This adds highlighting for

- quoting operators qw, qr, and qx, like `qw< some words >`
- angle brackets after a quoting operator, like `q<string>`
- punctuation as quoting delimiter, like `q|string|`
- POD sections, which start with ^=\w and and with ^=cut
- heredocs; the marker can be a bare word, or a quoted word, like

	print <<~ 'EOF'
		single quoted heredoc
	EOF

Closes #3736

No attempt is made to use different highlighting for interpolated (qq or
"") strings just yet. Recognizing quote boundaries is more important.
2020-09-18 20:55:12 +02:00
Frank LENORMAND
4025ac8167 rc modeline: Print the final command directly 2020-09-18 15:12:13 +03:00
Frank LENORMAND
2a51ebf105 rc modeline: Factorise the use of kakquote 2020-09-18 15:12:13 +03:00
Frank LENORMAND
2d78b0760d rc modeline: Error out on unsupported formats
This commit makes `:modeline-parse` grab all lines that look like
modelines, and lets the parser deal with invalid formats.

This allows actually printing an error on unsupported modelines
formats, instead of ignoring them upfront.
2020-09-18 14:54:57 +03:00
Frank LENORMAND
30ee97386d rc modeline: Use more idiomatic shell 2020-09-18 14:54:57 +03:00
Frank LENORMAND
7731fe4cb2 rc modeline: Print error messages correctly 2020-09-18 09:01:32 +03:00
Frank LENORMAND
6976b1dce4 rc modeline: Prevent command execution
This commit prevents specially crafted modelines from making the
editor execute arbitrary Kakoune commands.

By using a tabulation character as a separator, commands can be
injected in the value of the options listed in the modeline. For
example:

	# kak: tabstop=2;set-option	buffer	pwned	yes

Fixes #3735.
2020-09-18 09:01:32 +03:00
Maxime Coste
dbd7e4da79 Merge remote-tracking branch 'voroskoi/gopls' into master 2020-09-17 19:49:33 +10:00
Maxime Coste
fd658f6995 Merge remote-tracking branch 'lenormf/fix-3733' into master 2020-09-17 19:39:48 +10:00
Maxime Coste
b8f56a65ed Merge remote-tracking branch 'deviant/add-go-alternative-file' into master 2020-09-17 19:38:59 +10:00
Maxime Coste
cb047a4a7d Merge remote-tracking branch 'tototest99/ninja-syntax' into master 2020-09-17 19:34:54 +10:00
Maxime Coste
81163ce48a Merge remote-tracking branch 'Aajn/python-highlighter' into master 2020-09-17 19:33:51 +10:00
VÖRÖSKŐI András
9fe1a2a9a4 gopls: fixes based on krobelus@ review 2020-09-16 21:58:22 +02:00
antab
810689ad60 fix: variables adjacent to = and in build declaration 2020-09-16 21:09:27 +02:00
Frank LENORMAND
95c095f3fb rc modeline: Don't select more lines than configured
This commit addresses an off-by-one error that selected `modelines`+1
lines when looking for modelines in a buffer.

Note that setting `modelines` to 0 will still select one line.

Fixes #3733.
2020-09-16 11:00:15 +03:00
antab
ea4f2b8837 feat: add basic ninjafile support 2020-09-16 00:03:17 +02:00
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
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
VÖRÖSKŐI András
2b18b1d088 rc/go-tools.kak: remove
Working functions replaced by gopls
Use kak-lsp if you need in place documentation and autocompletion
2020-09-15 01:02:19 +02:00
VÖRÖSKŐI András
568020d67b rc gopls.kak: initial import
Add support for the following gopls commands:
 - format
 - imports
 - definition
 - references

Thanks krobelus@ and lenormf@ for their review and suggestions.
2020-09-15 01:01:35 +02:00
V
c6b7e3d74a Add :alt command for go files 2020-09-10 00:23:46 +02: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
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
Tim Allen
a25cc215e8 Reference content goes in docstrings, explanations go in prose docs.
Also, make sure docstrings reference the prose docs, so people who stumble over
an interesting-looking command or option can find out more about it.
2020-09-04 19:20:50 +10:00