# How to navigate in markdown files

**URL:** <https://discuss.kakoune.com/t/how-to-navigate-in-markdown-files/2341>\
**Category:** Help\
**Tags:** plugins, lsp, language\
**Created:** [November 21, 2023, 9:07am UTC](https://discuss.kakoune.com/t/how-to-navigate-in-markdown-files/2341 "2023-11-21T09:07:16Z")\
**Posts on this page:** 4\
**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:** [November 21, 2023, 9:07am UTC](https://discuss.kakoune.com/t/how-to-navigate-in-markdown-files/2341/1 "2023-11-21T09:07:16Z")

</div>

Hello,  
How to configure kak-lsp to navigate in markdown ?  
I tried with `zk` but not able to make it working with (`zk lsp` in other terminal is started):

```auto
[language.markdown]
filetypes = ["markdown"]
roots = [".zk"]
command = "zk"
args = ["lsp"]

```

I also tried with `marksman` with the same that is OK in helix :

```auto
[language.markdown]
name = "markdown"
scope = "source.md"
injection-regex = "md|markdown"
file-types = ["md", "markdown"]
roots = [".marksman.toml"]
language-server = { command = "marksman", args=["server"] }
indent = { tab-width = 2, unit = " " }

```

---

<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:** [November 21, 2023, 12:50pm UTC](https://discuss.kakoune.com/t/how-to-navigate-in-markdown-files/2341/2 "2023-11-21T12:50:10Z")

</div>

the `zk` config is correct but it looks like they don’t support go-to-definition for what I tried.  
Here is a valid `marksman` config; `gd` works as expected on the links below.

```toml
[language_server.markdown] # NOTE for kak-lsp < 15.0.0 this would need to be `[language.markdown]`
filetypes = ["markdown"]
roots = [".marksman.toml"]
command = "marksman"
args = ["server"]

```

```toml
## AAA

## BBB

links to
- [AAA](#AAA)
- [BBB](#BBB)

```

I wonder which one is the right default. There’s also vscode-markdown-language-server

---

<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:** [November 21, 2023, 4:52pm UTC](https://discuss.kakoune.com/t/how-to-navigate-in-markdown-files/2341/3 "2023-11-21T16:52:06Z")

</div>

I could test it. It is working. Thanks.  
Hope it can help another than me.

I saw that you can use `helix+marksman` as `obsidian` to manage markdown :  
[Helix & marksman! (why I don’t use Obsidian) - YouTube](https://www.youtube.com/watch?v=8GQKOLh_V5E)  
[Helix: Setup for Markdown. Helix is fantastic, there’s almost no… | by Bacchus Jackson (BJax) | Medium](https://medium.com/@CaffeineForCode/helix-setup-for-markdown-b29d9891a812)  
But I want to see if I can with Kakoune

---

<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:** [November 22, 2023, 3:04pm UTC](https://discuss.kakoune.com/t/how-to-navigate-in-markdown-files/2341/4 "2023-11-22T15:04:28Z")

</div>

I could also configure the formatter with `dprint` in kakrc with :

```auto
hook global WinSetOption filetype=markdown %{
    set window formatcmd 'dprint fmt'
}

```

After you need to use the command `:format`
