Code Monkey home page Code Monkey logo

atom-elm's Introduction

language-elm package

Syntax highlighting and autocomplete for the Elm language.

Installation

There are two ways to install the Atom Elm Extension: using the editor, or using the command line.

Install using the editor (Recommended)

You can install packages within Atom. To do so:

  1. Open the editor settings
  2. Click the "Install" menu item
  3. Search for "language-elm"
  4. Click the install button on the "language-elm" result

More documentation for how to use the package manager can be found on the official Atom site.

Screenshot

Screenshot of installation

Install using the command line

Run the following command in your terminal:

apm install language-elm

Autocomplete

In order to get autocomplete working, please:

  1. Open up a terminal
  2. npm install -g elm-oracle
  3. which elm-oracle on Unix/Linux or where.exe elm-oracle on Windows
  4. Copy the path to elm-oracle
  5. Open up the language-elm settings in Atom
    - Open up the Atom Settings / Preferences tab - Click on "Packages" - Find the "language-elm" package in the list - Click "Settings"
  6. Paste the path into "The elm-oracle executable path" setting

Thanks to the authors of Elm Oracle

Jump to Symbol

Atom's native symbol-view package uses ctags, and thus doesn't support Elm without extra configuration. But this plugin https://atom.io/packages/goto uses langauge definition files to identify symbols, and does support Elm as long as atom-elm is installed.

atom-elm's People

Contributors

avh4 avatar brianegan avatar despairblue avatar e-jigsaw avatar edubkendo avatar ianbollinger avatar jovanbulck avatar jpierson avatar mrmurphy avatar thomasweiser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

atom-elm's Issues

Elm 0.17 module syntax

In 0.17 the module syntax has changed:

feature 0.16 0.17
module declaration
module Queue (..) where
module Queue exposing (..)

The current syntax highlighting does not support this.

Uncaught Error: No elm-oracle suggestions

I've added
/Users/simon/.nvm/versions/node/v0.12.7/bin/elm-oracle
as the correct path per the instructions

[Enter steps to reproduce below:]

  1. type anything
  2. get a stream of error messages - this did not happen on 0.62

Atom Version: 1.0.11
System: Mac OS X 10.10.5
Thrown From: language-elm package, v1.0.0

Stack Trace

Uncaught Error: No elm-oracle suggestions

At /Users/simon/.atom/packages/language-elm/lib/provider.js:72

Error: No elm-oracle suggestions
  at noOutputFromOracleError (/Users/simon/.atom/packages/language-elm/lib/provider.js:62:16)
  at parseOutput (/Users/simon/.atom/packages/language-elm/lib/provider.js:77:17)
  at provideSuggestions (/Users/simon/.atom/packages/language-elm/lib/provider.js:88:67)
  at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:220:18
  at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:98:18)
  at emitOne (events.js:82:20)
  at Socket.emit (events.js:166:7)
  at Pipe.close (net.js:464:12)

Commands

     -4:56.8.0 core:copy (atom-text-editor.editor.is-focused)
     -4:53.9.0 core:paste (atom-text-editor.editor.is-focused)
     -4:33.5.0 core:save (atom-text-editor.editor.is-focused)
  2x -2:18.2.0 editor:toggle-line-comments (atom-text-editor.editor.is-focused)
     -0:19.3.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ],
    "disabledPackages": [
      "linter-eslint",
      "haskell-ghc-mod",
      "autocomplete-haskell"
    ]
  }
}

Installed Packages

# User
.bin, vundefined
angularjs, v0.3.0
atom-snippets, v0.1.1
atom-typescript, v6.0.8
autocomplete-sass, v0.1.0
color-picker, v2.0.11
ide-haskell, v0.7.2
language-elm, v1.0.0
language-haskell, v1.4.4
language-jade, v0.6.2
linter, v1.5.1
pretty-json, v0.4.1
white-cursor, v0.6.0

# Dev
No dev packages

Uncaught SyntaxError: Unexpected token N

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.10.2
Electron Version: 0.37.8
System: Microsoft Windows 10 Home
Thrown From: language-elm package, v1.5.0

Stack Trace

Uncaught SyntaxError: Unexpected token N

