Commit Graph

9513 Commits

Author SHA1 Message Date
Pound_Hash
a3c0665acc 1) Modified some wording to be more precise
2) Reformatted paragraphs to wrap at column 80
3) Added periods are the end of several lines for overall consistency
2022-05-10 09:53:03 -07:00
Pound_Hash
56287daac0 Fixed English mechanics: grammar, punctuation, and wording 2022-04-16 12:08:24 -07:00
Maxime Coste
b2c6bc4690 Merge branch 'doc-buffers' of http://github.com/Pound-Hash/kakoune 2022-04-11 19:55:34 +10:00
Maxime Coste
3c0ca3e6ae Merge remote-tracking branch 'inahga/inahga-update-go-highlighting' 2022-04-11 19:54:48 +10:00
Maxime Coste
adbb7b8118 Merge remote-tracking branch 'krobelus/sway-focused_tab_title' 2022-04-11 19:53:20 +10:00
Maxime Coste
9d66c97fba Merge remote-tracking branch 'krobelus/fix-doc-links' 2022-04-11 19:53:05 +10:00
Maxime Coste
7d1989d48b Merge remote-tracking branch 'krobelus/black-on-white-colorscheme' 2022-04-11 19:52:41 +10:00
Maxime Coste
5b7f112fdc Merge remote-tracking branch 'krobelus/format-show-error-in-client' 2022-04-11 19:52:15 +10:00
Maxime Coste
0ddad3c030 Merge remote-tracking branch 'Screwtapello/cleanup-session-name-validation' 2022-04-11 19:50:54 +10:00
Maxime Coste
e40ff99eae Code style cleanups around object selection code 2022-04-11 19:49:36 +10:00
Pound_Hash
dbc88281c7 Fixed grammar; rendered the construction parallel. 2022-04-10 21:49:54 -07:00
Johannes Altmanninger
f0122f10df Add black-on-white colorscheme
Kakoune doesn't have an equivalent of Vim's ":syntax off". This
colorscheme is as close as it gets: it uses various shades of grey
for cursors, selections and completion/info boxes, and black/white for
everything else.  The high-contrast makes it ideal for bright settings.

I also have the dual white-on-black colorscheme but it's not tested
much, so I left it on my "colorschemes" branch.
2022-04-09 15:38:04 +02:00
Johannes Altmanninger
a0477b1016 rc format: restore in-client error when formatcmd fails
Commit 5b1f9255 (rc: Use the standard `fail` command to report errors,
2019-11-14) replaced uses of "echo -markup {Error}" with "fail".
This made format-buffer do

	echo "eval -client $kak_client %{ fail }" | kak -p $kak_session

Unfortunately "fail" fails in the client spawned by "kak -p" and not
in $kak_client where the user would see the message. Correct this.

While at it, clarify the error message, so users immediately know
that the number is the exit code.

Fixes #3254
2022-04-09 15:36:02 +02:00
Johannes Altmanninger
019a73f4b9 rc i3: highlight sway's focused_tab_title option
Not sure if this should support sway-specific extensions but it doesn't hurt.
2022-04-09 15:29:54 +02:00
Johannes Altmanninger
7c43a4b51b doc: fix dead links to doc pages 2022-04-09 15:29:54 +02:00
Tim Allen
9cf8a3ccd6 Check for buffer overflow when constructing the socket path. 2022-04-07 21:36:15 +10:00
Tim Allen
9e6b678cf7 Do all session name validation in session_path(). 2022-04-07 21:23:10 +10:00
Ameer Ghani
f29ff7e3c6
rc/filetype/go: uintptr type missing syntax highlighting 2022-04-04 23:14:31 -04:00
Ameer Ghani
293a02bfa0
rc/filetype/go: add new go 1.18 predeclared identifiers
Go 1.18 introduces the `any` and `comparable` predeclared identifiers. Modify
the list of identifiers here, so syntax highlighting will catch these new
identifiers. See https://go.dev/ref/spec#Predeclared_identifiers.
2022-04-04 23:10:23 -04:00
Ameer Ghani
2fc07d92c2
Ameer Ghani 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.
2022-04-04 23:08:59 -04:00
Maxime Coste
eae8ea8a54 Merge remote-tracking branch 'krobelus/ini-hash-comments' 2022-03-21 21:04:55 +11:00
Maxime Coste
3667f8bb21 Merge branch 'master' of http://github.com/eko234/kakoune 2022-03-21 20:55:12 +11:00
Maxime Coste
bde59926be Merge remote-tracking branch 'tomKPZ/fix-buffer-overflow' 2022-03-21 20:52:07 +11:00
Maxime Coste
243a2abf45 Merge remote-tracking branch 'hugomg/hugomg-ubuntu-g++-10' 2022-03-21 20:50:09 +11:00
Maxime Coste
5e7afdcd04 Merge remote-tracking branch 'CharlesGueunet/FixCMakeComment' 2022-03-21 20:49:42 +11:00
Hugo Musso Gualandi
73f0de4085 Improved installation instructions for Ubuntu
Added information on how to install from the repositories. Improved the instructions for how to build from source, for those that don't want an ancient version of Kakoune. On Ubuntu 20.04 and earlier, GCC 10 is not the default so we have to explicitly tell `make` to use GCC 10.

See also: https://github.com/mawww/kakoune/issues/4571
2022-03-20 16:22:27 +01:00
Charles Gueunet
11c9984f26 Charles Gueunet 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.
2022-03-18 09:01:04 +01:00
Charles Gueunet
2f1cb11194 CMake: fix comment highlight 2022-03-18 09:01:02 +01:00
Maxime Coste
13b1681593 Merge remote-tracking branch 'krobelus/doc-complete-command-args' 2022-03-15 20:24:00 +11:00
Johannes Altmanninger
0f0f2b126d doc commands: fix names of complete-command's completion_type arguments 2022-03-08 22:10:28 +01:00
Johannes Altmanninger
13948ecb94 rc diff: pass diff to diff-jump via stdin instead of env
Passing large diff buffers via the environment can quickly result in
the error "execve failed: Argument list too long". Use a pipe like
in format.kak

