Giter Site home page Giter Site logo

ignatov / intellij-erlang Goto Github PK

View Code? Open in Web Editor NEW
728.0 50.0 120.0 69.69 MB

Erlang IDE

Home Page: https://www.jetbrains.com/help/idea/2018.2/getting-started-with-erlang.html

License: Other

Java 52.74% Erlang 29.26% HTML 17.75% Shell 0.01% Lex 0.25%
erlang ide erlang-plugin intellij

intellij-erlang's Introduction

Erlang plugin

Build Status Build Status

Erlang Plugin turns IntelliJ IDEA and other IntelliJ-based products (RubyMine, PyCharm, WebStorm, etc.) to a convenient Erlang IDE.

Pre-release builds

Download the latest successful plugin, hit 'Install plugin from disk...' at 'Plugins' page in 'Settings' of your IDE, and point it to the downloaded archive.

Note for Mac OS X users: you need to download the entire zip file, not a several jars (see Apple discussion forum).

Recent changes

The latest version

  • IntelliJ 2021.2 support
  • Erlang plugin could be installed and upgraded without restart

intellij-erlang's People

Contributors

ampleyfly avatar avesloguzova avatar deadok22 avatar dreamxyp avatar drobakowski avatar enouk avatar gsantomaggio avatar horkhe avatar ignatov avatar jakabac avatar kvakvs avatar mark-dev avatar mattvonvielen avatar piosok avatar revent avatar shisheng-1 avatar smolcoder avatar telezhnaya avatar vassilevsky avatar vovakyrychenko avatar wk8 avatar yidayoung avatar zewaren avatar zjhmale avatar zolotov avatar ztamizzen avatar zyuyou 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  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

intellij-erlang's Issues

more formatting errors

%1 extra space
-export_types([x/0, y/1]).

% brace extra tab
f() ->
    X = f(
        alpha,
        beta
    ).

%3 detab
-spec using(Module, Params, Callback) -> term() when
    Module :: module(),
    Params :: term(),
    Callback :: fun().

Atoms in module directive cause error highlights.

For example,

-module('ELDAPv3').

is valid. Yet plugin/idea complains that the file shoudl be declared in file named in a certain way, indicating an error in code.

This is in the latest 0.3 plugin.

Create project from source does not work

When I try to "create a project from source" and give it my Elang application directory as an input Idea claims that it finds nothing familiar in there.

P.S. Excited to see you plugin grow into a full-fledged language support. Keep up the good work.

ignore unused functions

eunit functions are exported by eunit parse_transform

it would be good to have ignore setting with regexp matches for unused symbols inspection for such cases.

Emacs style code formatting

Emacs code formatter is both de facto and de jure the industry standard. I believe that people will be more eager to move to your IDE if it formats the code the way they used to.

Extra comma in tuple syntax error showing in wrong place

This may be an edge case, but it confused me for a few minutes this morning.

The following code has a syntax error on line 14 (an extra comma after final tuple), but the plugin incorrectly flags the error as on line 12 and line 10. The erlang compiler gives me an error on line 14.

-module(foo).

-export([bar/0]).

-record (rec, { something }).

foo(Blah) -> Blah.

bar() ->
    F = fun({ Eep }) ->
        ok,
        #'rec'{ something = Eep } = Eep#'rec'.something,
        blah,
        foo([{a}, {b},])
    end,
    F.

Basic Rebar support

Please consider introducing Rebar support by that I mean:

  • Create project from external model should be able to parse the rabar.config file and create project layout based on it.
  • erl_opt from the rebar.config should be applied during compilation.
  • Dependencies defined in rebar config should be properly added to the libs project section, automatically retreived if missing, indexed to be available for code completion, and be used during compilation.

Nested records highlighted as errors

Imagine that we have the following record definitions:

