fregante / GhostText

👻 Use your text editor to write in your browser. Everything you type in the editor will be instantly updated in the browser (and vice versa).
https://GhostText.fregante.com
MIT License
3.28k stars 117 forks source link

Default syntax "***" is not installed! #97

Open Kristinita opened 7 years ago

Kristinita commented 7 years ago

1. Summary

I don't understand, how I can set syntax for GhostText tabs.

2. Expected behavior

Writing messages in syntax, which I set. No errors in Sublime Text console.

3. Actual behavior

In Sublime Text console:

Default syntax "MarkdownEditing/Markdown" is not installed!

4. Settings

I use MarkdownEditing, AcademicMarkdown and ApplySyntax packages.

My User/GhostText.sublime-settings file:

{
    "default_syntax": "MarkdownEditing/Markdown",
    "new_window_on_connect": true
}

Part of my User/ApplySyntax.sublime-settings file:

"new_file_syntax": "MarkdownEditing/Markdown",

It means that I open my new files in MarkdownEditing/Markdown syntax of MarkdownEditing package.

5. Steps to reproduce

I reproduce the problem in a version of Sublime Text without plugins and user settings.

  1. I open any page in my browser → I click to «Ghost» button in Firefox → I select textarea field → connection establish → in GhostText tab of Sublime Text I open Sublime Text console and I see in it:
Default syntax "MarkdownEditing/Markdown" is not installed!

I input in Sublime Text console:

>>> view.settings().get('syntax')
'Packages/MarkdownEditing/Markdown.tmLanguage'
  1. I delete "default_syntax": "MarkdownEditing/Markdown", line into my User/GhostText.sublime-settings file → I open any page in my browser → I click to «Ghost» button → I select textarea field → connection establish → in GhostText tab of Sublime Text I open Sublime Text console and input in it:
>>> view.settings().get('syntax')
'Packages/AcademicMarkdown/AcademicMarkdown.tmLanguage'

Syntax incorrect for me, I want Packages/MarkdownEditing/Markdown.tmLanguage syntax.

  1. I input in User/GhostText.sublime-settings file Packages/MarkdownEditing/Markdown.tmLanguage, MarkdownEditing/Markdown.tmLanguage, Packages/MarkdownEditing/Markdown instead of MarkdownEditing/Markdown → I get behavior, for example:
Default syntax "Packages/MarkdownEditing/Markdown" is not installed!
>>> view.settings().get('syntax')
'Packages/AcademicMarkdown/AcademicMarkdown.tmLanguage'

If I set MarkdownEditing/Markdown in User/GhostText.sublime-settings file, I get expected syntax for new GhostText tabs, but I get Default syntax "MarkdownEditing/Markdown" is not installed! in console.

6. Environment

Operating system and version: Windows 10 Enterprise LTSB 64-bit EN Sublime Text: Build 3126 Firefox: 51.0.1 (64-bit) GhostText for Firefox: 1.2.4.1 GhostText for Sublime Text: 1.0.13

Thanks.

fregante commented 7 years ago

Try "default_syntax":"Packages/MarkdownEditing/Markdown.tmLanguage"

Kristinita commented 7 years ago

@bfred-it , see 5.3 item. Now I get in console:

Default syntax "Packages/MarkdownEditing/Markdown.tmLanguage" is not installed!

Thanks.

fregante commented 7 years ago

Ok I read it again and point 5.1 seems to be working for you. I'm afraid you'll just have to ignore the message in the console since it works.

fregante commented 7 years ago

GhostText is not actively developed. The original developer, who wrote the Sublime extension, has disappeared. So unless a python developer steps up I'm not going to be able to fix minor issues like this one.

Kristinita commented 7 years ago

@bfred-it , I don't think, that close issue — the best solution, because bug not fixed.

I think, will be better reopen issue and to create label, for example, need-maintainer, to increase the likelihood that Python developers to see and fixed this bug.

Thanks.

felixhao28 commented 6 years ago

Markdown Editing maintainer here. I am not able to reproduce the issue. The theme just works fine when I click the GhostText button and a new tab is opened. I don't have AcademicMarkdown or ApplySyntax installed. Maybe it is caused by a conflict with AcademicMarkdown or ApplySyntax?

revolter commented 6 years ago

@felixhao28, But can you make it so it opens with the Markdown GFM syntax applied?

felixhao28 commented 6 years ago

@revolter It is exactly what I see. A tab with Markdown GFM syntax and ArcDark theme. If you are still seeing the issue, will you start from a freshly-installed Sublime Text 3 (and newest version of GhostText-Sublime and MarkdownEditing) and try again, to make sure this issue is reproducible?

A wild guess: have you associated Markdown GFM syntax with .md extension by default? (open all .md with ...)?

revolter commented 6 years ago

I can't reinstall Sublime Text, as I would have to redo a lot of settings and stuff.

I uninstalled both packages, restarted Sublime Text, re-installed both packages, restarted Sublime Text, and tried again, and it still opens a tab with the MultiMarkdown syntax applied.

And yes, I did have Markdown GFM syntax associated to all .md files. If I cmd+p to a Markdown file, it opens with the Markdown GFM syntax.

KyleKing commented 6 years ago

I have the same issue on Windows 7; Sublime Text v3.1.1, Build 3176; and Chrome 67, where Ghost Text opens in MultiMarkdown by default (rather than GFM). Is it possible this is a Windows issue (@felixhao28, what computer do you have)?

felixhao28 commented 6 years ago

@KyleKing I am using Windows 10, latest ST version and latest Windows release update. Opening in MultiMarkdown by default is most likely the cause here. Will you try this:

  1. Create a new text file and name it "a.md"
  2. Open it with Sublime.
  3. View -> Syntax -> Open all with current extension as ... -> Markdown Editing -> Markdown GFM
  4. Close file
  5. Create a new text file and name it "b.md"
  6. Open b.md with Sublime
  7. Verify it is opened in Markdown GFM (right bottom corner)
KyleKing commented 6 years ago

Thanks, I originally checked that static markdown files opened as GFM but went through your process again just to double check; however, Ghost Text still defaults to MultiMarkdown.

In my user settings for Ghost Text, I have {"default_syntax": "Markdown.tmLanguage"} (which I believe should map to GFM, but goes to MultiMarkdown). I've also tested{"default_syntax": "Markdown (Standard).tmLanguage"} which goes to MarkdownEditing/Markdown and {"default_syntax": "MultiMarkdown.tmLanguage"} which maps to MarkdownEditing/MultiMarkdown.

This is probably out of scope for the author's initial question, so I can open a new issue if you think it is worth further troubleshooting.

felixhao28 commented 6 years ago

Well I am kind of out of ideas. How about resetting Sublime Text? Your user settings are in %LOCALAPPDATA%\Sublime Text 3\Packages\User, which you would like to backup first.

revolter commented 6 years ago

Could we add some debugging logs locally to figure out what happens?

fregante commented 3 years ago

Could we add some debugging logs locally to figure out what happens?

Sorry for the radio silence, I haven't used GhostText in a while. Feel free to send PRs to https://github.com/GhostText/GhostText-for-SublimeText