Coder Social home page Coder Social logo

Comments (9)

robwalton avatar robwalton commented on May 18, 2024 9

I think that being able to either lint only on save, or enable/disable linting is important while writing (maybe I've missed this option). More precisely, it would be nice to have a way of hiding, or pausing linter highlighting in the editor.

Two reasons why:

  1. While writing creatively it is just nice not to be interrupted by the linter. This is why its nice to be able to disable live spell checking for example. (Thanks for providing a way to disable the lightbulb! Thats made it much less distracting.)
  2. With MD009/no-trailing-spaces enabled you get a lint warning every time you press the space bar while writing and pause for ~ 1/3 of a second. I have this off now as its just too distracting, but would like to reanable it.

So although its awesome to have the linter, I find that having it marking up the editor all the time to be distracting. I'm not sure if enable/disable or lint only on save would be a better way of solving this.

from vscode-markdownlint.

robwalton avatar robwalton commented on May 18, 2024 3

Thats great thanks! Open source is a funny old thing with strangers demanding free improvements eh?!

If it helps, these are the settings for the linters that came built in (I'm pretty sure):

// Whether the linter is run on save or on type.
"php.validate.run": "onSave",

// Run the linter on save (onSave) or on type (onType)
"eslint.run": "onType"

from vscode-markdownlint.

DavidAnson avatar DavidAnson commented on May 18, 2024

This extension lints as you type, so the list of violations is already correct when you save. How do you see this feature working differently?

from vscode-markdownlint.

DavidAnson avatar DavidAnson commented on May 18, 2024

Sorry, missed the word “only”. Okay, then my question is why is that better than linting as you type? Unlike some other tools, this one throttles itself a bit to minimize impact. Are you finding it slows things down?

from vscode-markdownlint.

averms avatar averms commented on May 18, 2024

Well the main reason is customizability, it gives more options to the end user. I just like the manual feeling of having to press a button to get run the linter.

from vscode-markdownlint.

DavidAnson avatar DavidAnson commented on May 18, 2024

The way I read the docs I could find, lint-on-save exists for projects that are not able to lint interactively - and they recommend using auto-save in conjunction as a way to approximate it.

If I added the option to this extension, either it would not do anything (file already linted automatically) or it would need to also disable interactive linting so it would have something to do. Neither seems useful until/unless interactive linting becomes impractical.

I’ll leave this issue open for a while to see if there are further requests.

from vscode-markdownlint.

robwalton avatar robwalton commented on May 18, 2024

Another annoying one while working live is MD032/blanks-around-lists, which pops up after you've made a new list item but have paused before writing into it. I'm starting to think that lint-on-save is batter than disable/enable as you don't need to remember to reenable.

from vscode-markdownlint.

DavidAnson avatar DavidAnson commented on May 18, 2024

Got it. I’ll look into this soon.

from vscode-markdownlint.

robwalton avatar robwalton commented on May 18, 2024

Awesome Thanks. Re-enabling markdown linting now!

from vscode-markdownlint.

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.