# Setting up kak-lsp for typescript and tsx

**URL:** <https://discuss.kakoune.com/t/setting-up-kak-lsp-for-typescript-and-tsx/2024>\
**Category:** Help\
**Tags:** language, lsp\
**Created:** [March 28, 2022, 2:08pm UTC](https://discuss.kakoune.com/t/setting-up-kak-lsp-for-typescript-and-tsx/2024 "2022-03-28T14:08:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FeliciousX](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/f/9d8465/32.png) [@FeliciousX](https://discuss.kakoune.com/u/FeliciousX)\
**Post date:** [March 28, 2022, 2:08pm UTC](https://discuss.kakoune.com/t/setting-up-kak-lsp-for-typescript-and-tsx/2024/1 "2022-03-28T14:08:51Z")

</div>

I’ve been having issues making kak-lsp work with tsx files… by default `.ts` files work perfectly… but once you add `JSX`, all hell breaks loose.

After digging around, finally found [this github issue](https://github.com/typescript-language-server/typescript-language-server/issues/138#issuecomment-619873173)

adding

```auto
[language.tsx]
filetypes = ["typescript"]
roots = ["package.json", "tsconfig.json"]
command = "typescript-language-server"
args = ["--stdio"]

```

to your `kak-lsp.toml` makes it work with `.tsx` files!

---

<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:** [March 28, 2022, 7:11pm UTC](https://discuss.kakoune.com/t/setting-up-kak-lsp-for-typescript-and-tsx/2024/2 "2022-03-28T19:11:26Z")

</div>

I assume you removed the `[language.typescript]` entry, like at the bottom of [this comment on the kak-lsp issue](https://github.com/kak-lsp/kak-lsp/issues/211#issuecomment-532498773)

I don’t know much about typescript but I reckon that there is no downside to making `tsx` the default (at least with this specific language server)? So let’s make that the default to save future users the trouble?

---

<div class="post-metadata">

**Author:** ![FeliciousX](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/f/9d8465/32.png) [@FeliciousX](https://discuss.kakoune.com/u/FeliciousX)\
**Post date:** [April 2, 2022, 4:07am UTC](https://discuss.kakoune.com/t/setting-up-kak-lsp-for-typescript-and-tsx/2024/3 "2022-04-02T04:07:00Z")

</div>

yes I recently did! Found out there’s some issues when they’re both defined. I’ll edit the post.

– whoops, couldn’t edit it anymore 😬
