[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hideshow bug with json-mode
From: |
Robert Thorpe |
Subject: |
Re: hideshow bug with json-mode |
Date: |
Thu, 07 May 2015 21:50:57 +0100 |
Try evaluating the following line:
(push '(json-mode "{" "}" "/[*/]" nil) hs-special-modes-alist)
Then try your example.
Probably, the reason yafolding works is because it's indentation based.
Hide-show is based on syntax, so it needs information from the mode on
the syntax of blocks.
When you say that nXML mode doesn't work, what do you mean? What XML
code did you use to try it?
BR,
Robert Thorpe
Andrew Pennebaker <andrew.pennebaker@gmail.com> writes:
> yafolding <https://github.com/zenozeng/yafolding.el> seems to fix this
> problem for both JSON and XML files.
>
> On Thu, May 7, 2015 at 8:20 AM, Michael Heerdegen <michael_heerdegen@web.de>
> wrote:
>
>> Andrew Pennebaker <andrew.pennebaker@gmail.com> writes:
>>
>> > This problem only happens in certain major modes; python-mode with
>> > hs-minor-mode works as expected, whereas json-mode with hs-minor-mode
>> > features this problem.
>>
>> AFAIK hideshow does not work out of the box with every mode. It's
>> possible that it needs configuration to make it work (see
>> `hs-special-modes-alist'). Are you sure that the affected modes are
>> supported?
>>
>>
>> HTH,
>>
>> Michael.
>>
>>
>>