Add syntax highlighting and LSP (erlang_lsp) for Erlang (#7093)
This pull request implements support for the [Erlang Language](https://erlang.org/). **It adds:** * [tree-sitter-erlang](https://github.com/WhatsApp/tree-sitter-erlang) grammar highlights (Licensed under Apache-2 from WhatsApp which is compatible with Zed licensing model), folds and indents * Erlang file icon based on the [official one](https://www.erlang.org/doc/erlang-logo.png) * [erlang_ls](https://github.com/erlang-ls/erlang_ls) support Fixes https://github.com/zed-industries/zed/issues/4939, possibly a duplicate of https://github.com/zed-industries/zed/pull/7085 with more features. Suppose @wingyplus wants to join efforts here. **To complete (out of scope for this PR):** * Support for the ELP language server from WhatsApp. CC @robertoaloi * Better indentation handling, need something like `indentNextLinePattern` in VS Code **Screenshots:**      Outline:  **Release Notes:** * Added Erlang Support ([7093](https://github.com/zed-industries/zed/pull/7093)). --------- Signed-off-by: Thanabodee Charoenpiriyakij <wingyminus@gmail.com> Co-authored-by: Thanabodee Charoenpiriyakij <wingyminus@gmail.com>
This commit is contained in:
parent
3107ed847a
commit
97be0a930c
14 changed files with 398 additions and 4 deletions
1
assets/icons/file_icons/erlang.svg
Normal file
1
assets/icons/file_icons/erlang.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg height="64" viewBox="0 0 128 128" width="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="0" x2="128" y1="128" y2="0"><stop offset="0" stop-color="#333"/><stop offset="1" stop-color="#5d5d5d"/></linearGradient><path d="m12.239265 30.664279h14.960911c-5.59432 5.460938-7.654216 10.692785-10.342106 18.023379-3.200764 8.729348-.549141 29.987457 3.815534 37.55289 2.943384 5.101853 6.282685 8.994876 8.233522 11.095173h-16.667861zm89.614855 0h13.90661v66.671442h-13.55518c1.31391-1.750328 3.43934-4.534454 5.12085-6.426163 2.32782-2.618784 4.97023-6.978412 4.97023-6.978412l-16.015202-8.133112s-5.48977 11.600331-15.964999 15.964998c-10.475214 4.364666-19.784679-.838179-25.604243-7.530659-5.819578-6.692502-5.82371-22.14014-5.82371-22.14014h60.797524c1.16391-14.839892-2.63216-21.249816-4.66901-25.90547-.91799-2.098266-1.89261-3.810819-3.16287-5.522484zm-38.356164 1.757154c.35429-.01632.731685-.0092 1.104497 0 11.930114.290977 13.053143 12.802122 13.053143 12.802122h-27.311192s2.170772-12.298638 13.153552-12.802122z" fill="url(#a)"/></svg>
|
After Width: | Height: | Size: 1.1 KiB |
|
@ -1,7 +1,9 @@
|
|||
{
|
||||
"suffixes": {
|
||||
"Emakefile": "erlang",
|
||||
"aac": "audio",
|
||||
"accdb": "storage",
|
||||
"app.src": "erlang",
|
||||
"avif": "image",
|
||||
"bak": "backup",
|
||||
"bash": "terminal",
|
||||
|
@ -23,6 +25,8 @@
|
|||
"doc": "document",
|
||||
"docx": "document",
|
||||
"eex": "elixir",
|
||||
"erl": "erlang",
|
||||
"escript": "erlang",
|
||||
"eslintrc": "eslint",
|
||||
"eslintrc.js": "eslint",
|
||||
"eslintrc.json": "eslint",
|
||||
|
@ -37,17 +41,18 @@
|
|||
"gif": "image",
|
||||
"gitattributes": "vcs",
|
||||
"gitignore": "vcs",
|
||||
"gitmodules": "vcs",
|
||||
"gitkeep": "vcs",
|
||||
"gitmodules": "vcs",
|
||||
"go": "go",
|
||||
"h": "code",
|
||||
"handlebars": "code",
|
||||
"hbs": "template",
|
||||
"heex": "elixir",
|
||||
"heif": "image",
|
||||
"hrl": "erlang",
|
||||
"hs": "haskell",
|
||||
"htm": "template",
|
||||
"html": "template",
|
||||
"hs": "haskell",
|
||||
"ib": "storage",
|
||||
"ico": "image",
|
||||
"ini": "settings",
|
||||
|
@ -85,6 +90,7 @@
|
|||
"psd": "image",
|
||||
"py": "python",
|
||||
"rb": "ruby",
|
||||
"rebar.config": "erlang",
|
||||
"rkt": "code",
|
||||
"rs": "rust",
|
||||
"rtf": "document",
|
||||
|
@ -104,13 +110,15 @@
|
|||
"txt": "document",
|
||||
"vue": "vue",
|
||||
"wav": "audio",
|
||||
"webp": "image",
|
||||
"webm": "video",
|
||||
"webp": "image",
|
||||
"xls": "document",
|
||||
"xlsx": "document",
|
||||
"xml": "template",
|
||||
"xrl": "erlang",
|
||||
"yaml": "yaml",
|
||||
"yml": "yaml",
|
||||
"yrl": "erlang",
|
||||
"zlogin": "terminal",
|
||||
"zsh": "terminal",
|
||||
"zsh_aliases": "terminal",
|
||||
|
@ -133,7 +141,7 @@
|
|||
"icon": "icons/file_icons/folder.svg"
|
||||
},
|
||||
"css": {
|
||||
"icon": "icons/file_icons/css.svg"
|
||||
"icon": "icons/file_icons/css.svg"
|
||||
},
|
||||
"default": {
|
||||
"icon": "icons/file_icons/file.svg"
|
||||
|
@ -144,6 +152,9 @@
|
|||
"elixir": {
|
||||
"icon": "icons/file_icons/elixir.svg"
|
||||
},
|
||||
"erlang": {
|
||||
"icon": "icons/file_icons/erlang.svg"
|
||||
},
|
||||
"eslint": {
|
||||
"icon": "icons/file_icons/eslint.svg"
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue