# Kakoune with Ubuntu WSL (windows platform) to use clangd with kak-lsp

**URL:** <https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468>\
**Category:** Help\
**Tags:** windows, lsp\
**Created:** [April 19, 2019, 9:18am UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468 "2019-04-19T09:18:17Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![lauccode](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/lauccode/32/52_2.png) [@lauccode](https://discuss.kakoune.com/u/lauccode)\
**Post date:** [April 19, 2019, 9:18am UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/1 "2019-04-19T09:18:17Z")

</div>

I guess kakoune under WSL can be a good solution if we would like to use it under Windows.

**Kakoune version has been installed with the git clone**  
$ kak -version  
Kakoune v2019.01.20-203-g06d4ee57

**WSL Ubuntu version is**  
$ lsb\_release -a  
No LSB modules are available.  
Distributor ID: Ubuntu  
Description: Ubuntu 18.04.2 LTS  
Release: 18.04  
Codename: bionic

**Clangd version installed with apt-get is**  
$ clangd --version  
clangd version 7.0.0-3~ubuntu0.18.04.1 (tags/RELEASE\_700/final)

**kak-lsp can be launch**  
$ kak-lsp  
Apr 19 10:50:19.208 INFO Starting main event loop, module: kak\_lsp::session:31  
Apr 19 10:50:19.209 INFO Starting editor transport on 127.0.0.1:31337, module: kak\_lsp::editor\_transport:106

**Debug buffer of kakoune**  
\*\*\* This is the debug buffer, where debug info will be written \*\*\*  
Dependency unmet: gocode, please install it to use go-tools  
Dependency unmet: goimports, please install it to use go-tools  
Dependency unmet: gogetdoc, please install it to use go-tools  
Dependency unmet: jq, please install it to use go-tools  
Config-change detected:

and **kak-lsp.toml** has been modified and moved from .config/kak/plugins/kak-lsp/ to .config/kak-lsp/

But when I launch a “.cpp” with Kakoune, I don’t see kak-lsp activation.  
I should see the error code activation on the number line column.  
And other clangd functionnality.

Other strange behaviour is that I can not see the kakoune command **:ranger**??

Maybe someone can help ?

Regards

---

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [April 19, 2019, 9:58am UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/2 "2019-04-19T09:58:44Z")

</div>

> [@lauccode](#):
>
> ```
> .config/kak/plugins/fzf.kak/kak-lsp/
> 
> ```

that’s strange location for `kak-lsp`

> [@lauccode](#):
>
> Other strange behaviour is that I can not see the kakoune command **:ranger**??

[There’s no such command in Kakoune anymore](https://github.com/mawww/kakoune/commit/9ef37666eae8b6bd4c16483e839d9388ef853f13).

> [@lauccode](#):
>
> But when I launch a “.cpp” with Kakoune, I don’t see kak-lsp activation.

Perhaps you could provide your configuration files for us to examine. What `lsp-compatibilities` says?

---

<div class="post-metadata">

**Author:** ![lauccode](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/lauccode/32/52_2.png) [@lauccode](https://discuss.kakoune.com/u/lauccode)\
**Post date:** [April 19, 2019, 12:53pm UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/3 "2019-04-19T12:53:44Z")

</div>

**You are right, correction is has following (I corrected it in the subject too):**  
from .config/kak/plugins/kak-lsp/ to .config/kak-lsp/

Why ranger.kak has been removed ? This is useful feature to use it.

Configuration file **kak-lsp.toml** is  
[language.c\_cpp]  
filetypes = [“c”, “cpp”]  
roots = [".cquery", “compile\_commands.json”]  
command = “clangd”

There is no event (no more clippy help) when I do `lsp-mode` -\> `lsp-compatibilities`

---

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [April 19, 2019, 1:23pm UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/4 "2019-04-19T13:23:00Z")

</div>

clangd doesn’t use `.cquery` as root indicator

---

<div class="post-metadata">

**Author:** ![lauccode](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/lauccode/32/52_2.png) [@lauccode](https://discuss.kakoune.com/u/lauccode)\
**Post date:** [April 19, 2019, 1:27pm UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/5 "2019-04-19T13:27:10Z")

</div>

**I replaced with**

> roots = [“compile\_commands.json”]

But I have the same behaviour.

---

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [April 19, 2019, 1:53pm UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/6 "2019-04-19T13:53:24Z")

</div>

Proper config would be:

```
[language.c_cpp]
filetypes = ["c", "cpp"]
roots = ["compile_flags.txt", "compile_commands.json"]
command = "clangd"
```

---

<div class="post-metadata">

**Author:** ![lauccode](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/lauccode/32/52_2.png) [@lauccode](https://discuss.kakoune.com/u/lauccode)\
**Post date:** [April 19, 2019, 2:04pm UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/7 "2019-04-19T14:04:34Z")

</div>

I replaced roots line as you advice.  
This is not working too with same behavior.  
But I don’t yet provide compile\_flags.txt under the project.

This was working well with original kak-lsp.toml under **Manjaro** and now under **openSuse** (to try because I changed SSD).  
That’s why I’m wondering what I could mess trying to use kakoune under WSL.

---

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [April 19, 2019, 2:06pm UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/8 "2019-04-19T14:06:50Z")

</div>

`compile_flags.txt` has the same syntax as `.cquery` except there’s no comments and empty lines

---

<div class="post-metadata">

**Author:** ![lauccode](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/lauccode/32/52_2.png) [@lauccode](https://discuss.kakoune.com/u/lauccode)\
**Post date:** [April 19, 2019, 2:13pm UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/9 "2019-04-19T14:13:16Z")

</div>

I put **compile\_flags.txt** with

> %clang  
> %c -std=gnu11  
> %cpp -std=gnu++14 -pthread  
> -I/work/cquery/third\_party  
> -I/work/cquery/another\_third\_party

(no more improvement)

---

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [April 19, 2019, 2:55pm UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/10 "2019-04-19T14:55:11Z")

</div>

I don’t know how WSL actually structured, so I can’t really help with anything besides configurations of kak-lsp

---

<div class="post-metadata">

**Author:** ![lauccode](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/lauccode/32/52_2.png) [@lauccode](https://discuss.kakoune.com/u/lauccode)\
**Post date:** [April 19, 2019, 4:07pm UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/11 "2019-04-19T16:07:23Z")

</div>

Don’ t worry and thanks for your help.  
Maybe someone else will succeed to use it under WSL.  
We will have confirmation that kakoune is also available under Windows.

---

<div class="post-metadata">

**Author:** ![ulis](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/ulis/32/620_2.png) [@ulis](https://discuss.kakoune.com/u/ulis)\
**Post date:** [April 19, 2019, 11:32pm UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/12 "2019-04-19T23:32:20Z")

</div>

Hello! It might worth trying to run kak-lsp server manually with debug logging for better understanding of the problem.

Try to do `kak-lsp -s mysession -vvv` in one terminal, and open file inside your cpp project with `kak -s mysession src/path/to/my/file.cpp` afterwards in another one. Debug output in the first terminal could have clues for goes wrong.

---

<div class="post-metadata">

**Author:** ![lauccode](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/lauccode/32/52_2.png) [@lauccode](https://discuss.kakoune.com/u/lauccode)\
**Post date:** [April 22, 2019, 9:16am UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/13 "2019-04-22T09:16:09Z")

</div>

Hello Andreyorst,  
How do you proceed if there is no more ranger command to navigate in your project ?  
Regards

---

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [April 22, 2019, 9:29am UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/14 "2019-04-22T09:29:21Z")

</div>

I never used ranger actually. I use fzf.kak to search and open files in my projects.

---

<div class="post-metadata">

**Author:** ![alexherbo2](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/alexherbo2/32/1140_2.png) [@alexherbo2](https://discuss.kakoune.com/u/alexherbo2)\
**Post date:** [April 22, 2019, 10:23am UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/15 "2019-04-22T10:23:33Z")

</div>

@lauccode ranger has been removed because it was too specific.

---

<div class="post-metadata">

**Author:** ![lauccode](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/lauccode/32/52_2.png) [@lauccode](https://discuss.kakoune.com/u/lauccode)\
**Post date:** [April 23, 2019, 8:08am UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/16 "2019-04-23T08:08:59Z")

</div>

> [@ulis](#):
>
> kak -s mysession

Hello ulis,  
I tried but I got no more information.  
Opening kak does not do anything.

> $ kak-lsp -s mysession -vvv  
> Apr 23 10:05:04.229 INFO Starting main event loop, module: kak\_lsp::session:31

---

<div class="post-metadata">

**Author:** ![lauccode](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/lauccode/32/52_2.png) [@lauccode](https://discuss.kakoune.com/u/lauccode)\
**Post date:** [April 23, 2019, 8:39am UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/17 "2019-04-23T08:39:03Z")

</div>

> [@alexherbo2](#):
>
> ranger has been removed because it was too specific.

Maybe it could become a ranger plug-in ?  
I need to have a look on andreyorst “fzf-project” which seems to be a good candidate to navigate in project.

---

<div class="post-metadata">

**Author:** ![alexherbo2](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/alexherbo2/32/1140_2.png) [@alexherbo2](https://discuss.kakoune.com/u/alexherbo2)\
**Post date:** [April 23, 2019, 9:03am UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/18 "2019-04-23T09:03:03Z")

</div>

You can use ranger with [Connect](https://github.com/alexherbo2/connect.kak).

```auto
connect ranger

```

---

<div class="post-metadata">

**Author:** ![lauccode](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/lauccode/32/52_2.png) [@lauccode](https://discuss.kakoune.com/u/lauccode)\
**Post date:** [April 23, 2019, 10:25am UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/19 "2019-04-23T10:25:14Z")

</div>

Thanks  
Decidedly kakoune is resourceful 🙂

---

<div class="post-metadata">

**Author:** ![lauccode](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/lauccode/32/52_2.png) [@lauccode](https://discuss.kakoune.com/u/lauccode)\
**Post date:** [April 24, 2019, 10:28am UTC](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468/20 "2019-04-24T10:28:39Z")

</div>

Hello ulis,  
Is there a way to check that **clangd** is responding ?

Kak-lsp seems well set and is running. Kakoune also.

But when I open a cpp file , I can not see the error bar added in the number line columns. It should work even with no files in the root project (compile\_flags.txt", “compile\_commands.json”).

[Next page](https://discuss.kakoune.com/t/kakoune-with-ubuntu-wsl-windows-platform-to-use-clangd-with-kak-lsp/468.md?page=2)
