-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Argument names in function calls will now show up as inlay hints. Inlay hints are disabled by default, enable by adding this to config: inlay_hints_enabled: true Additional changes: * Add functional API to submit job results to els_server * Improve completions by extracting argument names from spec. * Improve completions by extracting argument names from all function clauses. * Gracefully handle parsing of missing header file
- Loading branch information
Showing
23 changed files
with
659 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
-module(inlay_hint). | ||
-export([test/0]). | ||
|
||
-record(foo, {}). | ||
|
||
test() -> | ||
a(1, 2), | ||
b(1, 2), | ||
c(1), | ||
d(1, 2), | ||
lists:append([], []). | ||
|
||
a(Hej, Hoj) -> | ||
Hej + Hoj. | ||
|
||
b(x, y) -> | ||
0; | ||
b(A, _B) -> | ||
A. | ||
|
||
c(#foo{}) -> | ||
ok. | ||
|
||
d([1,2,3] = Foo, | ||
Bar = #{hej := 123}) -> | ||
ok. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-module(els_arg). | ||
-export([name/1]). | ||
-export([name/2]). | ||
-export([index/1]). | ||
-export_type([arg/0]). | ||
|
||
-type arg() :: #{ | ||
index := pos_integer(), | ||
name := string() | undefined, | ||
range => els_poi:poi_range() | ||
}. | ||
|
||
-spec name(arg()) -> string(). | ||
name(Arg) -> | ||
name("Arg", Arg). | ||
|
||
-spec name(string(), arg()) -> string(). | ||
name(Prefix, #{index := N, name := undefined}) -> | ||
Prefix ++ integer_to_list(N); | ||
name(_Prefix, #{name := Name}) -> | ||
Name. | ||
|
||
-spec index(arg()) -> string(). | ||
index(#{index := Index}) -> | ||
integer_to_list(Index). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.