Heavily inspired by CraftzDog, and Allaman. Focussed on Typescript, React. Uses Github Copilot.
Clone this repository into ~/.config/nvim
git clone https://github.com/marcus-wishes/nvim.git ~/.config/nvim
Then run:
nvim
:PackerSync
:q
nvim
:PackerInstall
:q
TreeSitter requires its grammar to compile, therefore we require to install a c++ compiler and linker. I.e. for WSL Ubuntu:
sudo apt-get install build-essentials
Use :TSInstall typescript to install the Treesitter language syntax support for Typescript, and :TSInstallInfo to get an overview over the installed languages and the other available ones, and install as required.
Neovim has a built in support for the language server protocol (LSP), but we need to install the typescript language server, and it required Node.
For node follow the official instructions.
After installing Node install the build-essentials or equivalent:
sudo npm i -g typescript typescript-language-server
Copilot requires you to authenticate its usage first. For this edit the ~/.config/nvim/lua/plugins.lua file and uncomment the use 'github/copilot.vim' line.
Run :PackerSync, exit nvim, enter it again and run :PackerInstall, exit it again, enter it and run :Copilot. Follow the steps appearing.
After copilot is authenticated, comment out the use 'github/copilor.vim' again to avoid its constant inline-suggestions, but to keep them within cmp.
Install additional tooling with :Mason.
I.g. Prettier.