When running | (or <a-|>), Kakoune does not use %arg{@} to populate
"$@" (missing feature?). Work around this by moving %arg{@} to a
temporary register. Apparently $kak_quoted_reg_a will never be an
empty list, so work around that too.

When diff parsing fails, we take care to run "fail" in the calling
client, unlike :format (probably a bug in format.kak).

(This patch is best viewed while ignoring whitespace changes (diff -w))
2022-03-08 20:30:06 +01:00
tomKPZ
f709ba6390 Fix buffer overflow in parse_quoted
This fixes a crash when using kak-lsp with bash-language-server.  The
issue is that the second read() in parse_quoted may read past the end of
the string.  If this happens and the condition on line 126 is false,
then the loop on line 119 will continue to read past the end of the
buffer since it checks for state.pos != end instead of state.pos < end,
which will likely result in a crash.  The fix is to add a check for the
buffer end before the second read. The added test fails without the
change and passes with the change.
2022-03-08 09:05:10 -08:00
tomKPZ
82db91c58c Thomas Anderson 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.
2022-03-08 09:04:41 -08:00
Johannes Altmanninger
eaaf562ed1 rc diff: support absolute paths in diff-jump
Quick repro:

	diff /dev/null $PWD/README.asciidoc -u | kak -e 'set-option buffer filetype diff'

Fixes #4531
2022-03-06 09:49:55 +01:00
Johannes Altmanninger
49de2b91c4 rc diff: bind diff-jump in all filetype=diff buffers, not just *.diff or *.patch files
Mapping in the filetype hook matches others like grep.kak and man.kak.
Since we map in buffer scope, git diff buffers will override diff-jump
with git-diff-goto-source.

This means that the diff-jump binding applies here:

	diff -u "$1" "$2" | kak -e 'set buffer filetype diff'

Reported in: https://github.com/mawww/kakoune/issues/153#issuecomment-1030643854
2022-03-06 09:49:55 +01:00
Johannes Altmanninger
1c2e1e1090 rc diff: fix style
This line was unindented by accident (I was rushing..)
2022-03-06 09:49:55 +01:00
Maxime Coste
1d6476d329 Document the GCC >= 10.3 instead of just >= 10 requirement 2022-03-06 10:13:14 +11:00
Maxime Coste
d95d351cbe Document ! and <a-!> breaking change 2022-03-06 10:13:14 +11:00
Frank LENORMAND
85b78dda2e src: Select the data inserted by ! and <a-!>
Closes #1468
2022-03-06 10:13:14 +11:00
Maxime Coste
7061001728 Add a complete-command command to configure command completion
This makes it possible to change command completion in hooks and
paves the way to more flexibility in how custom commands can be
completed
2022-03-06 10:13:14 +11:00
Maxime Coste
b915e4e11b Close MappedFile fd using on_scope_end to handle all return paths 2022-03-06 10:13:14 +11:00
Luis Alfonso Buelvas Betancourt
d6392e37c9
fennel filetype now highlights accumulate keyword 2022-02-22 17:13:38 -05:00
Maxime Coste
30c05e83f8 Remove unnecessary workaround in Buffer::insert 2022-02-22 08:28:33 +11:00
Maxime Coste
3f856d4e30 Merge remote-tracking branch 'SolitudeSF/elvish' 2022-02-22 08:12:15 +11:00
Johannes Altmanninger
3a856ef57b rc conf: treat ini files as conf if they contain a #-comment
*.ini files traditionally use ; but for example the "foot" terminal's
foot.ini uses #. Add a hack to treat ini files as "conf" filetype
if they contain a #-comment (very slim chance of false positives).
This requires to explicitly set comment_line to the default #,
because we set the "ini" filetype earlier.
2022-02-19 17:31:55 +01:00
Johannes Altmanninger
cc6fe5ae61 Add conf filetype, for generic Unix configuration files
We set the "ini" filetype for files ending in one of "repo", "ini",
"cfg", "properties" or "desktop".  Most of these actually use Unix
style comments (#) instead of DOS INI comments (;).

Introduce filetype "conf" which is similar to "ini" except it uses the
default # as comment_line string.  Both Vim and Emacs have a filetype
(or Major mode) named "conf" (hence modeline-parse of "vim ft=conf"
will work).

Here are references that show that the new "conf" files use #-comments:
*.repo -- search for # in
    https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-configuring_yum_and_yum_repositories
*.cfg: don't know much about this one, but at least the motivating file uses #
    https://github.com/buildout/buildout/blob/master/buildout.cfg
*.properties files:
    https://en.wikipedia.org/wiki/.properties
*.desktop: per spec
    https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s03.html#comments
2022-02-19 17:31:16 +01:00
SolitudeSF
1dc0a2eaf2
Fix elvish highlighter 2022-02-18 18:19:21 +02:00
Maxime Coste
0e572589f3 Do not keep MappedFile fd opened
According to the mmap man page this is not necessary, and this avoids
exposing the fd.
2022-02-18 20:24:23 +11:00
Maxime Coste
e04a14cf73 Merge branch 'patch-1' of http://github.com/Rosuavio/kakoune 2022-02-16 07:55:56 +11:00
Maxime Coste
a52b867dba Merge remote-tracking branch 'dontlaugh/patch-1' 2022-02-15 21:01:50 +11:00