summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-04-02Reduce include creepMaxime Coste
2025-04-02Tweak ranked match behaviour to consider the number of full wordsMaxime Coste
Tracking the number of query words that appear as full words in the candidate seems to fix a few cases where the existing fuzzy matching algorithm was not great. I have been running with this for a while and did not notice any annoyances, the whole RankedMatch code probably deserves more attention but this seems to go in the right direction.
2025-03-31Handle RmdJason Felice
2025-03-29Revert "editorconfig: fix trim_trailing_whitespace"Johannes Altmanninger
https://editorconfig.org says > trim_trailing_whitespace: set to true to remove any whitespace > characters preceding newline characters and false to ensure it > doesn't. We also trim trailing empty lines, which causes unnecessary formatting discrepancies when working with other tools that implement the specification only. This backs out commit 33f44f6abcd758977e346adb91b991c003725281. Cc: Jonathan Halmen <jonathan@halmen.org>
2025-03-26Remove unused variableMaxime Coste
2025-03-26Make sure captures are taken into account when comparing selectionsMaxime Coste
sel1 == sel2 was using BasicSelection::operator==, ignoring captures, which led to selection history deciding that selection did not change in some cases where only the captures had been updated and for the new selection not to be properly applied, leading to missing capture.
2025-03-25Bump build to c++23Maxime Coste
2025-03-25rc git: fix blame/blame-jump/apply on files with eolformat=crlfJohannes Altmanninger
<a-|> produces \n line endings, which confuses Git when the tracked file uses \r\n line endings. Work around that.
2025-03-25rc git: clarify reason for NormalIdle hookJohannes Altmanninger
When blame and blame-jump invoke "git show" they set a BufCloseFifo hook to display a statusline message and center the viewport. As mentioned in the previous patch (which fixed a copy-paste error), the statusline message does not need a NormalIdle hook. Move it to prevent such errors.
2025-03-25rc git: display error from git blame immediatelyJohannes Altmanninger
When "git blame" fails, it prints an error message to the status line via a NormalIdle hook. But the hook is only necessary for "execute-keys vv". (as a workaround for https://github.com/mawww/kakoune/issues/5082). Since we run "git blame" in the background, it will not trigger a NormalIdle hook when finished. This means that the "failed to run git blame" message will only be shown after the next key press. This problem can be reproduced by first adding a sleep here: diff --git a/rc/tools/git.kak b/rc/tools/git.kak index 05e6ff144..bd899365f 100644 --- a/rc/tools/git.kak +++ b/rc/tools/git.kak @@ -301,4 +301,5 @@ define-command -params 1.. \ echo 'echo -markup {Information}Press <ret> to jump to blamed commit' ( + sleep .1 trap - INT QUIT if [ -z "${kak_opt_git_blob}" ]; then and then running ':git blame' in a file that is not Git-tracked. Reduce the scope of the hook to show this error message immediately.
2025-03-24Fix prompt history recording when using mapped keysJohannes Altmanninger
Commit e3122ab2c (Refactor prompt history handling, 2023-07-05) was a nice simplification but it breaks a rare edge case. It suppresses history recording if all keys the prompt receives were synthesized. That's not quite the right criteria: it means that if prompt is created, edited and and executed, all via mapped keys, we fail to add to history. The criteria should rather be something like "if all keys the prompt receives came from synthesized events". Make it so. This allows us to get rid of the "noninteractive" nested bool that was only used for disabling history.
2025-03-24Default InputHandler::handle_key() synthesized argumentJohannes Altmanninger
We have only one place where we handle actual keys typed by the user.
2025-03-24rc git: fail blame-jump explicitly when there is no clientJohannes Altmanninger
My kak -e 'hook global WinCreate /.* %{ git blame-jump }; edit README.asciidoc' hangs until I cancel it with <c-c>. The error is error while waiting for shell: 1:1: 'evaluate-commands': 3:21: 'execute-keys': no such client: '-draft' git blame-jump cannot do anything useful without a client in context, so fail early and explicitly.
2025-03-24rc git: throw an error when diffutils is not installedJohannes Altmanninger
Some of our git wrappers use the diff utility; if it's not installed we'll hang because no one is opening the fifo for reading. For example, this happens when running chmod -x $(which diff) && kak -e "edit README.asciidoc; git apply" Fail earlier, I guess -- although it's probably fine as-is.
2025-03-24rc git: blame to not hide error when cd_bufdir failsJohannes Altmanninger
Running "git blame" in a scratch buffer echoes "Press <ret> to jump to blamed commit" even though the blaming clearly fails. The failure is silent because cd_bufdir exits the shell, so we don't even attempt to run "git blame". cd_bufdir prints a "fail" command stdout but that goes to /dev/null in this case. I don't really understand why 891a9f5fe (Merge remote-tracking branch 'lenormf/fix-git-tools', 2019-09-22) moved cd_bufdir inside this background subshell. I guess it didn't matter as much back then when we didn't have the "Press <ret> to jump" message. Also the existing error message printed by cd_bufdir for scratch buffers is confusing. Fail as early as possible, showing a suitable error. Note that "git blame" does work in filetype=git-diff and filetype=git-log buffers, so don't attempt cd_bufdir inside those.
2025-03-24rc git: fix blaming when in subdirectoryJohannes Altmanninger
When $PWD is different from $(git rev-parse --show-toplevel, recursive blaming is broken. For example (assuming k moves to a delted line): kak -e 'cd src; edit main.cc; git blame-jump; hook -once g NormalIdle .* %{ exec k; git blame-jump }' Fix this by 1. computing the correct path from diff-parse (we already require the git command be run in a git directory). 2. passing absolute paths to the recursive "git blame" invocations
2025-03-22Improve info box clearing behaviourMaxime Coste
Schedule clearing of the info box from normal mode even if mode was disabled, clear on insert idle as well. Fixes #5300
2025-03-22Merge remote-tracking branch 'vanillajonathan/prql'Maxime Coste
2025-03-22Merge remote-tracking branch 'OliveIsAWord/master'Maxime Coste
2025-03-22Merge remote-tracking branch 'lenormf/fix-user-mode-lock'Maxime Coste
2025-03-18Add syntax highlighting for PRQLJonathan
PRQL is a modern language for transforming data — a simple, powerful, pipelined SQL replacement. https://prql-lang.org/ https://github.com/PRQL/prql
2025-03-18vanillajonathan Copyright WaiverJonathan
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.
2025-03-10minor grammar fixOlive
2025-03-10OliveIsAWord Copyright WaiverOliveIsAWord
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.
2025-02-28contrib/gendocs.py: Try 'npx antora' if 'antora' is not availableMaxime Coste
2025-02-28Merge remote-tracking branch 'igor-ramazanov/contrib/gendocs.sh'Maxime Coste
2025-02-28Try to fix cirrrus-ci buildsMaxime Coste
2025-02-28Merge remote-tracking branch 'velrest/gjs' into HEADMaxime Coste
2025-02-26Merge branch 'patch-1' of https://github.com/Supreeeme/kakoune into HEADMaxime Coste
2025-02-26Merge remote-tracking branch 'dontlaugh/master' into HEADMaxime Coste
2025-02-26Merge remote-tracking branch 'thacuber2a03/master' into HEADMaxime Coste
2025-02-26Merge remote-tracking branch 'TeddyDD/doc-kakoune-runtime-manpage' into HEADMaxime Coste
2025-02-20Try to fix MacOS compilationMaxime Coste
2025-02-19Slight style tweaksMaxime Coste
2025-02-19Move command/filename completion logic to completion.ccMaxime Coste
Refactor list_files to use a callback instead of returning a vector, file.cc/hh should not know about completion logic.
2025-02-19Cleanup file.cc/hh dependenciesMaxime Coste
file.cc/hh should not know about Context, Buffer, etc... It should be a pretty low level set of helper functions. Move buffer related functions to buffer_utils and extract busy indicators to callers.
2025-02-18rc git: Use wider characters for added/modified linesShawn Wallace
2025-02-18rc git: fix blame in diff of deleted/renamed filesJohannes Altmanninger
The code paths around "Missing commit line, assume it is an uncommitted change" in both blame and blame-jump code look suspiciously similar. It's possible that we can extract at least something, but there is a fundamental difference: blame-jump only jumps to another diff, while blame jumps from diff to blob, which may be a good reason for keeping them separate. More specifically, blame-jump passes « $version = "-" » because it's only interested in the parent commit/file/line, whereas blame wants to default to using the child commit/file/line (for added and context lines) and only uses the parent commit/file/line when run on deleted lines or on uncommitted changes (where HEAD is assumed to be parent commit even if there is no child). Unfortunately the blame path forgot to change to use the parent file for these; fix that and get rid of some code duplication.
2025-02-18rc git: remove dead codeJohannes Altmanninger
This branch is always taken since we check $diff_line_text above.
2025-02-18rc git: remove else after returnJohannes Altmanninger
2025-02-16Revert "WIP history register"Maxime Coste
This is not finished yet, and pushed by accident, again... This reverts commit 22b461c3a0b22dd4501943230f0774c34f0b4b35.
2025-02-12Merge branch 'mawww:master' into contrib/gendocs.shIgor Ramazanov
2025-02-10Document KAKOUNE_RUNTIME in manpageDaniel Lewan
2025-02-10Format blamed commit timestamps using the original time zoneJohannes Altmanninger
Surprisingly, these two commands show different commit times: git blame README.asciidoc kak -e 'git blame' README.asciidoc This is because git shows times as of the original time zone (of the author/committer). Our blame integration uses the current local time. - blame-jump displays the date in the status line of a git-show buffer This date may be inconsistent with the buffer's "Date:" header, so this seems surprising. Fix that. This fixes a test in some time zones. - Unlike "git blame", our ":git blame" does not display time zone info by default. So, the conversion to localtime might make sense. I don't really have an opinion on this. Change it too I guess, since the current behavior might not have been intended. Fixes #5285
2025-02-10WIP history registerMaxime Coste
2025-02-05rc/filetype/lua.kak: fix some highlighter issuesthacuber2a03
2025-02-05Make Control modifier quote inserted registers in prompt modeMaxime Coste
It is often usefull to quote the inserted register, like when doing `:grep <c-r>/`, or when pulling selected filenames with `<c-r><a-.>`.
2025-02-04Change kak_expect_throw macro to use alignofColeman McFarland
2025-02-04Merge branch 'master' of https://github.com/rowanxshi/kakouneMaxime Coste
2025-02-04Merge remote-tracking branch 'mu-suwi/fix-fennel-highlight'Maxime Coste