erlang-ls / erlang_ls

The Erlang Language Server
https://erlang-ls.github.io/
Apache License 2.0
626 stars 136 forks source link

nifs attribute completion #1505

Closed MarkoMin closed 1 week ago

MarkoMin commented 5 months ago

Description

Adds completion for -nifs attribute officially supported from OTP25

EDIT: dont merge yet, I have to fix completion inside "-nifs" attribute to behave similarly as inside "-export"

MarkoMin commented 5 months ago

I pushed the solution, but tests are missing ATM. It's not as elegant as I hoped, but did my best. It doesn't exclude functions already defined as -nifs. I tried to do it, but ended up too deeply in els code. If you have an idea how do to this more elegant, I'm all ears.

Will add tests when I find more time

plux commented 5 months ago

I tried out the feature locally and it works fine.

Seems like there some formatting issues. Please run rebar3 fmt and commit the changes.

If you find time to write some tests that would also be awesome :)

plux commented 1 week ago

I have opened a new PR for this here: https://github.com/erlang-ls/erlang_ls/pull/1537