Commit Graph

8680 Commits

Author SHA1 Message Date
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
Maxime Coste
6f3dd79e0e Merge remote-tracking branch 'pickfire/tup' into master 2020-11-08 14:32:46 +11:00
Maxime Coste
3ae2a5c2f6 Fix performance issue with word completion
When pasting many words with <a-p> we can end-up with a huge
concatenated word and many selections, the previous code ended
up iterating from each selection cursor to that word start and
end to find the word under the cursor.

This could lead to performance issue as each selection would
trigger iteration on that huge word. This is unnecessary as
word completion has a word length limit, so we now take it into
account to avoid iterating to far from the cursor position.
2020-11-07 10:42:51 +11:00
Maxime Coste
b1745ee8d3 Fix performance issue when pasting many selection
The previous code was advancing from the general insertion point
for all selection, instead of iterating only once from insertion
point until the end of inserted text.
2020-11-07 10:14:18 +11:00
Carson Riker
366d6fe759 Check for division before we check for regexes 2020-11-04 10:01:56 -05:00
Maxime Coste
94ac3084e1 Handle reading from stdin returning 0
0 means stdin was closed, this is quite unexpected as we would usually
get a SIGHUP, but it looks like in some rare case this happens and
it leads to an infinite loop trying to handle stdin events (as it
will always be readable from now on).

Fixes #3557
2020-11-02 22:54:54 +11: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
Ivan Tham
a8454aa2b1 Update Tupfile to get it building
Merge some new changes from Makefile
Shorten the output as well
2020-11-01 16:51:26 +08:00
Maxime Coste
aab0be529f Auto-insert prompt menu completions on <ret> if any text was entered
Previously we would only auto-insert if the current token had some
text, but this breaks auto-selection of the first match.

Fixes #3849
2020-11-01 10:32:44 +11:00
Maxime Coste
f25442fbad Merge remote-tracking branch 'Screwtapello/map-ctrl-symbol-keys-ncurses' into master 2020-11-01 10:11:12 +11:00
Maxime Coste
5d6136483c Merge remote-tracking branch 'listentolist/x11-repl' into master 2020-11-01 10:10:39 +11:00
Tim Allen
c039879c82 src/ncurses_ui.cc: Teach Kakoune about ctrl-symbol keys.
Previously, Kakoune only handled ctrl-codes less than 27, representing them as
lower-case ASCII codes. For regular keys like <c-a>, that worked fine. However,
NUL became the unorthodox <c-`> and other ctrl-symbols (<c-\>, <c-]>, <c-_>)
weren't supported at all.

Now NUL is rendered as the more comfortable <c-space>, and the other ctrl-symbol
codes are properly decoded.

Fixes #2553.
2020-10-31 01:20:49 +11: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
Tilman List
a5549f32bf listentolist 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-27 14:26:35 +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
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
Maxime Coste
9a5cf2fc9f Support explicit register for :, |, ! and $ commands
Giving an explicit register uses its content for the default value
to use if the user does not enter anything. This enables:

`set-register a %{commands}; execute-keys '"a:<ret>'`
`set-register a %{shell script}; execute-keys '"a|<ret>'`
...

This provides a nice way to avoid the need to escape keys to use
those normal mode commands.

Fixes #3825
2020-10-20 21:56:51 +11:00
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
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