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

module: add :lang idris2 #7229

Closed
wants to merge 1 commit into from

Conversation

ribosomerocker
Copy link

@ribosomerocker ribosomerocker commented May 9, 2023

Added support for the Idris 2 programming language. This is a new, breaking version of Idris, that isn't supported by the pre-existing module. Idris 1 (the one the pre-existing module supports) is deprecated, but I haven't removed it because some people might still depend on it (no pun intended). I haven't really deprecated the module or anything, I'll be waiting for your input to tell me if you want to do so.

As the Idris 1 language is deprecated and pretty much not at all used at this point, and since the pre-existing module doesn't support Idris 2, this kind of makes the pre-existing module useless for Idris users.

  • I searched the issue tracker and this hasn't been PRed before.
  • My changes are not on the do-not-PR list for this project.
    (technically not for this, but I have discussed this with the maintainer on Discord and I've been told that it's fine to PR this)
  • My commits conform to the git conventions.
  • My changes are visual; I've included before and after screenshots.
  • I am blindly checking these off.
  • Any relevant issues or PRs have been linked to.
    (there are no relevant issues or PRs)
  • This a draft PR; I need more time to finish it.

@ribosomerocker ribosomerocker requested a review from a team as a code owner May 9, 2023 09:36
@ribosomerocker ribosomerocker changed the title module: add :lang idris2 WIP: module: add :lang idris2 May 9, 2023
@ribosomerocker ribosomerocker marked this pull request as draft May 9, 2023 10:47
@hlissner hlissner added is:feature Adds or requests new features, or extends existing ones re:modules Pertains to adding, removing and management of modules module:lang/idris Pertains to Doom's :lang idris module labels Jul 23, 2023
@hlissner hlissner added this to the modules v23.07 milestone Jul 23, 2023
@glyh
Copy link

glyh commented Sep 14, 2023

Is there an option for customizing idris's interpreter?

  :custom
  (idris-interpreter-path "idris2"))

@aeonik
Copy link

aeonik commented Nov 24, 2023

I am a bit confused at the current state of idris2-mode vs idris-mode.

It seems like there was an effort to get idris2-mode merged back into the original idris-mode

You can find some old discussions here:

Today, I am currently attempting to use Idris2 using Doom's idris-mode, but I had to override the interpreter path: (idris-interpreter-path "idris2"))

  • I am able to load Idris2 files into the idris-mode REPL; however, it still feels like there are some broken issues.

I am getting errors when trying to evaluate certain statements from the REPL.

I am very new to Idris, so it's hard for me to decouple my own user errors, and official support.

Here are some errors I am getting

"repl_test.idr" 1L, 6C written
Evaluation returned an error: Error(s) building file repl_test.idr: Couldn't parse declaration.

repl_test:1:1--1:2
 1 | 2 * 4

Company: An error occurred in auto-begin
Company: backend company-capf error "I can't make sense of the completion task:
:browse  (synchronous Idris evaluation failed)" with args (prefix)
funcall: I can't make sense of the completion task:
:browse  (synchronous Idris evaluation failed)

Running Idris2 REPL from the CLI allows me to invoke these statements just fine.

Comment on lines +7 to +16
(after! lsp-mode
(add-to-list 'lsp-language-id-configuration '(idris2-mode . "idris2"))

(lsp-register-client
(make-lsp-client
:new-connection (lsp-stdio-connection "idris2-lsp")
:major-modes '(idris2-mode)
:server-id 'idris2-lsp)))

(add-hook 'idris2-mode-hook #'lsp!))
Copy link
Contributor

Choose a reason for hiding this comment

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

This assumes you're using lsp-mode. Given that doom emacs supports eglot as well this configuration should conditionally register an lsp client for lsp-mode or eglot depending on which one is enabled.

@ncihnegn
Copy link
Contributor

ncihnegn commented Jan 6, 2024

Seems idris2-mode is abandoned.

@hlissner hlissner changed the title WIP: module: add :lang idris2 module: add :lang idris2 Sep 1, 2024
@hlissner hlissner added the was:moved Is, was, or will be addressed elsewhere label Sep 10, 2024
@hlissner hlissner closed this in e6514cd Sep 10, 2024
@hlissner
Copy link
Member

Since idris2-mode is unmaintained, I'll close this. In the meantime, I've added some documentation on how to get some idris2 support in idris-mode. That said, thanks for bringing this to my attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:feature Adds or requests new features, or extends existing ones module:lang/idris Pertains to Doom's :lang idris module re:modules Pertains to adding, removing and management of modules was:moved Is, was, or will be addressed elsewhere
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants