kakoune: project symbols: exclude files with very long average line length

for example single or two lines bundled js files
This commit is contained in:
2026-05-25 21:59:01 +02:00
parent 6b4927cb51
commit 1070fd29b9

View File

@@ -132,7 +132,7 @@ define-command -override ctags-file-symbols %{
define-command -override ctags-project-symbols %{
prompt -menu -shell-script-candidates %{
git ls-files | xargs ctags -uo - -x | awk '{ print $1, $2, $3, $4 }'
git ls-files | xargs wc | awk '$1 > 0 && $3/$1 < 1024 { print $4 }' | xargs ctags -uo - -x | awk '{ print $1, $2, $3, $4 }'
} 'Project symbols: ' %{
evaluate-commands %sh{ printf '%s\n' "$kak_text" | awk '{ print "edit --", $4, $3 "; execute-keys /\\b" $1 "\\b<ret>" }' }
}