Open pilot513 opened 2 years ago
Did adding this JSON to your :CocConfig
(~/.vim/coc-settings.json
for me) work at all? It's vaguely working for me I think.
{
"yaml.schemas": {
"https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.5-standalone-strict/all.json": [ "/*.yaml" ]
}
}
My coc-settings.json looks like that: But when I start typing, the autocomplete doesn't work:
When I start editing the settings file, autocomplete works. I don't understand what is wrong with the yaml schema: Can someone please explain why the above schema doesn't work with yaml???
By default settings schema ("kubernetes": "/*.yaml" (1.22.4)
and autocomplete works
Can someone explain why that is?
So, the schema 1.23.5 is accessed:
what path is it set to? "/*.yaml"
no idea how YAML will handle the bare string, so try quoting it in "
?
So everything is, in doublequotation marks. It's just that the coc-json plugin does not display them:
is what I appear to have with:
{
// https://github.com/dense-analysis/ale#faq-coc-nvim
"diagnostic.displayByAle": true,
// no idea if these even arent default.
"yaml.completion": true,
"yaml.format": true,
"yaml.validate": true,
"yaml.schemaStoreEnabled": true,
"json.format.enable": true,
// https://octetz.com/c/vim-k8s-yaml-support/
"yaml.schemas": {
// Use https://github.com/yannh/kubernetes-json-schema as they're actually updated.
"https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.5-standalone-strict/all.json": [ "/*.yaml" ]
// Local copy of above, purely so it has a better filename in coc-yaml
// "//Users/bea/.vim/k8s-v1.22.4-standalone-strict.json": [ "/*.yaml" ]
}
}
This is my :CocInfo
## versions
vim version: VIM - Vi IMproved 8.2 8025000
node version: v18.2.0
coc.nvim version: 0.0.81-21a8e00b 2022-05-26 03:12:31 +0800
coc.nvim directory: /Users/bea/.vim/plug/coc.nvim
term: iTerm.app
platform: darwin
If that helps at all? Though I am not sure I have been any.
Oh, thank you very much! Earned!
The difference is in the options:
In last update I found that in coc-yaml used KUBERNETES_SCHEMA_URL="https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.22.4-standalone-strict/all.json"
How is it possible to change, for example, to 1.19.7 or 1.23.5 ?