Input lag when using kakoune-lsp

Heya!

I’m noticing a considerable input lag when using kak-lsp. Without it, input is smooth but when I have lsp activated in golang (gopls), nix (nil) and markdown (marksman) the input lag is very noticable.

Are there any tips for reducing the input delay with kak-lsp?

which OS, which kakoune-lsp version?

Also try the default config:

env -u XDG_CONFIG_HOME HOME=$(mktemp -d) kak -e 'eval %sh{kak-lsp}; lsp-enable'

Reproduce with something like kak -debug 'profile|shell|commands', then the debug buffer should show the offending hooks (look out for anything that takes more than a few milliseconds)

Heya, I gave this a spin with the go project I currently work in.

commands that took > 50000 us are:

  • lsp-do-send-async
  • evaluate-commands
  • lsp-do-send
  • try
  • lsp-unless-blocked
  • lsp-completion
  • lsp-if-changed-since (77257 us)
  • lsp-unless-blocked
  • lsp-did-change

I am using kak v2024.05.18 and kak-lsp 18.0.2. My workaround for now was to set idle_timeout to 300, which alleviated the issue but obviously all completions are a bit slower now.

OS is nixos.

hmm somehow reply-by-email worked for my above reply but not for the next one.
(cc @robertmeta , the missing email’s message ID is Z4pNnuoo7Vng9bC8@gmail.com)

On Fri, Jan 17, 2025 at 10:56:09AM +0000, marcc via Kakoune Community Hub wrote:

kak-lsp 18.0.2.

Please upgrade to 18.1.1 or latest master,
that fixes a performance regression for cases where mount | grep '/tmp.*tmpfs' is false

1 Like

Wooh! Worked beautifully. Everything is fast now again :). Thanks.