Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erlang LS crash when source code file use erlfmt pragma noformat #1482

Closed
eoskblo opened this issue Jan 10, 2024 · 0 comments · Fixed by #1483
Closed

Erlang LS crash when source code file use erlfmt pragma noformat #1482

eoskblo opened this issue Jan 10, 2024 · 0 comments · Fixed by #1483
Labels
bug Something isn't working

Comments

@eoskblo
Copy link

eoskblo commented Jan 10, 2024

Describe the bug
Erlang LS picks up erlfmt pragmas when using Erlang LS on erlang source files that contain erlfmt pragmas. Pragma noformat causes crash in Erlang LS.

To Reproduce
Using Erlang LS with source file that use erlfmt pragma "noformat" causes a crash in Erlang LS server. The erlfmt code in Erlang LS returns skip, which is not handled in els_parser.

Expected behavior
That it is possible to use Erlang LS with source files that contain erlfmt pragmas, such as "noformat" but also erlfmt "control"-comments such as "%% erlfmt-ignore", "%% erlfmt-ignore-begin" and "%% erlfmt-ignore-end" (the erlfmt "control" comments are introduced in erlfmt version 1.2.0)

Actual behavior
Erlang LS crashes and it is not possible to use with erlang source code files with "noformat" pragma.

Context

  • erlang_ls version (tag/sha): 0.44.1
  • Editor used:
  • LSP client used:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant