Hello everyone!
So I have more questions.
-
Find and select files with FZF (not in Kakoune)
I’m not referring to something like fzf.kak. I mean from your commandline like
kak $(ls -R -i dir-pattern-to-ignore ~/path/to/dir | fzf)
(don’t have the$
if you use Fish-shell).The above does run, however on selecting an option Kakoune will just open a new file in your current directory. You can instead use
$(rg --files --glob !dir-glob --smart-case ~/path/to/dir | fzf)
, but I don’t know that feels like overkill. -
Language server fun
I have a silly web project in Typescript that I’m trying to finish up. While I don’t really need it for this project, I use the typescript-language-server. The
kak-lsp.toml
I have has this for Typescript:[language.typescript] filetype = ["typescript"] roots = ["package.json", "tsconfig.json"] command = "typescript-language-server" args = ["--stdio"]
You can use this language server for Javascript as well. However opening my project I…don’t think the language server is started.
*debug*
shows nothing besides that kak-lsp was loaded. I don’t know if there’s something else I need to do to gettypescript-language-server
to work with kak-lsp, or if this is a kak-lsp internals thing.And to clarify, this language server works fine in Emacs with lsp-mode.
-
Log file?
While double checking if kak-lsp worked fine with other languages, I found I had an issue of when I saved a file and Kakoune was stuck perpetually in
waiting for shell command to finish
and I have to kill Kakoune manually. I haveplug "ul/kak-lsp" do %{ cargo install --force --path . --locked cargo clean } config %{ define-command lsp-restart %{ lsp-stop; lsp-start } set-option global lsp_completion_trigger "execute-keys 'h<a-h><a-k>\S[^\s,=;*(){}\[\]]\z<ret>'" set-option global lsp_diagnostic_line_error_sign "!" set-option global lsp_diagnostic_line_warning_sign "?" hook global WinSetOption filetype=(c|cpp|objc|d|rust|haskell|nim|elixir|latex|javascript) %{ eval %sh{ kak-lsp --kakoune --config ~/.config/kak-lsp/kak-lsp.toml -vvv \ --log "$XDG_CONFIG_HOME/kak-lsp/kak-lsp.log" -s $kak_session } lsp-enable-window lsp-auto-hover-enable lsp-auto-hover-insert-mode-disable set-option global lsp_auto_highlight_references true set-option global lsp_hover_anchor true # Semantic highlighting hook window -group semantic-tokens BufReload .* lsp-semantic-tokens hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens hook window -group semantic-tokens InsertIdle .* lsp-semantic-tokens hook -once -always window WinSetOption filetype=.* %{ remove-hooks window semantic-tokens } # Other things hook window BufWritePre .* lsp-formatting-sync hook window BufWritePost .* lsp-diagnostics hook -always global KakEnd .* lsp-exit } }
For my configuration for kak-lsp, and I would think there would be a log file in
~/.config/kak-lsp
but there isn’t. I also don’t recall where or if there’s a default log file for Kakoune. I’m pretty sure I know what the issue is (it’s with linting or formatting), but I wish there was a log I could look at to see I’m correct in my assumption. -
Linting output
One of the things I would like is to have is for the output of the lint command to show up in a split or something instead of me having to go over to the
*lint-output*
buffer.Another thing is that I’ve noticed some lint commands don’t actually output to the
*lint-output*
buffer, they output to*debug*
. Is that suppose to happen?
EDIT:
-
Copying, yanking, pasting
So we all probably have something similar to this in our configs for pasting, yanking etc.:
hook global NormalKey y|d|c %{ nop %sh{ printf %s "$kak_main_reg_dquote" | xsel --input --clipboard } } map global normal D ';<a-l>d' map global normal <a-d> ';<a-h>d' evaluate-commands %sh{ copy="xsel --input --clipboard" paste="xsel --output --clipboard" printf \ "map global normal -docstring 'Paste (after) from clipboard' p '!%s<ret>'\n" "$paste" printf \ "map global normal -docstring 'Paste (before) from clipboard' P '<a-!>%s<ret>'\n" "$paste" #printf \ #"map global normal -docstring 'Replace selection with system clipboard' R '|%s<ret>'" "$paste" printf \ "map global normal -docstring 'Copy to system clipboard' y '<a-|>%s<ret>'\n" "$copy" printf \ "map global normal -docstring 'Copy to EOL to system clipboard' Y '<a-l><a-|>%s<ret><a-;>;'\n" "$copy" }
But some things are a little strange. My
y
andY
doesn’t actually append anything to the default yank/paste register, and neither do external copies. This is only an issue when I’m in insert mode. I don’t want to go back to normal mode just to paste (yes, I know you can press whatever key it is to enter 1 normal key or 1 command from insert mode), so I’d useC-r "
but there’s nothing in the"
register unless I delete something.