At file:///C:/ProgramData/Yacine/atom/app-1.10.2/resources/app.asar/static/index.html#%7B%22initialPaths%22%3A%5B%22C%3A%5C%5CUsers%5C%5CYacine%5C%5CDesktop%5C%5Celm-training%22%5D%2C%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22C%3A%5C%5CUsers%5C%5CYacine%5C%5CDesktop%5C%5Celm-training%22%2C%22initialLine%22%3Anull%2C%22initialColumn%22%3Anull%7D%5D%2C%22windowInitializationScript%22%3A%22C%3A%5C%5CProgramData%5C%5CYacine%5C%5Catom%5C%5Capp-1.10.2%5C%5Cresources%5C%5Capp.asar%5C%5Csrc%5C%5Cinitialize-application-window.js%22%2C%22resourcePath%22%3A%22C%3A%5C%5CProgramData%5C%5CYacine%5C%5Catom%5C%5Capp-1.10.2%5C%5Cresources%5C%5Capp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22clearWindowState%22%3Afalse%2C%22appVersion%22%3A%221.10.2%22%2C%22atomHome%22%3A%22C%3A%5C%5CUsers%5C%5CYacine%5C%5C.atom%22%7D:1

SyntaxError: Unexpected token N
    at Object.parse (native)
    at provideSuggestions (C:/Users/Yacine/.atom/packages/language-elm/lib/elmOracle.js:27:20)
    at ChildProcess.<anonymous> (C:/Users/Yacine/.atom/packages/language-elm/lib/elmOracle.js:62:9)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:850:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

Commands

Config

{
  "core": {},
  "language-elm": {
    "elmOraclePath": "C:\\Users\\Yacine\\AppData\\Roaming\\npm\\elm-oracle"
  }
}

Installed Packages

# User
atom-beautify, v0.29.0 (inactive)
atom-terminal-panel, v4.4.4 (active)
autoclose-html, v0.23.0 (active)
language-elm, v1.5.0 (active)
language-latex, v0.6.1 (active)
latex, v0.32.0 (inactive)
pdf-view, v0.50.0 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.5.0 (active)
one-light-ui, v1.5.0 (inactive)
one-dark-syntax, v1.3.0 (active)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.3 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.2 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.39.0 (active)
find-and-replace, v0.201.0 (inactive)
fuzzy-finder, v1.3.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.58.2 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (active)
notifications, v0.65.0 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.242.2 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.0 (active)
symbols-view, v0.113.0 (inactive)
tabs, v0.100.2 (active)
timecop, v0.33.2 (active)
tree-view, v0.208.2 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.33.0 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.2 (active)
language-csharp, v0.12.1 (active)
language-css, v0.37.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.42.1 (active)
language-html, v0.45.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.23.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.2 (active)
language-less, v0.29.5 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.2 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.69.0 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.56.0 (active)
language-shellscript, v0.22.4 (active)
language-source, v0.9.0 (active)
language-sql, v0.23.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.9 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages

Uncaught Error: No elm-oracle suggestions

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.10.2
Electron Version: 0.37.8
System: Mac OS X 10.11.5
Thrown From: language-elm package, v1.5.0

Stack Trace

Uncaught Error: No elm-oracle suggestions

At /Users/linjun/.atom/packages/language-elm/lib/elmOracle.js:125

Error: No elm-oracle suggestions
    at parseOutput (/Users/linjun/.atom/packages/language-elm/lib/elmOracle.js:125:11)
    at provideSuggestions (/Users/linjun/.atom/packages/language-elm/lib/elmOracle.js:27:27)
    at triggerExitCallback (/Users/linjun/Downloads/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:215:47)
    at ChildProcess.<anonymous> (/Users/linjun/Downloads/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:237:18)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)

Commands

     -1:26.4.0 core:paste (atom-text-editor.editor.is-focused)
     -1:24.1.0 core:copy (atom-text-editor.editor.is-focused)
     -1:22.7.0 core:move-right (atom-text-editor.editor.is-focused)
     -1:22.5.0 core:move-left (atom-text-editor.editor.is-focused)
  2x -1:22 core:backspace (atom-text-editor.editor.is-focused)
     -1:21.7.0 core:paste (atom-text-editor.editor.is-focused)
     -1:21.6.0 core:save (atom-text-editor.editor.is-focused)
     -1:20.3.0 atom-beautify:beautify-editor (atom-text-editor.editor.is-focused)
     -1:19.8.0 core:save (atom-text-editor.editor.is-focused)
  2x -1:18 blur (atom-text-editor.editor.is-focused)
  2x -1:13.1.0 core:save (atom-text-editor.editor.is-focused)
     -1:09.2.0 core:select-all (atom-text-editor.editor.is-focused)
  2x -1:08.4.0 core:save (atom-text-editor.editor.is-focused)
 13x -1:07.8.0 blur (atom-text-editor.editor.is-focused)
     -0:04.5.0 atom-beautify:beautify-editor (atom-text-editor.editor.is-focused)
     -0:03.7.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "customFileTypes": {
      "source.ini": [
        ".buckconfig"
      ],
      "source.json": [
        ".arcconfig",
        "BUCK.autodeps"
      ],
      "source.python": [
        "BUCK"
      ]
    },
    "packagesWithKeymapsDisabled": []
  }
}

Installed Packages

# User
api-workbench, v0.8.37 (active)
atom-beautify, v0.29.13 (active)
atom-mac-terminal, v1.0.4 (inactive)
autocomplete-python, v1.8.6 (active)
coffee-autocompile, v0.6.2 (active)
dash, v1.6.2 (inactive)
elm, v0.1.0 (active)
es6-javascript, v1.0.0 (inactive)
file-icons, v1.7.19 (active)
floobits, v0.32.4 (active)
hyperclick, v0.0.38 (active)
language-aspx, v0.5.0 (active)
language-docker, v1.1.7 (active)
language-elm, v1.5.0 (active)
language-nginx, v0.6.2 (active)
language-vue-component, v0.4.7 (active)
linter, v1.11.16 (active)
linter-elm-make, v0.17.7 (active)
pigments, v0.35.1 (active)
python-debugger, v0.1.0 (inactive)
python-nosetests, v0.2.0 (inactive)
thinkjs-snippets, v0.1.0 (active)
tree-view-git-status, v1.1.0 (active)
vue-format, v0.4.0 (inactive)
vue-snippets, v0.6.0 (active)
atom-dark-syntax, v0.27.0 (inactive)
atom-dark-ui, v0.52.0 (inactive)
atom-light-syntax, v0.28.0 (inactive)
atom-light-ui, v0.44.0 (inactive)
base16-tomorrow-dark-theme, v1.1.0 (inactive)
base16-tomorrow-light-theme, v1.1.1 (inactive)
one-dark-ui, v1.5.0 (active)
one-light-ui, v1.5.0 (inactive)
one-dark-syntax, v1.3.0 (active)
one-light-syntax, v1.3.0 (inactive)
solarized-dark-syntax, v1.0.2 (inactive)
solarized-light-syntax, v1.0.2 (inactive)
about, v1.5.3 (active)
archive-view, v0.61.1 (active)
autocomplete-atom-api, v0.10.0 (active)
autocomplete-css, v0.11.2 (active)
autocomplete-html, v0.7.2 (active)
autocomplete-plus, v2.31.1 (active)
autocomplete-snippets, v1.11.0 (active)
autoflow, v0.27.0 (inactive)
autosave, v0.23.1 (active)
background-tips, v0.26.1 (active)
bookmarks, v0.41.0 (active)
bracket-matcher, v0.82.1 (active)
command-palette, v0.38.0 (inactive)
deprecation-cop, v0.54.1 (active)
dev-live-reload, v0.47.0 (active)
encoding-selector, v0.22.0 (active)
exception-reporting, v0.39.0 (active)
find-and-replace, v0.201.0 (inactive)
fuzzy-finder, v1.3.0 (active)
git-diff, v1.1.0 (active)
go-to-line, v0.31.0 (inactive)
grammar-selector, v0.48.1 (active)
image-view, v0.58.2 (active)
incompatible-packages, v0.26.1 (active)
keybinding-resolver, v0.35.0 (active)
line-ending-selector, v0.5.0 (active)
link, v0.31.1 (inactive)
markdown-preview, v0.158.0 (active)
metrics, v0.53.1 (active)
notifications, v0.65.0 (active)
open-on-github, v1.2.0 (inactive)
package-generator, v1.0.0 (inactive)
settings-view, v0.242.2 (active)
snippets, v1.0.2 (active)
spell-check, v0.67.1 (active)
status-bar, v1.4.1 (active)
styleguide, v0.47.0 (active)
symbols-view, v0.113.0 (inactive)
tabs, v0.100.2 (active)
timecop, v0.33.2 (active)
tree-view, v0.208.2 (active)
update-package-dependencies, v0.10.0 (active)
welcome, v0.34.0 (active)
whitespace, v0.33.0 (active)
wrap-guide, v0.38.1 (active)
language-c, v0.52.1 (active)
language-clojure, v0.21.0 (active)
language-coffee-script, v0.47.2 (active)
language-csharp, v0.12.1 (active)
language-css, v0.37.1 (active)
language-gfm, v0.88.0 (active)
language-git, v0.15.0 (active)
language-go, v0.42.1 (active)
language-html, v0.45.1 (active)
language-hyperlink, v0.16.0 (active)
language-java, v0.23.0 (active)
language-javascript, v0.119.0 (active)
language-json, v0.18.2 (active)
language-less, v0.29.5 (active)
language-make, v0.22.2 (active)
language-mustache, v0.13.0 (active)
language-objective-c, v0.15.1 (active)
language-perl, v0.35.0 (active)
language-php, v0.37.2 (active)
language-property-list, v0.8.0 (active)
language-python, v0.45.0 (active)
language-ruby, v0.69.0 (active)
language-ruby-on-rails, v0.25.0 (active)
language-sass, v0.56.0 (active)
language-shellscript, v0.22.4 (active)
language-source, v0.9.0 (active)
language-sql, v0.23.0 (active)
language-text, v0.7.1 (active)
language-todo, v0.28.0 (active)
language-toml, v0.18.0 (active)
language-xml, v0.34.9 (active)
language-yaml, v0.26.0 (active)

