elm.lua 931 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. local M = {}
  2. M.config = function()
  3. O.lang.elm = {}
  4. end
  5. M.format = function()
  6. -- TODO: implement formatter for language
  7. return "No formatter available!"
  8. end
  9. M.lint = function()
  10. -- TODO: implement linters (if applicable)
  11. return "No linters configured!"
  12. end
  13. M.lsp = function()
  14. if require("lv-utils").check_lsp_client_active "elmls" then
  15. return
  16. end
  17. require("lspconfig").elmls.setup {
  18. cmd = { DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-language-server" },
  19. on_attach = require("lsp").common_on_attach,
  20. init_options = {
  21. elmAnalyseTrigger = "change",
  22. elmFormatPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-format",
  23. elmPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm",
  24. elmTestPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-test",
  25. },
  26. }
  27. end
  28. M.dap = function()
  29. -- TODO: implement dap
  30. return "No DAP configured!"
  31. end
  32. return M