nixvim
nixvim copied to clipboard
plugins/schemastore: init
CI now passes. This PR is ready for merging.
I'm pretty sure this is not the correct way to package this plugin. This plugin is a bit strange in that it provides helper functions for jsonls/yamls. I think the most idiomatic way to use this plugin would be to provide the same helper functions in some way, but that seems a bit against the module system.
Part of me agrees:
Initial thoughts...
I'm not sure it makes sense to have a plugins.schemastore, instead I think we should integrate it into plugins.lsp.
The simplest way (I can think of) to do this might be a plugins.lsp.schemastore option, which simply puts a local variable (schemastore = require('schemastore')) in scope before configuring language servers.
This could be made more useful (at the cost of extra maintenance) by having the variable directly reference the specific schema store that relates to the language server being configured.
Another approach, with a similar maintenance cost, would be to have an option under plugins.lsp.servers.jsonls (etc) that adds all or listed schemas to `settings.
On reflection, I think the current approach (plugins.schemastore) does actually make the most sense, once other feedback is addressed.