elixir-editors / emacs-elixir Goto Github PK
View Code? Open in Web Editor NEWEmacs major mode for Elixir
Emacs major mode for Elixir
It seems that whenever I activate elixir-mode
my auto-complete-mode
gets turned off. This doesn't happen with any other mode since I have enabled global-auto-complete-mode
. Very strange behavior, I haven't been able to find the cause myself. Does anyone else have the same problem?
in system.ex
, there is the following code:
@doc %B"""
Returns a writable temporary directory.
It searches for directories in the following order:
1. The directory named by the TMPDIR environment variable
2. The directory named by the TEMP environment variable
3. The directory named by the TMP environment variable
4. `C:\TMP` on Windows or `/tmp` on Unix
5. As a last resort, the current working directory
Returns nil if none of the above are writable.
"""
def tmp_dir do
write_env_tmp_dir('TMPDIR') ||
write_env_tmp_dir('TEMP') ||
write_env_tmp_dir('TMP') ||
write_tmp_dir("/tmp") ||
((cwd = cwd()) && write_tmp_dir(cwd))
end
it breaks font locking. If the %B
is removed, highlighting works as expected.
Regular expressions seem to fool the indentation, e.g.:
match = Regex.named_captures ~r/^matt: (?<ct>\d+)$/mg, data
case match do
Additionally the syntax highlighting is apparently not registering the ~r//
syntax either.
Currently the indention after empty lines inside and after blocks aren't working as excepted.
Instead of:
a = 2
b = a + 3
c = a + b
We got:
a = 2
b = a + 3
c = a + b
And
Instead of:
defmodule FooBar do
def foo do
if true, do: IO.puts \"yay\"
20
end
def bar do
if true, do: IO.puts \"yay\"
20
end
end
We got:
defmodule FooBar do
def foo do
if true, do: IO.puts "yay"
20
end
def bar do
if true, do: IO.puts "yay"
20
end
end
/cc @antifuchs
For what I would consider very simple code, it takes an intolerably long time to process indentation:
defmodule Eventcapture.App do
use Application.Behaviour
def start(_type, _args) do
x = ?\"
y = "Hello"
z = 1 + 2
match = ~r/foo/
case {1, 2, 3} do
{4, 5, 6} ->
"No Match"
{1, x, 3} ->
"Bind x to 2"
_ ->
"Match anything"
end
case {1, 2, 3} do
{4, 5, 6} ->
"No Match"
{1, x, 3} ->
"Bind x to 2"
_ ->
"Match anything"
end
Eventcapture.Sup.start_link
end
def stop do
if (x > 1), do: "Hey", else: "What"
x = 1
end
end
defmodule Eventcapture.Sup do
use Supervisor.Behaviour
def start_link do
:supervisor.start_link({ :local, __MODULE__ }, __MODULE__, [])
end
def init([]) do
tree = [ worker(Eventcapture.DBConn, []) ]
supervise(tree, strategy: :one_for_all)
end
end
Pressing C-x h takes about 3 seconds on my fairly beefy machine. I imagine this is due to how elixir-smie-next-token
is iterating over the tokens. I have noticed many, many times when stepping through the function calls while troubleshooting various indentation issues that there is a lot of convoluted looping.
I've been consulting octave and ruby-mode to see how they do their "next token" functions and it's much different. Presumably, faster as well.
Hi!
I've found a bug. The expected indentation of the code below is:
:test.call([dsadsa: :test.call("dsadsa"),
dsadsa: :test.call("sada")])
but emacs gives me:
:test.call([dsadsa: :test.call("dsadsa"),
dsadsa: :test.call("sada")])
Elixir allows 8 different delimiters for regex:
~r/hello/
~r|hello|
~r"hello"
~r'hello'
~r(hello)
~r[hello]
~r{hello}
~r<hello>
We should support proper highlighting for each of these.
It reproduces frequently enough that working with Emacs and Elixir is nigh unbearable at times. I don't have hard repro steps but it always occurs when I exceed a certain line length. My workflow includes the standard whitespace mode on as well as evil.
What ends up happening is the mode attempts to generate a ton of junk into the buffer in a crazy nonterminating loop. This hangs the process.
The following code block will break syntax highlighting:
a = "" <> "?"
hi,
The elixir-mode-compile-file
in elixir-mode.el
are doing a false condition about the compiler-output.
I also would recommend to use the emacs own compile function by compile.el
.
The comment about the function is "Elixir mode compile and save current file.". But what about extend the function to not only compile but also run it if it a *.exs
file for example?
here the wrong condition: (when (string= compiler-output "")
(defun elixir-mode-compile-file ()
"Elixir mode compile and save current file."
(interactive)
(let ((compiler-output (shell-command-to-string (elixir-mode-command-compile (buffer-file-name)))))
(when (string= compiler-output "")
(message "Compiled and saved as %s" (elixir-mode-compiled-file-name)))))
cheers
Hi, a comment before an end keyword yields the following:
def fooBar do
:foo
# trailing comment
end
To provoke the error I had to try indenting the comment after writing the end keyword.
Also, not sure why the camelcase in the function name is causing a change to the syntax coloring. Was going to wait until I could view it on a pure Linux setup to report it (currently using Windows, Cygwin and Console2 to access a Linux box over ssh), but then I saw the comment indentation bug so I figured I'd throw it in too.
Using elixir-mode 1.4.6 on Emacs 24.
Hi there,
When I run elixir-mode-run-tests
, I get the following error:
Cannot open load file: elixir-mode-tests
Upon further inspection, it appears that elixir-mode-tests file is missing from the elpa repository. I tried removing the package and re-install elixir-mode, and it's still not there.
Thanks!
I think we should change the name of the emacs-elixir repository to something like elixir-mode
or elixir.el
.
Reasons are:
What do you mean @antifuchs, I would like to start fresh and give the whole thing a push. Or is there a option to create a complete new elixir-mode?
cheers
sam
Currently, interpolated variables do not have any special syntax highlighting. This is bad.
@lunaryorn has an excellent guide here that could help immensely in getting this done.
While attempting to load elixir-mode from both the 1.3 and 1.2 versions of the code, I receive the error in the subject line. When I run --debug-init at start-up, it directs me to line 262 of elixir-smie.el:
(`(,_ . ,(or `"COMMA")) (smie-rule-separator kind))
I tinkered around with parenthesis placement, but was unable to troubleshoot the issue further. Sadly, my emacs-lisp skills are pretty poor, so I'm unable to give further diagnostic help. I'm running emacs 23.3.1 on Ubuntu 12.04 if that helps at all.
Thanks,
Todd
There are multiple ways of performing the tests for elixir-mode:
elixir-mode-run-tests
ert
itself has a few ways of running testsIn either CONTRIBUTING.md or maybe in the README, how and when to use these techniques would be really helpful.
When following examples from Elixir's getting started guide, it's useful to start IEx using iex -S mix
.
There are currently a total of two tests for syntax highlighting/fontification. I would like to see many more.
A good starting point for a contributor would be to add tests that capture the behavior of all the currently open issues marked with bug
and syntax-highlighting
.
Whenever I try to indent a line, emacs will without fail get stuck at about ~100% CPU utilization and won't respond to any more input.
I thought that it very well could be SMIE being confused about the context, as "defmodule" is not highlighted, but the same happens no matter the location.
I'm using Cocoa Emacs 24.3 (9.0) (http://emacsformacosx.com/emacs-builds/Emacs-24.3-universal-10.6.8.dmg) under OS X 10.7.5.
I'm fine with just Rakefile
being the center of gravity, so mostly all this needs is for rake release
to:
release.py
to automatically update CHANGELOG.md
Error using M-x elixir-mode-iex. There something about my path not being set. However, it's set properly when I search for the specified command, iex.
Currently indentation inside open-parenthesis
syntax entities (e.g. (
, [
, etc.) is very unsatisfying:
e = Enum.map(value, fn (value) ->
do_something()
end)
It should work like this:
e = Enum.map(value, fn (value) ->
do_something()
end)
I believe this is a matter of:
"(" statements ")"
, but I'm not sure on that one.->
or (
as ;
. If it's a semicolon now, try not making it a semicolon (see elixir-smie--implicit-semi-p
).elixir-smie-rule
to handle this.The following indention occurs in elixir-mode (20140815 installed last night from MELPA on Emacs 24):
The second Record.defrecord line really wants to move to the right. Doesn't seem to matter what I do with the parentheses.
I'm a total Elixir n00b (and I'm not much better with Emacs!), so apologies if this whole thing's my fault. :-)
Here's a conversation I had with @antifuchs:
[12:58:37] <betawaffle> it seems to mark everything that comes after with the string coloring
[12:58:39] <antifuchs> ah (:
[12:58:49] <antifuchs> that seems dissatisfying
[12:58:54] <antifuchs> can you give me an example?
[12:59:06] <antifuchs> also, which emacs version are you on?
[12:59:07] <betawaffle> sure
[12:59:41] <betawaffle> 24.3.50
[13:00:31] <betawaffle> well, if i type ?x -> x
[13:00:42] <betawaffle> both the -> and the next x are also "string" color
[13:01:11] <betawaffle> i think it only fixes itself if i kill the buffer and re-open it
[13:02:02] <betawaffle> so, i tried making ? a prefix character, and adding an entry to the keyword table thing
[13:02:09] <betawaffle> to match those expressions
[13:02:38] <betawaffle> and that worked, but it didn't fix the indentation after a ?\b
[13:03:08] <betawaffle> anything with a \ in it messes up indentation, unless the \ is in a string or something
[13:06:53] <betawaffle> any ideas?
[13:06:55] <antifuchs> that sounds about right
[13:07:21] <antifuchs> I think that behavior means that the syntax-propertize thing is buggy…
[13:07:23] <antifuchs> let me test
[13:09:43] <antifuchs> hm, yeah, that does look completely wrong.
[13:09:46] <antifuchs> grump
[13:10:07] <antifuchs> so it doesn't syntax-color everything after the ?x as a string
[13:10:20] <antifuchs> but the case indent is completely bad
[13:10:50] <betawaffle> well, it does, but only for a second, and then it doesn't get reset back to default color
[13:11:23] <betawaffle> it's like the property is sticking to it
[13:11:28] <antifuchs> hm, not on this end. hmmm. argh
[13:11:37] <antifuchs> I was testing on my local syntax highlighting branch
[13:11:46] <betawaffle> so you type ?xx and the second x is regular?
[13:11:49] <antifuchs> so, yay, it's working in the new world! isn't that something? ):
[13:12:02] <betawaffle> new world?
[13:12:15] <antifuchs> hah, the one where elixir will be able to deal with %r{} and such
[13:12:20] <antifuchs> elixir-mode that is
[13:12:24] <antifuchs> anyway - not there yet
[13:12:36] <antifuchs> ?xx is a syntax error anyway, I believe (:
[13:12:40] <antifuchs> ?\x isn't though
[13:12:50] <betawaffle> well yea, but does it highlight correctly?
[13:13:24] <betawaffle> lemme take a screenshot
[13:13:31] <antifuchs> it depends on when you add the ?, actually (:
[13:13:49] <antifuchs> hard to know what's correct for syntax errors. I'd say nasal daemon advisory is in effect
[13:15:40] <betawaffle> well, ?x -> 1 is not a syntax error
[13:15:47] <betawaffle> and the -> 1 are red
[13:15:48] <antifuchs> that's right
[13:16:00] <antifuchs> that looks correct on my end, but there are local changes that affect it
[13:16:14] <betawaffle> what are the local changes?
[13:16:25] <antifuchs> let me put them on a branch real quick
[13:19:27] <antifuchs> https://github.com/antifuchs/emacs-elixir/compare/support-more-sigils is it
[13:20:22] <betawaffle> oh hey, this looks good
[13:21:28] <antifuchs> I think the case indentation after ?b -> x is still messed up, but that might be a better starting point (:
[13:21:40] <betawaffle> yea
[13:22:59] <betawaffle> so, is there a good way to reload the mode stuff when I change something?
[13:23:12] <betawaffle> i've just been restarting emacs :(
[13:23:40] <antifuchs> M-x load-file RET RET should get you mooooost of the way there - but some things (old/renamed variables) may still linger and cause trouble
[13:24:09] <antifuchs> most of the time I change expressions (and reload them with C-M-x) until stuff seems to work, then restart and test on a clean slate
[13:24:15] <antifuchs> also, ert tests have helped me a lot
[13:24:42] <betawaffle> http://cl.ly/image/3p1b3y3S3G0T
[13:25:06] <antifuchs> yeah, that case is totally out of whack
[13:25:10] <betawaffle> i typed the one where my cursor is after opening the file
[13:25:25] <antifuchs> gruuuuuump
[13:25:41] <antifuchs> yep, I see it too
[13:25:45] <betawaffle> what version of emacs are you on?
[13:25:55] <antifuchs> 23.3.1
[13:26:12] <antifuchs> yeah, I'm sure syntax-propertize must be buggy there
[13:26:27] <antifuchs> you could edebug that function & step through it
[13:26:41] <betawaffle> how do i do that?
[13:27:43] <antifuchs> ah, with the point inside the function elixir-syntax-propertize, M-x edebug-defun RET, then trigger something that would call it (i.e. insert chars in that elixir buffer) - and a buffer will pop up where you can step through the code with SPC
[13:27:51] <antifuchs> press "c" to just continue
[13:27:54] <antifuchs> edebug is amazing (:
[13:29:34] <betawaffle> ok, so im in the debug after typing ?x SPC
[13:30:23] <antifuchs> yay
[13:30:45] <antifuchs> it should show you what it's doing in the other buffer (mostly, where point moves when it does its thing)
[13:32:53] <betawaffle> what is supposed to be reseting the rest to normal color?
[13:33:24] <betawaffle> even newlines aren't clearing it away now
[13:33:39] <antifuchs> nothing - it's supposed to be normal already; the thing that adds the string fontification should be that last statement at the end
[13:34:30] <betawaffle> ok, so, is it supposed to be colored like a string when I type the ?
[13:34:50] <betawaffle> on a brand new line, i type ? and the ? is string-colored
[13:35:01] <betawaffle> then i type the x and the x is string colored too
[13:35:11] <betawaffle> then i type SPC and it goes into debug
[13:35:18] <antifuchs> not necessarily, I believe. only after it finds a non-space char afterwards. Hrm.
[13:35:54] <betawaffle> sounds like something else is causing it then
[13:36:06] <betawaffle> your function isn't buggy!
[13:36:12] <antifuchs> *phew!*
[13:36:18] <antifuchs> yeah, possibly some conflicting font-lock regex maybe?
[13:36:19] <betawaffle> but what's causing it :(!
[13:36:27] <antifuchs> I'm suuuuper suspicious of those regexen
[13:36:33] <betawaffle> how would I find it?
[13:36:50] <antifuchs> that's what I've been asking myself also ):
[13:37:04] <antifuchs> I guess regex-based font-locking isn't sustainable /:
[13:37:05] <betawaffle> is there a way to get the whole mapping?
[13:37:41] <antifuchs> elixir-mode-font-lock-defaults is it
[13:38:21] <antifuchs> but together with the syntax properties, the only way to get the ultimate fontification is to describe-char the thing you are looking at
[13:38:59] <betawaffle> oh, didn't know about describe-char
[13:39:11] <antifuchs> it's pretty useful for this (:
[13:39:35] <betawaffle> ok, how do i un-debug the function now?
[13:39:37] <antifuchs> I believe there's a method for getting the ultimate char syntaxes for each char in a buffer, but not as a command (and I forget what it was)
[13:39:53] <antifuchs> ah, press C-M-x with point inside it
[13:40:14] <antifuchs> if there's still a debugger running, hit c to continue for the last time, and it'll not re-debug
[13:41:26] <betawaffle> yea, the newline has string-face
[13:42:20] <antifuchs> what the
[13:43:29] <betawaffle> and when i type ? then a whole bunch of spaces, then try to do a new line, emacs freezes, and i have to C-g a whole bunch
[13:43:39] <antifuchs> wow ):
[13:43:52] <antifuchs> -that- would sound like a bug in that function
[13:48:03] <betawaffle> ok, so more data
[13:48:08] <betawaffle> if i type x x
[13:48:23] <betawaffle> then go back between the xs
[13:48:37] <betawaffle> right before the second x and type a ?
[13:48:45] <betawaffle> the ? and x go red
[13:48:49] <betawaffle> then if i delete the ?
[13:48:53] <betawaffle> the x stays red
[13:49:07] <betawaffle> if before, with the 2 white xs
[13:49:21] <betawaffle> i go just after the first x, with a space before the second
[13:49:25] <antifuchs> ugh, yep.
[13:49:25] <betawaffle> and type the ?
[13:49:36] <betawaffle> the ? goes red, but the second x stays fine
[13:49:43] <antifuchs> that must be some incremental-syntactification thing in emacs
[13:49:58] <antifuchs> oh god, we've built a house of cards on quicksand!
[13:50:28] <betawaffle> oh sorry, the ? doesn't go red if im right after the first x
[13:50:33] <betawaffle> only if i have a space after it
[13:50:41] <betawaffle> and before the second
[13:51:05] <betawaffle> and!
[13:51:14] <betawaffle> if i do that thing with x ? x
[13:51:25] <betawaffle> and start typing before the second x
[13:51:31] <betawaffle> those chars are red like the ?
[13:51:45] <betawaffle> but the original second x stays fine
[13:52:13] <betawaffle> they are inheriting the text properties from the previous character
[13:52:42] <betawaffle> but none of this happens without that function
[13:53:03] <betawaffle> when i empty out the body, as i did in my branch, the ? things never get colored
[13:53:29] <antifuchs> hmmm, wonder if there's some stickiness to it
[13:53:31] <antifuchs> hm hm hm
[13:55:37] <antifuchs> ok, I don't completely get it right now either - now just typing ?x in an elixir buffer font-locks as string forever after
[13:56:07] <betawaffle> yea
[13:56:17] <antifuchs> seems like I ran out of brain juice for now… can you add an issue about this? Feel free to just paste this convo (:
[13:56:27] <betawaffle> ok
List of failed tests:
elixir-mode seems to think a .
in a use
expression is the beginning of a new scope and indents accordingly:
defmodule Banana do
use GenServer.Behaviour
def elixir_mode_indents_to_here do
1 + 1
end
In other words, it aligns the next line to the period.
Code that should look like this:
defmodule FooMod do
def foo do
fn(a, b) -> a + b end
end
end
actually looks like this:
defmodule FooMod do
def foo do
fn(a, b) -> a + b end
end
end
The anon function's end
is being treated as the closing of foo
method.
Referred by @edmz
Emacs version:
GNU Emacs 23.4.1 (i486-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-09-09 on murphy, modified by Debian
What:
eval-buffer elixir-smie.el
Partial trace:
Debugger entered--Lisp error: (invalid-read-syntax ". in wrong context")
eval-buffer() ; Reading at buffer position 11795
call-interactively(eval-buffer t nil)
Fix:
;; (`(,_ . ,(or `"COMMA")) (smie-rule-separator kind))
and some more lines with `.
I'm not qualified for propper fix. Please take care of it.
It does not issue "MATCH-STATEMENT-DELIMITER"
tokens at all in its current state for pattern matching statements separated by blank lines. However, if I change this line:
(not (or (string= "\n" token) (string= ";" token))))
to this:
(not (string= ";" token)))
it emits the tokens fine.
Howdy,
It looks like ~r/"/
doesn't work as expected. It will cause everything after the "
to be treated as a string. I didn't test, but it would probably be worth checking the behavior of '
as well.
Thanks!
Not sure if you'll be able to reproduce this one:
def foo() do # comment
:foo
end
Emacs 24.3.1 with elixir-mode 1.4.8.
If you can't reproduce, I'll try to track down the source for Emacs 24.4.50.2 and see if it behaves any differently. I looked for it a couple of days ago unsuccessfully, didn't spend too much time on it though. Any pointers would be appreciated.
Indentation is not where I want it for @doc
@moduledoc
and ~s
syntax.
When pressing enter after a """
, I want the cursor to align with @doc
:
defmodule Foo.Bar do
@moduledoc """
X <--- cursor should align here automatically
X <--- ditto
""" # <-- ditto
Right now the cursor just goes to the beginning of the line (column 0) which is annoying. Thankfully however it can be manually aligned without interference from any auto-indentation busy-bodying.
There seems to be an indentation issue with dots inside lists, for example
For example, a list of floats, say:
[1.2, 3.4]
when broken up gets wrongly indented like
[1.2,
3.4]
.. and there is actually a couple of blanks before 3.4 but I am down trying to use markdown :)
When I run the elixir-mode-iex
, I get the following:
Warning: could not run smart terminal, falling back to dumb one
Eshell V6.1 (abort with ^G)
This probably means I can't get tab completion inside iex. When I run iex inside ansi-term, tab completion works as expected.
Currently, the indentation of fn
bodies isn't great:
It should look like:
f = fn x, y ->
x + y
end
and:
Enum.map 1..10, fn x ->
x + 1
end
But it looks like:
f = fn x, y ->
x + y
end
and
Enum.map 1..10, fn x ->
x+1
end
100% of the indentation test cases fail for me:
Selector: "^elixir-ert-.*$"
Passed: 0
Failed: 21 (17 unexpected)
Skipped: 0
Total: 21/21
Started at: 2014-06-29 16:25:29-0700
Finished.
Finished at: 2014-06-29 16:25:29-0700
FFfFFFffFFFFfFFFFFFFF
F elixir-ert-indents-after-empty-line
Buffer: *Test buffer (elixir-ert-indents-after-empty-line): (Expected)*<2>
(void-function flymake-elixir-load)
F elixir-ert-indents-continuation-lines
Buffer: *Test buffer (elixir-ert-indents-continuation-lines): (Expected)*<2>
(void-function flymake-elixir-load)
F elixir-ert-indents-continuation-lines-with-comments/2
Buffer: *Test buffer (elixir-ert-indents-continuation-lines-with-comments/2): (Expected)*<2>
(void-function flymake-elixir-load)
F elixir-ert-indents-do-blocks
Buffer: *Test buffer (elixir-ert-indents-do-blocks): (Expected)*<2>
(void-function flymake-elixir-load)
F elixir-ert-indents-do-blocks-after-linebreak
Buffer: *Test buffer (elixir-ert-indents-do-blocks-after-linebreak): (Expected)*<2>
(void-function flymake-elixir-load)
F elixir-ert-indents-function
Buffer: *Test buffer (elixir-ert-indents-function): (Expected)*<2>
(void-function flymake-elixir-load)
F elixir-ert-indents-function-calls-without-parens
Buffer: *Test buffer (elixir-ert-indents-function-calls-without-parens): (Expected)*<2>
(void-function flymake-elixir-load)
F elixir-ert-indents-if
Buffer: *Test buffer (elixir-ert-indents-if): (Expected)*<2>
(void-function flymake-elixir-load)
F elixir-ert-indents-if-else
Buffer: *Test buffer (elixir-ert-indents-if-else): (Expected)*<2>
(void-function flymake-elixir-load)
F elixir-ert-indents-list-argument-continuation-lines-nicely
Buffer: *Test buffer (elixir-ert-indents-list-argument-continuation-lines-nicely): (Expected)*<2>
(void-function flymake-elixir-load)
F elixir-ert-indents-records-correctly
Buffer: *Test buffer (elixir-ert-indents-records-correctly): (Expected)*<2>
(void-function flymake-elixir-load)
F elixir-ert-indents-try
Buffer: *Test buffer (elixir-ert-indents-try): (Expected)*<2>
(void-function flymake-elixir-load)
F elixir-ert-indents-try/after
Buffer: *Test buffer (elixir-ert-indents-try/after): (Expected)*<2>
(void-function flymake-elixir-load)
F elixir-ert-indents-try/catch/after
Buffer: *Test buffer (elixir-ert-indents-try/catch/after): (Expected)*<2>
(void-function flymake-elixir-load)
F elixir-ert-skip-backwards-over-comments
Buffer: *Test buffer (elixir-ert-skip-backwards-over-comments)*<2>
(void-function flymake-elixir-load)
F elixir-ert-skip-forwards-over-comments
Buffer: *Test buffer (elixir-ert-skip-forwards-over-comments)*<2>
(void-function flymake-elixir-load)
F elixir-ert-treat-comments-the-same-as-whitespace-backwards
Buffer: *Test buffer (elixir-ert-treat-comments-the-same-as-whitespace-backwards): With comment*<2>
(void-function flymake-elixir-load)
Also, of course, all the indentation is always wrong when I edit. What's going on? I am using the latest master HEAD version
Expressions like:
write_env_tmp_dir('TMPDIR') ||
write_env_tmp_dir('TEMP') ||
write_env_tmp_dir('TMP') ||
write_tmp_dir("/tmp") ||
((cwd = cwd()) && write_tmp_dir(cwd))
have their continuation lines indented to the level of the first line. I believe that's because there are currently no provisions in place to consider an OP2 at the end of the line a continuation marker.
Hi!
@mattdeboard I guess yours release script should also update package version at this two lines 1, 2.
Lines with to-end-of-the-line comments can sometimes cause the nested lexer to go wild & scan to the end of the buffer for the next token. Examples in the indents-continuation-lines-with-comments
test.
Examples:
def foo do #bla
oh_noes
end
write_env_tmp_dir('TMPDIR') || # foo
write_env_tmp_dir('TEMP') ||
write_env_tmp_dir('TMP') ||
write_tmp_dir("/tmp") ||
((cwd = cwd()) && write_tmp_dir(cwd))
Should be:
defmodule Foo
def bar do
2
end
# last line
end
Is:
defmodule Foo
def bar do
2
end
# last line
end
I have this code in my macors.exs
file:
defmodule Unless do^
end
^
is position of my cursor. I am hitting enter and emacs hangs with 100% processor usage. I tried debug-on-quit
and it gave me this:
Debugger entered--returning value: nil
looking-at("^[ ]*end$")
elixir-mode-indent-line()
indent-according-to-mode()
Package installed from melpa: http://melpa-stable.milkbox.net. I am using emacs24.3 on OSX.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.