atom-parinfer icon indicating copy to clipboard operation
atom-parinfer copied to clipboard

Disable Parinfer for certain expressions

Open oakmac opened this issue 10 years ago • 1 comments

Similar in spirit to Issue #5, it would be nice to disable Parinfer for certain expressions in a file. A sentinel code comment could flag an expression as "do not apply Parinfer inside this expression".

Probably limit this to just parent expressions, or expressions that start at column 0.

oakmac avatar Nov 06 '15 01:11 oakmac

After giving this some thought, I think this should be done using sentinel comment flags for the start and end of an ignore section.

There is a lot of unnecessary complexity in trying to tag a single expression as "ignore". Start and end flags are simple to understand and simple to parse. Also they allow you to flag large sections of your code as "ignore".

How about:

;; ~~parinfer ignore:start
<code here will be ignored by Parinfer>
;; ~~parinfer ignore:end

oakmac avatar Nov 14 '15 12:11 oakmac