Skip to content

Feature/erlang mode#1303

Merged
cxxxr merged 3 commits intolem-project:mainfrom
ioolkos:feature/erlang-mode
Mar 15, 2024
Merged

Feature/erlang mode#1303
cxxxr merged 3 commits intolem-project:mainfrom
ioolkos:feature/erlang-mode

Conversation

@ioolkos
Copy link
Copy Markdown
Contributor

@ioolkos ioolkos commented Feb 17, 2024

First version of an Erlang mode. Improvements are certainly possible and welcome.
Currently configured for the Whatsapp ELP Erlang language server, but the Erlang LS could certainly be used as well.


(defun tokens (boundary strings)
(let ((alternation
`(:alternation ,@(sort (copy-list strings) #'> :key #'length))))
Copy link
Copy Markdown
Collaborator

@vindarel vindarel Feb 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would (list …) and alexandria:flatten do the job instead of ,@? (didn't test this case)

(taking the assumption that stupid code is better)

@vindarel
Copy link
Copy Markdown
Collaborator

Great!

I left comments (I'm a helping hand).

Could you add a paragraph on the features this brings? Here, or on the package's :documentation, or in a new README… so that we can easily add doc to Lem's website.

I saw:

  • syntax highlighting
  • run Erlang
  • send and eval region (async)
  • LSP support (details?)
  • REPL?

re style: I would define lists / property lists with the default (list :key val) instead of '(:key ,val) (and ,@).

@ioolkos
Copy link
Copy Markdown
Contributor Author

ioolkos commented Feb 18, 2024

@vindarel Thank you for your review & suggestions! I'll try to adapt & extend the PR, based on them.

### Language Server

Erlang mode will connect to your local ELP [Erlang Language Platform](https://github.com/WhatsApp/erlang-language-platform) installation.
Configure the ELP binary's location by setting *lsp-elang-elp-server-path*:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

watch out, "*" needs to be escaped in code: `*foo*`

@vindarel
Copy link
Copy Markdown
Collaborator

LGTM

cool, thanks. If the PR is ready you can add cxxxr as reviewer, I'll let him merge.

@cxxxr cxxxr merged commit 566c048 into lem-project:main Mar 15, 2024
@cxxxr
Copy link
Copy Markdown
Member

cxxxr commented Mar 15, 2024

I think it's good and I merged.
Thank you for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants