Currently, it seems that files with .d.rhai extension are treated the same as Rhai script files instead of LSP definition files.
This makes, for example, some Rhai code with definition files come back with parse errors. For example, in the definitions API folder:


The solution is to treat *.d.rhai as definition files automatically.
Or require all definition files to have some magic doc comment at the top? For example: