Comments (4)
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.
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.
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.
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)
- docs: The examples in the README have their syntax set wrong
- YAML `---` for "Multiple documents within a single stream" doesn't work [YAML Language Server] HOT 7
- Cannot Load content for: schema.json Unknown schema: file
- URL fragment references does not resolve correctly
- Use inline JSON Schema w/o modeline - make `yaml-language-server` string optional HOT 1
- Hover: Show root property title and description when using anyOf untitled un-described types HOT 1
- Schema association with fallbacks (wildcards) HOT 1
- Is there tilde expanstion feature on the horizon (or already supported) in schemas paths?
- yamlls + schema working fine in neovim? HOT 1
- openshift schemas in nvim with yamlls
- Add support for specifying schema via `# $schema: …` HOT 4
- RFC: Support schema from a child definition HOT 1
- How to configure yamlls at a workspace level for neovim?
- Use schema from `"$schema":` for current JSON file HOT 3
- Is path auto completion for $ref not supported?
- Unable to associate schemastore schema with a file path (nvim) HOT 1
- GitlabCI Support
- Specify schema from a Node dependency / node_modules
- Get definition on sequence item
- Make "Show all Enum on Hover" Optional
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yaml-language-server.