# Godot - Kakoune integration

**URL:** <https://discuss.kakoune.com/t/godot-kakoune-integration/2093>\
**Category:** Plugins\
**Tags:** plugins\
**Created:** [July 22, 2022, 12:08pm UTC](https://discuss.kakoune.com/t/godot-kakoune-integration/2093 "2022-07-22T12:08:29Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![razcore-rad](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/razcore-rad/32/1108_2.png) [@razcore-rad](https://discuss.kakoune.com/u/razcore-rad)\
**Post date:** [July 22, 2022, 12:08pm UTC](https://discuss.kakoune.com/t/godot-kakoune-integration/2093/1 "2022-07-22T12:08:29Z")

</div>

In the last couple of days, I put together this little plugin to prototype and develop Godot projects from Kakoune. We already got auto-completion with [kak-lsp](https://github.com/kak-lsp/kak-lsp/), but it’s a hassle to switch between coding in Kakoune and running projects from Godot.

What this plugin does is:

- introduces the `:godot path_to_scene_file` command to run the given Godot scene file
- and `:godot-current` that tries to find the scene file with the same name as the current buffer name and if it does it tries to open it with Godot.

That’s all 🙂

> **[GitHub - razcore-rad/godot.kak: Prototype and develop Godot projects from...](https://github.com/razcore-rad/godot.kak)**
>
> Prototype and develop Godot projects from Kakoune. - GitHub - razcore-rad/godot.kak: Prototype and develop Godot projects from Kakoune.

---

<div class="post-metadata">

**Author:** ![razcore-rad](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/razcore-rad/32/1108_2.png) [@razcore-rad](https://discuss.kakoune.com/u/razcore-rad)\
**Post date:** [July 22, 2022, 12:10pm UTC](https://discuss.kakoune.com/t/godot-kakoune-integration/2093/2 "2022-07-22T12:10:29Z")

</div>

Oh and by the way, does anyone know how can I get Kakoune to find the docs from plugins installed with `plug.kak`? So in my case I wrote `godot.kak.asciidoc` which would be located at `$HOME/.config/kak/plugins/godot.kak/godot.kak.asciidoc` after plugin installation.

But my understanding is that Kakoune only searches in `$HOME/.config/kak/autoload` for documentation 😕

---

<div class="post-metadata">

**Author:** ![eko234](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/eko234/32/1036_2.png) [@eko234](https://discuss.kakoune.com/u/eko234)\
**Post date:** [July 24, 2022, 10:51pm UTC](https://discuss.kakoune.com/t/godot-kakoune-integration/2093/3 "2022-07-24T22:51:18Z")

</div>

it also looks for other places as you can see in the link below, close to line 177, you could modify it or override it from your personal kakrc, or I guess symlinks could work too…

you will find in the tools dir a lot of things from which to take inspiration from.

> <https://github.com/mawww/kakoune/blob/master/rc/tools/doc.kak>

---

<div class="post-metadata">

**Author:** ![razcore-rad](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/razcore-rad/32/1108_2.png) [@razcore-rad](https://discuss.kakoune.com/u/razcore-rad)\
**Post date:** [July 25, 2022, 7:40am UTC](https://discuss.kakoune.com/t/godot-kakoune-integration/2093/4 "2022-07-25T07:40:04Z")

</div>

Yeah, but this means changing Kakoune’s source code. I’m interested in this change so users of plugins have an easy time “installing” the docs in an official way.

I guess I’ll have to submit a PR to add custom doc paths and see if it gets accepted.

---

<div class="post-metadata">

**Author:** ![Screwtapello](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/screwtapello/32/12_2.png) [@Screwtapello](https://discuss.kakoune.com/u/Screwtapello)\
**Post date:** [July 25, 2022, 8:12am UTC](https://discuss.kakoune.com/t/godot-kakoune-integration/2093/5 "2022-07-25T08:12:40Z")

</div>

As an alternative, you might consider patching `plug.kak` to install documentation in the places where Kakoune expects to find it.

---

<div class="post-metadata">

**Author:** ![razcore-rad](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/razcore-rad/32/1108_2.png) [@razcore-rad](https://discuss.kakoune.com/u/razcore-rad)\
**Post date:** [July 27, 2022, 6:17am UTC](https://discuss.kakoune.com/t/godot-kakoune-integration/2093/6 "2022-07-27T06:17:45Z")

</div>

I saw a discussion about this in the `plug.kak` issue tracker or somewhere, but they couldn’t get a consensus on how to handle this on the plugin side cause there isn’t a specific plugin official folder layout or anything like that.

I think it’s better to add extra search paths in kakoune. I patched `doc.kak` on my end to do that, but I don’t know if that will ever be accepted in the app 🙂

If there are others interested in the feature maybe with a few comments we can get it merged? Or if there’s a better idea I’m all ears.

> <https://github.com/mawww/kakoune/pull/4688>
>
> This PR adds the \`str-list\` \`docsextrapaths\` option so we can add extra search p…aths, for example when using \`plug.kak\`. For example.
> 
> \`\`\`kak
> set-option global docsextrapaths "%val{config}/plugins"
> \`\`\`

---

<div class="post-metadata">

**Author:** ![Screwtapello](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/screwtapello/32/12_2.png) [@Screwtapello](https://discuss.kakoune.com/u/Screwtapello)\
**Post date:** [July 31, 2022, 12:16am UTC](https://discuss.kakoune.com/t/godot-kakoune-integration/2093/7 "2022-07-31T00:16:43Z")

</div>

> [@razcore-rad](#):
>
> I saw a discussion about this in the `plug.kak` issue tracker or somewhere, but they couldn’t get a consensus on how to handle this on the plugin side cause there isn’t a specific plugin official folder layout or anything like that.

I mean, there _is_ an official plugin folder layout, it’s “put all the files in the autoload directory”. `plug.kak` goes to a lot of effort to avoid that for `.kak` files, I’m sure they can figure out a way to avoid it (or automate it) for `.asciidoc` files too.

---

<div class="post-metadata">

**Author:** ![TeddyDD](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/teddydd/32/21_2.png) [@TeddyDD](https://discuss.kakoune.com/u/TeddyDD)\
**Post date:** [August 3, 2022, 7:11pm UTC](https://discuss.kakoune.com/t/godot-kakoune-integration/2093/8 "2022-08-03T19:11:35Z")

</div>

BTW @razcore-rad do you use kak-lsp with Godot? I found this configuration works for

```auto
[language.gdscript]
filetypes = ["gd", "gdscript"]
roots = [".import", "project.godot"]
command = "nc"
args = ["localhost", "6008"]

```

Jump to definition on variable that is function argument works kinda wonky (jumps to end of funtion signature) but that might be an issue with Godot LSP implementation.

---

<div class="post-metadata">

**Author:** ![razcore-rad](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/razcore-rad/32/1108_2.png) [@razcore-rad](https://discuss.kakoune.com/u/razcore-rad)\
**Post date:** [August 3, 2022, 8:26pm UTC](https://discuss.kakoune.com/t/godot-kakoune-integration/2093/9 "2022-08-03T20:26:24Z")

</div>

Sure, I use kak-lsp, but I don’t really use advanced features so I haven’t found any major issues with the Godot LSP. Let the kak-lsp peeps know about it, they fixed an issue I had with the Godot LSP real quick cause it was something that had to be configured on kak-lsp side. Include the debug log file and maybe you at least get an idea if it’s kak-lsp or Godot LSP.
