Skip to content

Commit

Permalink
feat(pack): add elm language pack (#653)
Browse files Browse the repository at this point in the history
Co-authored-by: gacallea <[email protected]>
  • Loading branch information
andreacfromtheapp and gacallea authored Nov 27, 2023
1 parent 22b24e7 commit 2f04d6e
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
23 changes: 23 additions & 0 deletions lua/astrocommunity/pack/elm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Elm Language Pack

This plugin pack does the following:

- Adds `elm` Treesitter parsers
- Adds `elm-language-server` language server
- Adds `elm-format` formatter

## LSP Configuration

The default
[elm-language-server](https://github.com/elm-tooling/elm-language-server)
configuration matches all [currently supported features for Neovim
LSP](https://github.com/elm-tooling/elm-language-server#editor-support).

## A note on elm-test and elm-review

`elm-test` is not directly supported by [neo-test](../test/neotest) but it's
available via
[neotest-vim-test](https://github.com/nvim-neotest/neotest-vim-test).

However, it is common practice to peruse both `elm-test` and `elm-review`
directly via the command line.
22 changes: 22 additions & 0 deletions lua/astrocommunity/pack/elm/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
local utils = require "astronvim.utils"

return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if opts.ensure_installed ~= "all" then
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "elm" })
end
end,
},

{
"williamboman/mason-lspconfig.nvim",
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "elmls" }) end,
},

{
"jay-babu/mason-null-ls.nvim",
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "elm_format" }) end,
},
}

0 comments on commit 2f04d6e

Please sign in to comment.