-
Notifications
You must be signed in to change notification settings - Fork 28
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
Litvis broken in Atom 1.38.x and above #33
Comments
We continue to work on this (it involves updating the underlying litvis mume fork to align with the latest mume releases). In the meantime, litvis works with atom up to and including 1.37.0. If you have updated beyond this release, it can be downgraded by installing from the assets lists at https://github.com/atom/atom/releases/tag/v1.37.0 |
Being addressed in
VSCode fix will follow once the plugin is working again in Atom |
@jwoLondon could you please check Atom plugin v 0.17.0 on the latest Atom? I clicked through some of our examples and they appeared to be working for me. I'll get to fixing the VSCode extension once we confirm that everything works in Atom. There'll have to be a pull request similar to gicentre/markdown-preview-enhanced-with-litvis#1. |
This is great work Alex - thanks very much. I'll get on to testing this afternoon. |
I'll be away for a 1-2 hours and will happy to look at litvis a bit more later on. If we don't have any critical fixes to do, I'll try upgrading vega to v5.6.0 and vega-lite to v4.0.0-beta.8. Please check as many examples as you can because there've been a lot of major version bumps in dependencies. Not all packages are covered with typings, so I had to fix some of the breaking changes after seeing bugs in Atom rather than linter feedback. Hope I haven't missed anything, but glitches are still likely. One thing I noticed is edubkendo/atom-elm#52 popping out time and again I edit an elm block in a markdown file. Disabling autocompletion in language-elm helped. |
One more thing to check is Elm formatting. After |
Tested with completely clean install of atom and node. Following the install instructions to the letter installs the following versions from the command line:
A simple litvis doc with spec works and renders with no console errors. But, as you hinted, elm-format does not work, so presumably some problem with prettier-plugin-elm. JavaScript code blocks also fail to be formatted properly, so not specific to elm. Manual formatting from the command line works for elm and javascript code blocks:
|
Can it be that your Atom is configured to use some other formatter on save by default? Is the result the same when you type Prettier: format in the |
Formatting from the Atom console formats Javascript blocks correctly, but does not format elm blocks. |
It could be that the Atom plugin does not pick the global prettier instance somehow. It either grabs the local prettier or fallbacks to a built-in one, which comes with Atom. Alternatively, it can be that the global instance of prettier does not discover the plugin. If you type |
Opening atom from the command line in a non project folder and then opening a file that needs formatting still just formats the javascript blocks but not the elm blocks when formatting via ctrl-option-F |
What do you see when you Atom version: 1.40.1
prettier-atom version: 0.57.2
prettier: /usr/local/lib/node_modules/prettier/index.js
prettier version: 1.18.2
prettier-eslint version: 9.0.0
prettier-atom configuration: {
"formatOnSaveOptions": {
"enabled": true,
"respectEslintignore": true,
"showInStatusBar": false,
"excludedGlobs": [],
"whitelistedGlobs": [],
"isDisabledIfNotInPackageJson": false,
"isDisabledIfNoConfigFile": false,
"ignoreNodeModules": true
},
"useEslint": false,
"useStylelint": false,
"prettierEslintOptions": {
"prettierLast": false
}
}
|
Debug output is
(note I wonder if the cause is related to the fact that my location for global npm packages is |
Yeah that could be it. Here is how Prettier for Atom determines the global path: https://github.com/prettier/prettier-atom/blob/fbce7e8beac582e215124858a8b05d70784f8fe3/src/helpers/getPrettierPath.js#L10-L11 Under the hood we have https://www.npmjs.com/package/global-modules Is |
The location was recommended in the instructions we give for people who have EACCESS problems (see Step 2 of the litvis README and https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally) npm global root is what we would expect after configuring the npm prefix:
That location is part of |
Jo, could you please elaborate on your use case there? I'm off for today. |
I'm closing this issue as the substantial issue of running markdown-preview-enhanced-with-litvis with latest Atom and mume has been fixed (thanks Alex!). I'll open a separate issue on prettier-plugin-elm not being detected when npm globals are in a non-standard location. |
A fix for the VSCode extension has been made in gicentre/vscode-markdown-preview-enhanced-with-litvis#2 and released as 0.12.0. |
It looks like the changes in Atom from 1.37 -> 1.38 have broken our
markdown-preview-enhanced-with-litvis
plugin.We need to realign our fork with markdown-preview-enhanced which does work in Atom 1.38.0.
The text was updated successfully, but these errors were encountered: