leerob / vim-for-react-devs

A bite-sized course to get you quickly productive with Vim.
https://vimforreactdevs.com
475 stars 23 forks source link

LSP for TypeScript? #5

Open raRaRa opened 4 days ago

raRaRa commented 4 days ago

Hey, first of all thanks so much for an awesome course! Helped me a lot to get started (I've managed to get much further than any attemps I've tried before).

I was wondering if you could list all LSPs that you use, and potentially how to install them? Does the kickstart include LSPs for TypeScript? When I try using gd to go to definition, it doesn't open the file where the function is defined.

I think it would help a lot if this repo included some tips or instructions on how to get the right LSPs running for React + TypeScript + Tailwind, etc.

raRaRa commented 4 days ago

Enabling LSP for TypeScript was actually quite easy.

Open init.lua with nvim: nvim ~/.config/nvim/init.lua

Uncomment this line: -- ts_ls = {},

And that's pretty much it! If you want tailwind and other goodies, just type: :Mason

Then find tailwind and press i to install it.

Hope this helps others!