Does Atom have auto-complete or snippets package like for CoffeeScript atom-ternjs? - coffeescript

I use Atom a lot, and atom-ternjs is really good for javascript deployment.
But now I work with a team use CoffeeScript, I really love it.
Does Atom have good auto-complete tools for CoffeeScript?

You can install a lint specifically for coffeescript. To install it, use the following command in your Command Prompt:
$ apm install linter linter-ui-default linter-coffeelint

Related

How to get started with OCaml on VSC?

I started learning OCaml several days ago. I installed everything and tested a small program on Atom which worked ok.
But I don't really understand how to work on VSC. I created a file 'test.ml',but how can I run it ?
Thanks in advance
Assuming VSC is Visual Studio Code (and you're on a Unix-like system):
If you want editing support such as auto-completions, you need to install OCaml Platform extension for VS Code by following installation steps outlined here. Note that the instructions indicate that you need to also have ocaml-lsp-server installed.
If you need to run test.ml as a program, you should do in the VS Code terminal:
$ ocamlc -o test test.ml # compile 'test.ml' into an executable 'test'
$ ./test # to run the program
Note that VS Code doesn't have a ready button to run an OCaml file as an executable (not yet at least).
Newcomers to OCaml are recommended to explore language either with ocaml or utop REPL.
How to get utop: Assuming you have opam installed, you should opam install utop. Aforementioned opam is a package manager for OCaml, that can also help you manage OCaml versions and is indispensable if you want to get serious about OCaml development.
Then you'll be able to launch utop in terminal, and inside utop, you can execute test.ml with
#use "test.ml"
assuming that utop was launched from the folder containing test.ml.
You should be able to do the same with ocaml REPL that is installed along with OCaml compiler, but it's much less convenient.

Markdown preview in emacs fails: (pandoc?) error 127

I am trying to create a markdown document in Emacs *.
It does highlight the syntax etc. and goes into Markdown mode (I am not quite sure if I installed that package or if it is standard issue)..
Problem:
When I try to create a preview (either via C-c C-c p or the GUI), it returns this error code:
markdown failed with exit code 127
Question
What does this error tell me? Is there a way to get a more complete error message?
The docs for markdown-mode suggest that it calls on an external library such as pandoc, which I have installed. According to these SO questions, pandoc can return this error code, but I could not quite establish what it means.
How do I fix this / what documentation should I go to?
I am pretty new to Emacs, so anything will help. Thanks!
*Emacs version 25.3.1 on a Mac (Sierra 10.12.6)
The simplest fix is likely to install the markdown package using your package manager.
I fixed this error for myself with:
$ brew install markdown
(on MacOS Mojave, at the bash command line). Brew installed the "bottle" markdown-1.0.1.mojave.bottle.tar.gz, after which C-c C-c p or M-x markdown-preview worked to export the markdown file and open a browser window showing the exported file.
On an Ubuntu 19 (and now 20.04 and 21.10) system, sudo apt install markdown worked too.
You could do the same thing with a symlink to pandoc's markdown, but a) this just worked, b) there's no fiddling with a potentially messed up manually created symlink, and c) it's tiny (a 36 KByte executable). Pandoc's markdown may support more "modern" markdown, though.

Elpy to allow pyenv to work on a project basis

I've used Emacs for all my coding projects so far. Soon I will start some python projects for the first time and would love to stick to Emacs for these as well.
I was looking into elpy which seems to provide already alot of desired functionality. The part I was not able to figure out completely is the following. I like to define virtual environments and python version to be used on a project basis. Let's say I start a project A, then I would use pyenv-virtualenv or pyenv-virtualenvwrapper to set it up
pyenv virtualenv 3.4.2 my-virtual-env-3.4.2
by doing this I've linked the python version 3.4.2 to that specific virtualenv / project. I have two questions regarding this in combination with elpy.
Question: This is a rather basic one. All the above can be achieved via the terminal. What is the advantage to emacs to support this? The workflow for me would be: Create project with associated virtualenv and python version. Activate virtualenv and start coding in emacs. If I need to install a package I will run pip in the terminal to ensure virtualenv is captured properly. There must be a reason why it's beneficial to support this in emacs. With my lack of knowledge I just don't see it :)
As pointed out there is for sure a good reason why we want emacs / elpy to support this. My second question would then be
**Question: How can I achieve this in emacs? Lokks like this blog has a solution. I was wondeirng if someone already tried this setup if it is a neat solution with makes sense conceptually. **
Well I strongly guess the goal is to use more features than just syntax highlighting: flycheck/flake8/linting, refactoring, elpy's test runner to use the right python version, install a pip package directly from emacs, stuff like this. You can carry on doing this in the terminal, but once you want an emacs feature, you'll need to set it up.
IĀ found two modes to do that (see wikemacs python page and doubled-checked on melpa): pyenv-mode (in melpa) and pyenv-mode-auto (change the version when there is a .python-version file).

Scala with VScode

I started to use vscode for python development. And I really like it, does anyone know how to extend VScode so I can write scala in it as well ?
At the bare minimum I need to get syntax highlighting working.
Scala works well in VS Code 2019.
There's official syntax highlighting, and a Language Server called Metals (which replaces Ensime which is mentioned in other answers).
There is one here:
https://github.com/IliyaTryapitsin/vscode-scala
You can add it by reading the readme there which is:
Run VSCode
code --enableExtensionGallery
Press F1 then input:
for scala installation
ext install scala
for sbt installation
ext install sbt
for snippets installation
ext install scalasnippets
If your NOT using Intellij or Eclipse and want to stick to VSCode, then I highly recommend Ensime & Ensime plugin below:
https://marketplace.visualstudio.com/items?itemName=dragos.scala-lsp
Also check out, www.ensime.org
It's a bit more involved to setup ensime env but still worth it.
Discussion of two is below here:
https://www.reddit.com/r/scala/comments/5eu9if/intellij_vs_ensime/
However, Intellij has improved a lot. So, the beauty contest is a matter of judgement call.
I have been switch back & forth between many variations (Emacs, Intellij, neovim, VSCode). It's a complicated language. So, I need all the help I can get!
If you dig into the applications path it looks to me to be extensible in .js, take a look at the javascript and typescript folders for example(though I haven't tried it yet)
Visual Studio Code does not have a language extensible story yet, but it could be coming soon.
https://code.visualstudio.com/Docs/languages#_common-questions
scala has official vs code scala extension

Emacs - let-alist unavailable

When I tried to install flycheck package on emacs24, it show error that let-alist1.0.1 unavailable. But I heard that let-alist is built-in package of emacs25, I wonder is there any work-around for emacs24?
let-alist is available from ELPA. Use
M-x list-packages
to pull up a list of available packages, then search for let-atlist (C-M-s as usual). Then install it. See also here.
Alternatively, you can download it from here and install it manually. ELPA is easier, though.