Commit Graph

2175 Commits

Author SHA1 Message Date
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
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
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