GithubHelp home page GithubHelp logo

Comments (9)

amckibben avatar amckibben commented on September 24, 2024 1

I absolutely could not my global user settings for word wrap to apply to asciidoc files 🤷 Worked flawlessly for any other type of file I typically edit (json, yaml, go, python, markdown, etc.).

I figured there must be something overriding / blocking those settings at the workspace level, but could not find any evidence of that.

Finally I just added word wrap settings specifically for the asciidoc language to my global user settings with a block like the following, and that worked like a charm:

  "[asciidoc]": {
    "editor.wordWrap": "bounded",
    "editor.wordWrapColumn": 100
  }

from asciidoctor-vscode.

mojavelinux avatar mojavelinux commented on September 24, 2024 1

We are using "editor.wordWrap": "on" on AsciiDoc files. So, the text will soft wrap at the viewport width.

That seems like a reasonable default to me.

from asciidoctor-vscode.

ahus1 avatar ahus1 commented on September 24, 2024 1

Same here, it is a reasonable default.

The AsciiDoc plugin for IntelliJ choses a different way: In IntelliJ, there is a global setting for enabling this by file extension. When using the AsciiDoc plugin for IntelliJ for the first time, it show a notification and tries to guide the user to this setting to change it there, as I didn't want to have a plugin-specific setting when there is a global one.

from asciidoctor-vscode.

ggrossetie avatar ggrossetie commented on September 24, 2024

It seems to be working as intended:

wordwrap

toggle-word-wrap

Could you please provide details about:

  • What you're trying to do
  • What happened
  • What you expected to happen

from asciidoctor-vscode.

ggrossetie avatar ggrossetie commented on September 24, 2024

@amckibben I guess global user settings have a lower precedence than:

"configurationDefaults": {
"[asciidoc]": {
"editor.wordWrap": "on",
"editor.quickSuggestions": false
}
},

The Markdown extension is using more or less the same settings: https://github.com/microsoft/vscode/blob/f88bce8fe6a6d2ccd27cbd64bb26853cd8779afa/extensions/markdown-language-features/package.json#L692-L701

So I'm not really sure why it does not work the same... 🤔

from asciidoctor-vscode.

ggrossetie avatar ggrossetie commented on September 24, 2024

I guess this is more a debate about if we should define a specific wordWrap and, if so, which default value we should use.
Any opinion on this matter @mojavelinux @ahus1? I guess wordWrap: on is a good default value when reading/writing documentation no?

from asciidoctor-vscode.

ggrossetie avatar ggrossetie commented on September 24, 2024

And also a documentation issue to explain how to override it using:

  "[asciidoc]": {
    "editor.wordWrap": "bounded",
    "editor.wordWrapColumn": 100
  }

(as mentioned by Alex)

from asciidoctor-vscode.

mojavelinux avatar mojavelinux commented on September 24, 2024

I'm not entirely sure what the question is. I would expect that the text would soft wrap when it overflows the visible area. Is that the feature being discussed?

from asciidoctor-vscode.

ggrossetie avatar ggrossetie commented on September 24, 2024

Yes that's correct:

  // Controls how lines should wrap.
  //  - off: Lines will never wrap.
  //  - on: Lines will wrap at the viewport width.
  //  - wordWrapColumn: Lines will wrap at `editor.wordWrapColumn`.
  //  - bounded: Lines will wrap at the minimum of viewport and `editor.wordWrapColumn`.
  "editor.wordWrap": "off",

You can control word wrap through the editor.wordWrap setting. By default, editor.wordWrap is off but if you set to it to on, text will wrap on the editor's viewport width.

https://code.visualstudio.com/docs/editor/codebasics#_how-do-i-turn-on-word-wrap

We are using "editor.wordWrap": "on" on AsciiDoc files. So, the text will soft wrap at the viewport width.

from asciidoctor-vscode.

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.