redhat-developer / redhat-developer/yaml-language-server
Double exclamation mark "python" variable in YAML fails in NeoVim
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 352
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 11
Description
Hello,
Using Mkdocs with Material, the YAML file should sometimes use this:
markdown_extensions:
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
But... NeoVim with nvim-lspconfig fails to accept the !!python tag:
I tried many configurations...
- Adding
tag:yaml.org,2002:python - Adding
tag:yaml.org,2002:python/name - Adding
!python - Adding
!python/name - Adding
!python/name scalar
And a dozen of others. This fails. Yamls-language-server continuously says that there is an error in the YAML file.
This is the configuration I have now, still doesn't work:
return {
{
"neovim/nvim-lspconfig",
opts = {
servers = {
yamlls = {
settings = {
yaml = {
validate = true,
customTags = { "!!python/name" },
},
},
},
},
},
},
}
Thanks if someone can help me.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the yamlls customTags setting and the YAML snippet shown in the issue, then trace how the language server parses and validates the !!python/name tag. Reproduce the diagnostic in NeoVim with nvim-lspconfig. Done means the valid tag is accepted without a YAML error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript, vim
- Domain
- devtools, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100