# Dev
No dev packages

Having trouble setting up on Windows

I'm having trouble completing step 5 in the readme.md.

  1. Open up the language-elm settings in Atom

I'm new to both Atom and Elm and I'm not sure whether my inability to find the settings is due to a missed step, a difference in platform or just something else I'm overlooking.

Elm syntax coloring and formatting for blocks

Elm syntax coloring and formatting for blocks.

As per https://groups.google.com/forum/#!topic/elm-discuss/HIdcbC0IOHk the blocks in Elm, like glsl blocks, are not formatted properly. It would be nice if they were not only syntax colored properly based on the embedded type (for known blocks like GLSL), but potentially even change the atom language within them (like how Atom's markdown auto-colors code fences properly based on the language).

Example GLSL block in a function:

fragmentShader : Shader {} Uniform Varying
fragmentShader =
    [glsl|
         precision mediump float;
         varying vec4 fragColor;

         void main () {
             gl_FragColor = fragColor;
         }
    |]

elm-oracle suggestions don't work on Windows 7

I have installed a fresh Atom 1.5.3 under Windows 7 Enterprise SP1. I did all as described at https://github.com/edubkendo/atom-elm. I added language-elm package through the editor. I also installed elm-oracle as global npm package.

For Windows where elm-oracle command returns two paths, one is pointing to elm-oracle, the second is pointing to elm-oracle.cmd. I tried both. None is working. When I try to get autocompletion I always get the same error:

Uncaught Error: No elm-oracle suggestions
/C:/Users/hipertracker/.atom/packages/language-elm/lib/elmOracle.js:144

Error: No elm-oracle suggestions
    at parseOutput (C:/Users/hipertracker/.atom/packages/language-elm/lib/elmOracle.js:125:11)
    at provideSuggestions (C:/Users/hipertracker/.atom/packages/language-elm/lib/elmOracle.js:27:27)
    at ChildProcess.<anonymous> (C:/Users/hipertracker/.atom/packages/language-elm/lib/elmOracle.js:62:9)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:817:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

The funny part is it works on OS X and on Windows 10. I have that problem only on Windows 7.

Uncaught Error: No elm-oracle suggestions

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.15.0 x64
Electron: 1.3.13
OS: Mac OS X 10.11.6
Thrown From: language-elm package 1.5.0

Stack Trace

Uncaught Error: No elm-oracle suggestions

At /Users/maurarodriguez/.atom/packages/language-elm/lib/elmOracle.js:125

Error: No elm-oracle suggestions
    at parseOutput (/packages/language-elm/lib/elmOracle.js:125:11)
    at provideSuggestions (/packages/language-elm/lib/elmOracle.js:27:27)
    at triggerExitCallback (/app.asar/src/buffered-process.js:322:11)
    at /app.asar/src/buffered-process.js:335:11
    at /app.asar/src/buffered-process.js:204:9)
    at emitOne (events.js:101:20)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:493:12)

