Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double exclamation mark "python" variable in YAML fails in NeoVim #990

Open
metal3d opened this issue Oct 7, 2024 · 0 comments
Open

Double exclamation mark "python" variable in YAML fails in NeoVim #990

metal3d opened this issue Oct 7, 2024 · 0 comments

Comments

@metal3d
Copy link

metal3d commented Oct 7, 2024

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:

image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant