Giter VIP home page Giter VIP logo

Comments (7)

AnhQuanTrl avatar AnhQuanTrl commented on September 26, 2024 1

I also encounter the same issue using Neovim. It seems like this is a regression. Multidoc used to work as far as I remember.

from yaml-language-server.

ionous avatar ionous commented on September 26, 2024

this previously resolved issue might be related: #16 ( Multiple YAML documents in single file features work for first section but not the rest )
and there is also this currently open issue #869 ( intellisense completion breaks with multiple documents in a single file )

from yaml-language-server.

thieman avatar thieman commented on September 26, 2024

Is this problem only occurring when using the # yaml-language-server inline directive to specify the schema? I think that's intended behavior in that it only applies to the YAML document (not the entire file) it's a part of. If you copy # yaml-language-server: $schema=enola.schema.jsonc into the second document, do you start seeing autocompletion etc work as expected? It's working that way for me currently in VSCode.

If that's true, this is probably more of a feature request than a bug report, as making the inline directives fallthrough to subsequent documents would probably be a breaking change in a lot of cases. If a single file has multiple distinct types of YAML documents requiring different schemas, fallthrough is probably not what you'd want, as it will cause spurious errors. Maybe there could be additional syntax in the directive to indicate you'd like it to fallthrough to subsequent documents?

from yaml-language-server.

AnhQuanTrl avatar AnhQuanTrl commented on September 26, 2024

@thieman It used to work on my end with multiple # yaml-language-server per YAML document. However, this is no longer the case and the top # yaml-language-server affects the whole file instead of a document.

from yaml-language-server.

nikaro avatar nikaro commented on September 26, 2024

It happens to me without using the inline # yaml-language-server directive.

from yaml-language-server.

thieman avatar thieman commented on September 26, 2024

Ah ok, it seems like we have at least two different things being reported here? Please let me know if any of this is wrong.

@vorburger is saying that the current behavior is inline directives only apply to the document, not the file. I am also experiencing this.

@AnhQuanTrl is saying the opposite! That the inline directives apply to the entire file.

@nikaro could you elaborate on your issue, or let us know if it fits into one of the other descriptions?

Could you all please report your version numbers? I'm using the VSCode extension at v1.15.0, which is also using the language server at 1.15.0.

from yaml-language-server.

nikaro avatar nikaro commented on September 26, 2024

@thieman sorry i ended up following this issue as its title seemed more aligned with my issue. But it fits more with the comments on this one: #869

I'm using Helix editor with yaml-language-server version 1.15.0.

Capture d’écran 2024-08-28 à 15 53 07

from yaml-language-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.