LSP
I am using lazy in combination with lspconfig and mason, which makes it very easy for me to setup the @astrojs/language-server
.
You can also install it manually by running this command anywhere on the command line.
Treesitter
In my dotfiles I listed astro under my ensured_installs, but you can also install it (when treesitter is installed) by running this command inside NeoVim.
At the time of writing treesitter & LSP will have issues picking up *.astro
and *.mdx
files correctly.
A quick workaround for me was to add the following lines to my init.lua
.
This covered most of the basics for me. In case you are interested in a more thorough setup including Devicons
by Joshua, who wrote an in-depth article about it on their blog.