zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
41.62k stars 2.17k forks source link

Per-language font family #5246

Open chriskrycho opened 1 year ago

chriskrycho commented 1 year ago

Check for existing issues

Is your feature request related to a problem?

I like a fairly different environment for writing plain text/Markdown/etc. as a document than I do for writing Rust/TypeScript etc. In Code and especially Sublime, I am able to tweak things on a per-"language" basis so that I can have a really finely-tuned writing environment that centers the text in the buffer, removes line numbers, and changes both the font and font size; while also maintaining

Describe the solution you'd like

Per-language buffer settings in general, including some settings I don't yet see at all like centering the text in the buffer, turning on/off line numbers, and enabling/disabling ligatures on a per-language basis.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

Erlendms commented 4 months ago

I'd love this! Like, I feel this should work:

Alternative A

"languages": {
    "Markdown": {
      "buffer_font_family": "SM Nice Non-Mono Font",
    }
  }

As a stopgap, Alternative B could be to render plain text/Markdown/Etc. using "ui_font_family" instead of "buffer_font_family", or have something like this work, as


Alternative C:

"languages": {
    "Markdown": {
      "use_ui_font_family": "true",
    }
  }