-record(nrec0, {name = "nested0"}).
-record(nrec1, {name = "nested1", nrec0=#nrec0{}}).
-record(nrec2, {name = "nested2", nrec1=#nrec1{}}).

Since R14 it is allowed to write:

N2 = #nrec2{},
"nested0" = N2#nrec2.nrec1#nrec1.nrec0#nrec0.name,
N0n = N2#nrec2.nrec1#nrec1.nrec0#nrec0{name = "nested0a"},

But the second and all the following '#' are highlighted as errors.

formatting errors round 3

-attr([x / 1, y / 2]).

-spec f/2 :: (atom(),
    atom()) -> term().

f(A, B) when is_list(A), is_list(B);
    is_binary(A), is_binary(B) ->
    f().

f(A, B) 
    when is_list(A), is_list(B);
    is_binary(A), is_binary(B) ->
    f().

Cannot Detect SDK Version

On both Linux CentOS and OSX Mountain Lion, when attempting to add Erlang SDK, get an error saying that "Cannot Detect SDK Version" - "Probably SDK installed in '/opt/local/installs/erlang' is corrupt"

The version is not corrupt, works just fine.

The problem went away, when selected ' /opt/local/installs/erlang/lib/erlang/' instead. Without explicit documentation of such, it is difficult to know and guess that this is the directory that needs to be provided in order for it to work.

Included record incorrectly highlighted as error

The last line has the record name highlighted with the error "Unresolved record 'msg_full_object'".

foo.hrl:

-record(msg_full_object, { action }).

foo.erl:

-module(foo).
-include("foo.hrl").
-export([foo/0]).
foo() -> #'msg_full_object'{ action = undefined }.

Support for quick help (Ctrl+Q) for standard functions

When I press Ctrl+Q on a module or a function name a window should open with documentation on the subject. That works only for methods and functions defined in my project, but not for those defined e.g. in stdlib.

Type specification is highlighted as error

If a function type specification contains when clause then the first word after it is highlighted as error. E.g.:

-spec expect(Mod, Func, Expect) -> ok when
      Mod :: atom() | [atom()],              % <-- Mod is highlighted as an error
      Func :: atom(),
      Expect :: StubFun | [ClauseSpec],
      StubFun :: fun(),
      ClauseSpec :: {ArgPatterns, RetSpec},
      ArgPatterns :: [term() | '_'],
      RetSpec :: term() | ret_spec().

Add Integrated Testing

Just like RubyMine, I'm pretty sure you know exactly what I mean :)

I wish support was added for:

  • specific single test
  • all tests related to a module
  • common tests
  • dialyzer

r.

fun M:F/A does not work right

When you define a fun as fun M:F/A then it is highlighted as error. If we have:

-module(mod1).
-export([func1/0]).
func1() -> ok.

Then:

-module(mod2).
func2() -> ok.
error_here() ->
    F1 = fun mod1:func2/0,    % no error here (probably because func2 is defined in this module), but it should be since no func2 in mod1. 
    F2 = fun mod1:func1/0.    % func1/0 is highlighted as error, but it should not.

Note that in place of explicit module and function names it should be possible to use Variables and Marcos. e.g. fun Mod:Func/Arity and fun ?MOD:?FUNC/?ARITY.

IDEA chokes on exprecs.erl

It appears easy to reproduce.

git clone git://github.com/esl/parse_trans.git

Then create new project out of the cloned repo.

Open file src/exprecs.erl

At this point IDEA starts spinning CPU and further interactions with it are pointless.

almost forgot to mention: on mac IDEA 11.1

Tab autocomplete doesn't overwrite entire function

Put your cursor after the 'f' in 'foo' in the export statement and press ctrl-space. Hit tab to accept and overwrite the selected completion. It doesn't overwrite the complete function and leaves 'foo/0/0'.

-module(foo).

-export([foo/0]).

foo() ->
    ok.

Supports auto indentation

It would be very usable to set a cursor after Enter pressed and separate menu item "Format code".

Settings/Code Style/Erlang format doesnt look working

settings doesn't have effect. Example - unchecking setting 'Space around assignment" doest actually reformat that way.

Another point this option is not really correct regarding erlang syntax because of

X=<<"a">>.

is syntactically illegal. So having in unchecked will introduce compilation errors for

X = <<"a">>.

formatting errors

All this examples will be "detabbed".

-module(format_errors).

-export([comprehension/0,
    record/0]).

-spec f/1 :: (atom()) ->
    atom().

comprehension() ->
    [X ||
        Y <- [1,2,3],
        X <- Y
    ].


record() ->
    #x{
        a = 1,
        b = 2
    }.

Compile to ebin directory

It seems that it only wants to compile to "Project Compiler Output" directory with production/test subdirectories. It would be fantastic if it compiled to ebin directory

Code Reformatting

I'd be nice to have a way to automatically indent code in a module, on a single key press (again, RubyMine docet).

r.

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.