Commit Graph

8915 Commits

Author SHA1 Message Date
Maxime Coste
354cfd3b8f Disable auto-insertion of menu completion when no text was entered
This avoids a frustrating behaviour where Kakoune autoinserts the first
command name when hitting <space> after a ; in a command line. It also
fixes the empty prompt case that was auto-completed instead of executing
the default command.
2020-10-20 21:43:34 +11:00
Maxime Coste
4d22b405d6 Notify prompt completion changes in startup message 2020-10-20 21:05:26 +11: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
Nicolas Ouellet-payeur
4a59db1bd1 Fix wcwidth() compile error with MSYS2
We try to detect when compiling under Cygwin, so we can set the
_XOPEN_SOURCE define which lets us use wcwidth(). We look for the
string "CYGWIN" in the uname, which looks like:

    CYGWIN_NT-10.0

MSYS2 is also based on Cygwin, so all of the above should still work.
However, we detect Cygwin by looking for the string "CYGWIN" in the
uname. In MSYS2, the uname looks like:

    MSYS_NT-10.0-18362

This patch looks for the string "_NT" instead of the string "CYGWIN"
in the uname, since it's common to both environments. This fixes a
compilation error on MSYS2.
2020-10-19 09:36:25 -04:00
Maxime Coste
65587d1eee Auto-insert best completion on space for menu completions
The menu flag signifies that only the completions are valid arguments,
hence it makes sense to auto insert the best one on space.

Because full match is always considered the best match in completion
ranking, this should always have a reasonable behaviour.

This makes it harder to enter a hidden command, but completion can
always be disabled via <c-o> or by quoting in those rare cases.
2020-10-19 21:43:03 +11:00
Maxime Coste
2cd323b314 Allow quiting last client with unsaved buffer in daemon mode
Because the server will out-live that client's disconnection it
is still ok to have modified buffers, the server will complain
on `kill`.

Fixes #3801
2020-10-19 20:39:25 +11:00
Maxime Coste
97e88b6087 Remove the rename-client's nc alias
Closes #3789
2020-10-19 20:30:33 +11: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
Maxime Coste
def37a6ff4 Merge remote-tracking branch 'm-kru/vhdl' into master 2020-10-19 20:06:25 +11:00
Maxime Coste
f549190a98 Add support for explicit completion in prompt mode 2020-10-19 19:36:58 +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
Maxime Coste
f6c67f7831 Code cleanup in insert completer 2020-10-12 12:41:52 +11:00
Maxime Coste
246a32797a Fix region regexes incorrectly matching ^$ at end of line
Because no flags were set for regex matching, the regex engine was
assuming that the subject string past-the-end matched a end-of-line.
As the subject string already ended with a \n character, the regex
engine processing of the "past-the-end" position would match '^$'
as ^ matched past the existing \n and $ matched the assumed
end-of-line.

Fixes #3799
2020-10-12 12:41:21 +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
Carson Riker
be154ca86d Carson Riker 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-10-09 10:43:35 -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
Maxime Coste
1635ddab78 Merge remote-tracking branch 'pickfire/indent-rust' into master 2020-10-08 19:39:03 +11:00
Ivan Tham
c148fdbe9a Rust always indent after { 2020-10-04 23:40:49 +08:00
Delapouite
8989febe7a doc: mention comma key for entering user-mode 2020-10-04 13:34:57 +02: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
SeerLite
84054f9e3e SeerLite 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-10-03 16:36:46 -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
cec62e0a93 Merge remote-tracking branch 'samueldple/modify-wording-in-manual-description' into master 2020-09-30 19:45:15 +10:00
Maxime Coste
c9b4b0e355 Merge remote-tracking branch 'tototest99/ninjafile-upd' into master 2020-09-30 19:43:11 +10:00
Maxime Coste
fe51afb699 Merge remote-tracking branch 'sjjf/shell_indentation_cleanup' into master 2020-09-30 19:42:24 +10:00
Maxime Coste
6a9b34e5c8 Merge branch 'add-illumos' of http://github.com/luka-devnull/kakoune into master 2020-09-30 19:38:52 +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