Giter VIP home page Giter VIP logo

emacs-elixir's People

Contributors

andreas-roehler avatar anildigital avatar antifuchs avatar axelson avatar bbatsov avatar bokay avatar dgutov avatar edmz avatar gabrielelana avatar gausby avatar j3rn avatar jesenko avatar jsmestad avatar mattdeboard avatar mpanarin avatar nattuck avatar orb avatar pma avatar pragdave avatar rickhull avatar rranelli avatar sergeyklay avatar sirikid avatar sviridov avatar syohex avatar technomancy avatar tomterl avatar tonini avatar trevoke avatar victorolinasc 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emacs-elixir's Issues

Autocomplete gets de-activated when activating elixir-mode

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?

@doc %B""" is not recognized

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.

Correct indention inside of block after empty line

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

Indentation logic is unacceptably slow when processing large blocks of text

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.

Exceeding a certain line length breaks

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.

Wrong condition in elixir-mode-compile-file function

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

Syntax highlighting with camelCase function names breaks

Hi, a comment before an end keyword yields the following:

8-18-2014 15-24-05

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.

elixir-mode-tests file missing in ELPA

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!

Repository name

I think we should change the name of the emacs-elixir repository to something like elixir-mode or elixir.el.

Reasons are:

  • The original elixir-mode repository isn't anymore under maintenance.
  • The code of is out of date, there are also false adoptions in the code base of elixir-mode . (not up to date with the elixir language).
  • emacs-elixir is under maintenance and active development.

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

Add support for string interpolation.

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.

invalid-read-syntax ". in wrong context"

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

Documentation needed on how to run tests

There are multiple ways of performing the tests for elixir-mode:

  1. elixir-mode-run-tests
  2. ert itself has a few ways of running tests
  3. Several weeks ago I wrote a shell script so the tests could be run from the CLI

In either CONTRIBUTING.md or maybe in the README, how and when to use these techniques would be really helpful.

Need more tests for syntax highlighting

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.

Build tools need to be consolidated

I'm fine with just Rakefile being the center of gravity, so mostly all this needs is for rake release to:

  1. Run the tests. If those pass, continue.
  2. Invoke release.py to automatically update CHANGELOG.md
  3. Invoke its current functionality as normal.

Error using M-x elixir-mode-iex

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.

Improve indentation inside strings, parens, brackets, etc.

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:

  1. Incorrect grammar specification, perhaps, for "(" statements ")", but I'm not sure on that one.
  2. Something to do with tokenizing -> or ( as ;. If it's a semicolon now, try not making it a semicolon (see elixir-smie--implicit-semi-p).
  3. An elixir-smie-rule to handle this.

Indent problem

The following indention occurs in elixir-mode (20140815 installed last night from MELPA on Emacs 24):

selection_125

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. :-)

Broken syntax highlighting after a bare ? character

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

Indentation issue with function defined after requires

Here's a strange one. I'll be pleasantly surprised if you can reproduce with 24.4.

selection_126

defmodule RSS do
    require Enum
    require HTTPotion
    require Record  

                    def zip(list1, list2) when length(list1) == length(list2) do

Emacs 24.3.1, elixir-mode 1.4.8.

6 tests failed for Emacs 24.3.1

List of failed tests:

  • elixir-ert-indent-continuation-lines-with-comments/1
  • elixir-ert-indent-continuation-lines-with-comments/2
  • elixir-ert-indent-lone-keyword
  • elixir-ert-indent-fn-as-arguments
  • elixir-ert-indent-fn-in-assignment
  • elixir-ert-indent-last-commented-line

First three tests has same nature as issues #104 and #106.

Indentation issue inside case expression

image

def rstr(<<c::utf8, s::binary>>, <<c::utf8, sub::binary>>, i, l) do
    case prefix(sub, s) do
        true -> rstr(s, <<c::utf8, sub::binary>>, i+1, i)
                false -> rstr(s, <<c::utf8, sub::binary>>, i+1, l)
    end
end

Emacs 24.3.1 with elixir-mode 1.5.0.

Incorrect indentation with `use`

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.

Anonymous functions inside functions break indentation

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.

Debian 7 load module problem

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.

~r/"/ Breaks Syntax Highlighting

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!

Indentation issue after function def with comment on same line

Not sure if you'll be able to reproduce this one:

8-20-2014 13-07-44

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 with heredocs is less than ideal.

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.

General indentation issue with dots

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 :)

Tab completion in elixir-mode-iex

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.

Indentation of `fn` as arguments is dissatisfying

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

Lots of indentation issues

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

Continuation lines not correctly indented

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.

Comments in multi-line statements are not handled correctly

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))

Indent enters inifinite loop

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.

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.