Giter VIP home page Giter VIP logo

Comments (4)

gorkem avatar gorkem commented on June 16, 2024

I am not against the idea. There is a lot of users who are not happy with the prettier based formatter. My concern is the silent crowd who are happy with it. If we can devise a plan that will allow them to replace the function they depend on easily that would be ideal.

from yaml-language-server.

remcohaszing avatar remcohaszing commented on June 16, 2024

I mostly reported this, because I’ve seen other users complain here as well as in relation to monaco-yaml.

Prettier has an Editor Integration page which lists several editor integrations.

Unfortunately there’s no Prettier language server (that I know of).

For Monaco editor I would be willing to create a Prettier integration if there’s user demand.

It’s also possible for yaml-language-server to provide a formatter based on YAML.stringify instead. That would mean formatting is still possible, but the formatted output will be different.

from yaml-language-server.

znd4 avatar znd4 commented on June 16, 2024

I really like using prettier for yaml formatting, but it needs to respect .editorconfig / .prettierrc.

This can be set up with prettierd for most usecases, but it would be preferable for yaml-language-server to support formatting.

A way to "make everyone happy" would be to break out prettier support as a plugin, so that users can choose which formatting provider yaml-language-server invokes (or to choose none and have a minimal yaml-language-server installation)

That being said, it seems like a decent chunk of work, and I'm currently disabling yaml-language-server's formatting, so I wouldn't be upset about a decision to remove it completely

from yaml-language-server.

remcohaszing avatar remcohaszing commented on June 16, 2024

I also like using Prettier, but it’s a generic formatter that supports a bunch of languages. For them YAML is just one of them. Better integrations already exist.

I think it’s the responsibility of an editor to allow the user to pick a formatter, not that of a language server. I.e. VS Code supports this using the per language editor.defaultFormatter setting. I don’t think it’s a good idea to add a plugin system to yaml-language-server, because I see the editor as the plugin system and yaml-language-server as the plugin.

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.