# Input lag when using kakoune-lsp

**URL:** <https://discuss.kakoune.com/t/input-lag-when-using-kakoune-lsp/2621>\
**Category:** Help\
**Tags:** lsp\
**Created:** [January 15, 2025, 1:57pm UTC](https://discuss.kakoune.com/t/input-lag-when-using-kakoune-lsp/2621 "2025-01-15T13:57:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcc](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/marcc/32/1464_2.png) [@marcc](https://discuss.kakoune.com/u/marcc)\
**Post date:** [January 15, 2025, 1:57pm UTC](https://discuss.kakoune.com/t/input-lag-when-using-kakoune-lsp/2621/1 "2025-01-15T13:57:57Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![krobelus](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/krobelus/32/616_2.png) [@krobelus](https://discuss.kakoune.com/u/krobelus)\
**Post date:** [January 16, 2025, 3:47am UTC](https://discuss.kakoune.com/t/input-lag-when-using-kakoune-lsp/2621/2 "2025-01-16T03:47:16Z")

</div>

which OS, which kakoune-lsp version?

Also try the default config:

```auto
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)

---

<div class="post-metadata">

**Author:** ![marcc](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/marcc/32/1464_2.png) [@marcc](https://discuss.kakoune.com/u/marcc)\
**Post date:** [January 17, 2025, 10:46am UTC](https://discuss.kakoune.com/t/input-lag-when-using-kakoune-lsp/2621/3 "2025-01-17T10:46:01Z")

</div>

> [@krobelus](#):
>
> `env -u XDG_CONFIG_HOME HOME=$(mktemp -d) kak -e 'eval %sh{kak-lsp}; lsp-enable'`

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.

---

<div class="post-metadata">

**Author:** ![krobelus](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/krobelus/32/616_2.png) [@krobelus](https://discuss.kakoune.com/u/krobelus)\
**Post date:** [January 17, 2025, 4:21pm UTC](https://discuss.kakoune.com/t/input-lag-when-using-kakoune-lsp/2621/4 "2025-01-17T16:21:53Z")

</div>

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](mailto: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

---

<div class="post-metadata">

**Author:** ![marcc](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/marcc/32/1464_2.png) [@marcc](https://discuss.kakoune.com/u/marcc)\
**Post date:** [January 17, 2025, 5:52pm UTC](https://discuss.kakoune.com/t/input-lag-when-using-kakoune-lsp/2621/5 "2025-01-17T17:52:43Z")

</div>

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