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

Remove dependence on ghciInitialPrompt #31

Open
sjcobb2022 opened this issue Apr 30, 2023 · 4 comments
Open

Remove dependence on ghciInitialPrompt #31

sjcobb2022 opened this issue Apr 30, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@sjcobb2022
Copy link

Hi there,

I've been writing a good amount of haskell recently so I have decided to put some time into developing some tooling for my workflow. I have added haskell-debug-adapter to the mason-registry for neovim. As of now, I am integrating this into my config.

My major issue for the past few hours is determining why my config wasn't working. I had set everything up as intended according to the nvim-dap docs and the docs here, and nothing seemed to be working. I then realised that the ghciInitialPrompt was probably incorrect, and I proceeded to fix it.

In my opinion this makes it quite hard for users to make a config generic in any sense, especially as the default value ("Prelude>") is not the default for a fresh install of stack/ghci with ghcup.

Is there any way this issue could be addressed, or is it a necessary evil?

@phoityne
Copy link
Owner

I had set everything up as intended according to the nvim-dap docs and the docs here, and nothing seemed to be working.

Which pages are you referring to?
Are you seeing this document?
https://github.com/phoityne/hdx4vim

I can maintain that docs.
ghciInitialPrompt should be ">".

Regards.

@sjcobb2022
Copy link
Author

I had set everything up as intended according to the nvim-dap docs and the docs here, and nothing seemed to be working.

Which pages are you referring to?
Are you seeing this document?
https://github.com/phoityne/hdx4vim

I can maintain that docs.
ghciInitialPrompt should be ">".

Regards.

Sorry when I meant the docs here I did mean the hdx4vim yes.

Whilst setting ghciInitialPrompt to ">" is a good workaround, if a user has set a custom prompt in their ghci config then it may not properly detect. For example I had my ghc prompt set as "λ: ".

@phoityne
Copy link
Owner

Hi.
Currently hda can't automatically get the custom prompt from .ghci file.
As a new feature, I'll consider adding it.

@phoityne phoityne added the enhancement New feature or request label Apr 30, 2023
@sjcobb2022
Copy link
Author

sjcobb2022 commented Apr 30, 2023

Thanks man!

I have found a temporary workaround that should work on all systems. This is to pass -ignore-dot-ghci to the ghci options, and then use ">" as the ghciInitial prompt.

It's definitely hacky but it works on linux and windows is all the cases I could think of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants