Thanks… but I couldn’t get it to work is this right?
(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration. You are free to put any user code."
(add-hook 'alchemist-mode-hook 'company-mode)
(global-linum-mode) ; Show line numbers by default
(global-set-key (kbd "M-3") '(lambda () (interactive) (insert "#"))) ; Allow hash to be entered
(setq-default dotspacemacs-themes '(codeschool spacemacs-dark))
)
Ok but this not exactly what I wanted. Yes this command evaluates current line but in new context.
But what I want is to load module(s)/mix project into iex (and also possible to reload these modules), and then run current selected text using code from these modules.
With vim, I’ve gotten used to using Shift+up arrow (Shift+down arrow) to scroll page up (and down).
Do you know how I can map these keys to obtain the same behavior in spacemacs ?
Is there something like StyleCop available to enforce Elixer style like for example this one?
Is it possible to autocorrect or apply the style to your code like proper indentation, use of parenthesis for functions etc. (as prescribed in the style) like for example:
# not preferred
def some_function arg1, arg2 do
# body omitted
end
to:
# preferred
def some_function(arg1, arg2) do
# body omitted
end
Is it possible to “desugar” code like for example:
I like Credo and I use it in some of my projects. That said, I don’t think alchemist should include support for credo, except for being able to enter a mix command and display the output in a buffer—which alchemist is already capable of doing. The reason behind my thinking: While I think Credo is good I could imagine other style checker libraries coming out that I might prefer in the future for any reason.
But—this is Emacs. We can customise it to our hearts content! This doesn’t need to be part of Alchemist. We can use some of the stuff in alchemist to shoehorn credo integration into our Alchemist installation. I got the following in my Emacs configuration where I configure my Elixir environment:
Having that ugly colors is typical for emacs in a terminal. It can get even worse than what you showed us, if you activate whitespace-mode.
But I haven’t seen that black on black until now…
And the special characters is a typical problem when having unicode in a windows terminal. It just doesn’t work, because windows has a different encoding there. Perhaps you can check if putty allows some conversion?