Commands

     -0:54.9.0 core:select-all (input.hidden-input)
     -0:53.8.0 core:paste (input.hidden-input)
     -0:52 core:undo (input.hidden-input)
  4x -0:28.9.0 core:backspace (input.hidden-input)
     -0:03.0 core:select-up (input.hidden-input)
     -0:02.7.0 core:backspace (input.hidden-input)

Non-Core Packages

busy-signal 1.3.0 
elm-format 2.1.0 
intentions 1.1.2 
language-elm 1.5.0 
linter 2.1.0 
linter-elm-make 0.23.2 
linter-ui-default 1.1.0 
react 0.16.2 

Syntax highlight for glsl blocks

As you might know, the support of glsl is baked into the elm compiler, everything between [glsl| |] is coded in glsl language and elm builds a type signature for the enclosed shader code.

It would be nice to have syntax highlight for this.

Editing new file crashes

If I try to edit a new file, before saving it, I get an error.

  1. Edit new file (don't save it)
  2. Type something.

Atom Version: 1.1.0
System: Mac OS X 10.11.1
Thrown From: language-elm package, v1.3.0

Stack Trace

Uncaught Error: No elm-oracle suggestions

At /Users/andre/.atom/packages/language-elm/lib/provider.js:256

Error: No elm-oracle suggestions
    at noOutputFromOracleError (/Users/andre/.atom/packages/language-elm/lib/provider.js:227:10)
    at parseOutput (/Users/andre/.atom/packages/language-elm/lib/provider.js:256:11)
    at provideSuggestions (/Users/andre/.atom/packages/language-elm/lib/provider.js:59:15)
    at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:220:18
    at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:98:18)
    at emitOne (events.js:82:20)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:467:12)

Commands

     -0:48.3.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:47.7.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
  4x -0:47.3.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:13.8.0 core:close (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "ignoredNames": [
      ".git",
      ".svn",
      ".DS_Store"
    ],
    "themes": [
      "one-light-ui",
      "one-light-syntax"
    ],
    "excludeVcsIgnoredPaths": false,
    "disabledPackages": [
      "linter-xmllint"
    ]
  },
  "language-elm": {
    "elmOraclePath": "/Users/andre/.atom/packages/language-elm/node_modules/elm-oracle/bin/elm-oracle"
  }
}

Installed Packages

# User
autocomplete-elixir, v1.4.2
autocomplete-erlang, v1.1.1
autocomplete-python, v0.10.4
highlight-selected, v0.11.1
language-elixir, v0.5.2
language-elm, v1.3.0
language-erlang, v3.0.0
linter, v1.11.1
linter-clang, v3.3.0
linter-lua, v1.0.0
linter-pyflakes, v0.0.5
linter-pylint, v1.0.3
linter-python-pep8, v0.2.0
linter-shellcheck, v1.0.2
minimap, v4.16.0
python-isort, v0.0.7

# Dev
No dev packages

No Setting text field to enter Elm-Oracle path into (thus, no autocompletion)

In the attached screenshot can be seen: there is no place to enter the Elm-Oracle path and so, no Elm-Oracle functionality.

Things I tried to resolve the issue:

  1. Uninstall, reinstall from within Atom
  2. Uninstall, reinstall from CLI (apm install language-elm)
  3. Uninstall, remove the ~\.atom\.apm\language-elm folder, reinstall (both from inside Atom and the CLI)
  4. Trying to manually find the language-elm entry on settings.cson but to no avail, there was no such entry

What's more interesting is that on my work laptop I did install the plugin and had the text field and everything works superb. I tried the installs at the same day with only a few work-hours difference between them (and, of course, different machines).

Thanks in advance on how to make Elm-Oracle work.
noelmoraclesetting

Types get truncated

In the tooltip, it would be nice to always see the entire type (no matter how long)
screen shot 2015-10-15 at 2 28 02 pm

Support Elm 0.16

Since I upgraded Elm Platform to 0.16, the following error is thrown when activating autocomplete:

Atom Version: 1.1.0
System: Mac OS X 10.10.5
Thrown From: language-elm package, v1.3.0

Stack Trace

Uncaught Error: No elm-oracle suggestions

At /Users/thsoft/.atom/packages/language-elm/lib/provider.js:256

Error: No elm-oracle suggestions
  at noOutputFromOracleError (/Users/thsoft/.atom/packages/language-elm/lib/provider.js:251:10)
  at parseOutput (/Users/thsoft/.atom/packages/language-elm/lib/provider.js:278:11)
  at provideSuggestions (/Users/thsoft/.atom/packages/language-elm/lib/provider.js:72:67)
  at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:220:18
  at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:98:18)
  at emitOne (events.js:82:20)
  at Socket.emit (events.js:169:7)
  at Pipe._onclose (net.js:467:12)

Commands

     -1:40.1.0 core:undo (atom-text-editor.editor.is-focused)
  2x -1:29.7.0 editor:select-to-first-character-of-line (atom-text-editor.editor.is-focused)
  2x -1:29.2.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:28.9.0 core:save (atom-text-editor.editor.is-focused)
  3x -1:27.2.0 core:close (atom-text-editor.editor.is-focused)
     -0:37.3.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:37.2.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:36.6.0 core:move-to-bottom (atom-text-editor.editor.is-focused)
     -0:36.5.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
     -0:35.6.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:00.1.0 core:backspace (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "one-light-syntax"
    ]
  },
  "language-elm": {}
}

Installed Packages

# User
eclipse-keybindings, v0.8.0
language-elm, v1.3.0
linter, v1.10.0
linter-elm-make, v0.3.0
linter-jshint, v1.2.1
pigments, v0.18.1

# Dev
No dev packages

Folding block comments.

So far loving your addition to atom for Elm.

Don't know how hard this might be but is it possible to support folding of block comments ?

Even if its only block comments that limit themselves to these. (using regex patterns)

  • start with "^{-|? "
    • this one the | is optional its a marker for Elm documentation in comment.
  • end with "^-}$".

Working offline crashes atom-elm

Hello!
I noticed that working offline crashes the elm-oracle. I don't have time to look into this until after the holidays but I'm assuming that this is as simple as returning an empty string somewhere.

Thanks for the awesome package!

Atom Version: 1.2.4
System: Mac OS X 10.11.2
Thrown From: language-elm package, v1.3.0

Stack Trace

Uncaught Error: No elm-oracle suggestions

At /Users/ebaer/.atom/packages/language-elm/lib/provider.js:256

Error: No elm-oracle suggestions
    at noOutputFromOracleError (/Users/ebaer/.atom/packages/language-elm/lib/provider.js:227:10)
    at parseOutput (/Users/ebaer/.atom/packages/language-elm/lib/provider.js:256:11)
    at provideSuggestions (/Users/ebaer/.atom/packages/language-elm/lib/provider.js:59:15)
    at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47)
    at ChildProcess.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:235:18)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Commands

  2x -3:01.4.0 core:backspace (atom-text-editor.editor.is-focused)
     -3:00.9.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -3:00.9.0 snippets:expand (atom-text-editor.editor.is-focused)
     -3:00.9.0 docblockr:parse-tab (atom-text-editor.editor.is-focused)
     -3:00.9.0 editor:indent (atom-text-editor.editor.is-focused)
     -2:55.6.0 core:save (atom-text-editor.editor.is-focused)
     -1:46.4.0 core:move-up (atom-text-editor.editor.is-focused)
     -1:46.1.0 core:move-right (atom-text-editor.editor.is-focused)
     -1:11.8.0 core:save (atom-text-editor.editor.is-focused)
     -0:04.9.0 editor:toggle-line-comments (atom-text-editor.editor.is-focused)
     -0:04.3.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:03.5.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -0:03.5.0 snippets:expand (atom-text-editor.editor.is-focused)
     -0:03.5.0 docblockr:parse-tab (atom-text-editor.editor.is-focused)
     -0:03.5.0 editor:indent (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "autocomplete"
    ],
    "useReactEditor": true,
    "followSymlinks": true
  }
}

Installed Packages

# User
atom-beautify, vundefined
atom-handlebars, v1.3.0
autocomplete-paths, v1.0.2
docblockr, v0.7.3
file-icons, v1.6.13
language-elm, v1.3.0
minimap, v4.18.2
minimap-find-and-replace, v4.4.0
minimap-git-diff, v4.1.8
minimap-selection, v4.3.1
react, v0.12.10
sync-settings, v0.6.0
tabs-to-spaces, v1.0.1
theme-switcher, v1.1.0

# Dev
No dev packages

Uncaught Error: No elm-oracle suggestions

There are two errors with sending the correct command to elm-oracle in Windows:

In lib/elmOracle.js:

  1. The file paths need to be encased in strings in order to work with paths containing spaces. This can be fixed by replacing line 55 with var results = spawn(getCmdPath(), ['/c (', '"'+executablePath+'"', '"'+filePath+'"', prefix, ')'], options)
  2. For some reason windowsVerbatimArguments: true needs to be added to options. I don't know what this flag does.

Freature Request: Inline type inspection

Its a dream, but I'd like to be able to hover over anything and see a type stack a la FPComplete.

screen shot 2015-10-16 at 11 41 00 am

In Elm it could be something like:

foo : Signal Int
foo = Signal.map ((+) 1) sigInt

when the cursor is over map, the tooltip could say

: (a -> result) -> Signal a -> Signal result
: (Int -> Int) -> Signal Int -> Signal Int

Support symbols

It would be great if top-level declarations appeared as symbols in order to make "go to symbol" work.

Update for 0.18+

It looks like the repository is stale for quite some time, so let me ask for the status of this package.

There are several items for Elm 0.18+:

  • Syntax updates
  • Dropping elm-oracle support since it is no longer compatible (elmjutsu is actively updated and works great. Good replacement)

I am actually doing these in my fork (https://github.com/ymtszw/language-elm), so if some collaborators can handle PRs, I would like to. Although now the fork is quite large, it may take some time.

Also, I myself is (at least for now) actively using Atom for Elm development, so I would like to offer my hands for maintenance of the package, if existing members cannot afford their time. ❤️

Hope someone notices this!

Autocomplete stopped working

Seems like autocomplete for elm using elm-oracle stopped working.
How I can debug/troubleshoot to find out what could happen?

Linux Mint on 1.0.3 gets stuck in loop

Noticed this error and found the cause, but wasn't sure of the best fix. In provider.js:

      const exactDependenciesPath = path ? `${path}${sep}elm-stuff${sep}exact-dependencies.json` : '';

      if (path) {
        try {
          const stats = statSync(exactDependenciesPath);
          return path;
        } catch(e) 

The statSync will fail on a"valid" path because there is no leading /, as it has been split i.e. it tries to look for home/nick/dev/elm-charts/ as opposed to /home/nick/dev/elm-charts.

If you fix this by adding ${sep} to the beginning of the exactDependenciesPath, it still errors because here the cwd is again set without a / :

  const filePath = editor.getPath();
  const elmProjectPath = findClosestElmProjectPath(filePath.split(sep).slice(0, -1));
  const executablePath = atom.config.get('language-elm.elmOraclePath');
  const options = {
    cwd: elmProjectPath,
    env: process.env
  };

I fixed that by setting the cwd to sep + elmProjectPath, but I assumed that might not be cross OS enough so I thought I'd just make a bug :).

More instructions in readme?

I sat with @christinecha as she got Elm installed and started playing around with it for the first time. It was weirdly difficult to get syntax highlighting working for Elm in Atom though.

  1. She installed via npm but the highlighting did not work.
  2. She googled around to figure out where the heck apm is in the editor itself.
  3. When she finally found it, it said that language-elm was already installed.
  4. She uninstalled, and reinstalled through the UI.

Then it worked. I don't really know why it was that way, but I feel like having more comprehensive instructions in the README could save people a bunch of time. Maybe just saying how to get to the package search thing in the editor? Not really sure!

Having 32 symbols exported in a module messes up syntax highlighting for the entire file

I have a module with the following first line:

module Core.Array (Value, Zipper, value, toValue, do, toJson, firstZipper, lastZipper, lastZipperM, remove, map, indexedMap, active, zipper, append, prepend, mapAt, firstZipperThat, lastZipperThat, zipperAt, zipperAtM, moveUp, moveDown, update, countLeft, countRight, lefts, rights, firstZipperM, goPrev, goNext, decoder) where

(There are 32 export symbols.) As a result, the rest of the file is highlighted incorrectly (see image).

screen shot 2014-12-15 at 12 54 51 pm

Removing any one of the exported symbols so that there are 31 or fewer in the list makes the highlighting work correctly again (see image)

screen shot 2014-12-15 at 12 56 13 pm

Autocomplete gives different options than command-line elm-oracle

Just installed language-elm 1.0.3 ... Looks fabulous, thanks!

Autocomplete from atom seems to give inconsistent results as I type more input e.g.

image

vs. type another "f" (notice Effects missing in Atom above):

image

And results differ from elm-oracle called from command line:

image

vs. command line (notice foldp missing in Atom above)

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.