Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax Error: Recursion #67

Closed
anatomatic opened this issue Mar 31, 2018 · 13 comments
Closed

Syntax Error: Recursion #67

anatomatic opened this issue Mar 31, 2018 · 13 comments

Comments

@anatomatic
Copy link

Just installed sublime_zk and receive the following error message whenever I open my ZK project

Error loading syntax file "Packages/sublime_zk/sublime_zk.sublime-syntax": Apparent recursion within a with_prototype action: 25000 context sanity limit hit

@renerocksai
Copy link
Owner

I see this the first time. Can you provide more info about your setup? Platform (win/mac/linux), Sublime-Version?

You can get that info from the SublimeText Console (View > Show Console) if you scroll way up there.

@renerocksai
Copy link
Owner

And btw how did you install? Package control has an issue with GitHub certificates these days so I suppose you cloned / downloaded from GitHub yourself?

@renerocksai
Copy link
Owner

As you can see at the bottom in jonschlinkert/sublime-markdown-extended#141 , maybe removing the CSS3 package fixes your issue.

@anatomatic
Copy link
Author

Thanks for quick reply—

Sublime Dev Build 3060
MacOS 10.3.4
installed via Package Control (from added renerocksai/sublime_zk repository)
ZK folder has 1,843 items

@anatomatic
Copy link
Author

Going into that thread you referenced — don't have CSS3 package installed but maybe something else in there has the answer.

@renerocksai
Copy link
Owner

Would you consider:

The syntax file just adds Zettelkasten specific stuff to the Markdown syntax (provided by some Markdown Package, Markdown Extended in my case). Apparently MarkdownExtended itself seems to have a problem caused somehow by SublimeText when CSS3 is present.

Oh, just saw you don't have CSS3.

So maybe check what Markdown packages you have installed... Might point into the right direction.

@renerocksai
Copy link
Owner

Just saw this (not helpful): jonschlinkert/sublime-markdown-extended#178

@anatomatic
Copy link
Author

Disabling MarkdownExtended did it, so must be a problem from their side. Installed sublime_zk simultaneous with updating to 3060, which probably introduced the error. Sorry for the confusion. Enjoying sublime_zk so far — will have some thoughts on theming when I dig further into the plugin. Thanks for making it!

@renerocksai
Copy link
Owner

renerocksai commented Mar 31, 2018

Hmmm, I like Markdown Extended (and Monokai Extended). Do you get proper hightlighting without it? Do you use another Markdown package (that provides highlighting)?

BTW I'm always open for theming 😄 !!!

@anatomatic
Copy link
Author

I use a modified version of PreDawn to work with Markdown Extended + some of my own custom prefs. sublime_zk (seems to) install with no colors by default — what I want to try and figure out is if I can figure out a way for sublime_zk to inherit pre-existent user color-schemes, because I figure anyone who's already got a Sublime / Notes system probably already has pretty finicky custom themes set up.

@renerocksai
Copy link
Owner

I see. sublime_zk comes with a color scheme derived from Monokai Extended. See instructions in the README. The stuff to add to your color scheme mentioned in the README is incomplete as I haven't updated it yet. If you want to play around, here is the complete addition:

    <dict>
      <key>name</key>
      <string>Markup: Zettelkasten note link</string>
      <key>scope</key>
      <string>markup.zettel.link</string>
      <key>settings</key>
      <dict>
        <key>fontStyle</key>
        <string>underline</string>
        <key>foreground</key>
        <string>#7a9aff</string>
      </dict>
    </dict>
    <dict>
      <key>name</key>
      <string>Markup: Zettelkasten note link title</string>
      <key>scope</key>
      <string>markup.zettel.linktitle</string>
      <key>settings</key>
      <dict>
        <key>fontStyle</key>
        <string>underline</string>
        <key>foreground</key>
        <string>#7a9aff</string>
      </dict>
    </dict>
    <dict>
      <key>name</key>
      <string>Markup: Zettelkasten tag</string>
      <key>scope</key>
      <string>markup.zettel.tag</string>
      <key>settings</key>
      <dict>
        <key>fontStyle</key>
        <string>italic</string>
        <key>foreground</key>
        <string>#e42e70</string>
      </dict>
    </dict>

    <dict>
      <key>name</key>
      <string>Markup: Zettelkasten Image attrs in image link</string>
      <key>scope</key>
      <string>meta.image.inline.markdown.imageattr</string>
      <key>settings</key>
      <dict>
        <key>foreground</key>
        <string>#F0E68C</string>
      </dict>
    </dict>
    <dict>

As far as I know, there is no way to inherit from an existing color scheme which is why I copied and then added to Monokai Extended.

I totally get the point that SublimeText users probably already have their color schemes. Providing the additions I made (which provide the scope names), was the best I could think of.

Even if it was possible to merge these into an existing color scheme (or a copy thereof), the color values would still need to be adjusted.

If you come up with a good idea, pls let me know.

@renerocksai
Copy link
Owner

I have just created a Solarized based theme Solarized (Light)-ZK.tmTheme. It might be useful when trying to create another one. What I found is, that some scope names vary with installed Markdown packages. MarkdownHighlighting, for instance, is a bit problematic. I tried my Solarized Theme with just the Markdown package, and also with Markdown plus MarkdownEditing.

image

@Guiriguanche
Copy link

Just had the same error. No idea on why this suddenly happened today. I am on the latest ST3 (Version 3.2.2, Build 3211). Can confirm that disabling the CSS3 package (CMD+SHFT+P - type Disable and pick CSS3) immediately solves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants