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

Add installation and usage instructions #85

Closed
4 of 12 tasks
jneira opened this issue May 4, 2020 · 15 comments · Fixed by #112 or #132
Closed
4 of 12 tasks

Add installation and usage instructions #85

jneira opened this issue May 4, 2020 · 15 comments · Fixed by #112 or #132

Comments

@jneira
Copy link
Member

jneira commented May 4, 2020

Checklist:

  • Installation
    • Nix (?)
    • From source
  • Editor integration
    • vscode
    • vim/neovim
    • sublime
    • atom
    • emacs
    • doom emacs
    • spacemacs (?)
    • kakoune
@jneira jneira self-assigned this May 4, 2020
@alanz
Copy link
Collaborator

alanz commented May 4, 2020

We should be able to bring the info from hie directly, it honours the same arguments.

lsp-haskell has a customize option for it, setting the path to haskell-language-server-wrapper instead of hie-wrapper in any client should just work.

@jneira
Copy link
Member Author

jneira commented May 4, 2020

Yeah, i think one little caveat is hls does not accept the --vomit cli option set by the extension if you choose the verbose mode.

setting the path to haskell-language-server-wrapper instead of hie-wrapper in any client should just work

basically it is the key change, you have to set useCustomHieWrapper to true too

{
    "languageServerHaskell.useCustomHieWrapperPath": "D:\\bin\\haskell-language-server-wrapper.exe",
    "languageServerHaskell.useCustomHieWrapper": true,
    "languageServerHaskell.trace.server": "messages"
}

@jneira
Copy link
Member Author

jneira commented May 6, 2020

Now there is a vscode extension release that lets choose the server so it is easier.

@EncodePanda
Copy link

I'm about to go through the process this week and I will be documenting all my steps. Eventually, I will push them to this repo as docs.

@sir4ur0n
Copy link
Collaborator

@EncodePanda I'll try to save you some time: pay attention to installing haskell-language-server with the same GHC version you use in your project!

I didn't pay attention at first while doing stack install and things blew up rather spectacularly in VSCode afterwards 😄

@jneira
Copy link
Member Author

jneira commented May 11, 2020

@sir4ur0n yeah it has to be clearly visible in docs. However, the program should have emit a warning in the output pane and in a popup alert. At least haskell-ide-engine used to do it.

@jneira jneira removed their assignment May 11, 2020
@jneira jneira changed the title Add some info in README about how hls can be used Ad installation and usage instructions May 15, 2020
@jneira
Copy link
Member Author

jneira commented May 15, 2020

I am porting the installation and configuration instruction from hie.
@EncodePanda i hope that will not be a duplicated effort. A more beginner friendly "Getting started" would be great too.

@theGhostJW
Copy link

theGhostJW commented May 16, 2020

Would someone coming from hie and using vs code need to uninstall anything first and if so could this be added to the readme?

@fendor
Copy link
Collaborator

fendor commented May 17, 2020

Good point.
An upgrading/switching section would be a great idea!

To give an immediate answer: no, nothing needs to be uninstalled. You can just install hls and point the vscode plugin to use haskell-language-server in its recent settings addition to switch between hie/ghcide/hls.
However, it might make sense to delete unused binaries of hie since they are quite large (like 120MiB, iirc)

@jneira
Copy link
Member Author

jneira commented May 17, 2020

Well, to close this i think we would add how to use hls with the more used editors (like hie)
I am feel confident to port the vscode part but not sure about others

@jneira
Copy link
Member Author

jneira commented May 25, 2020

Checklist:

  • Installation
    • Nix (?)
    • From source
  • Editor integration
    • vscode
    • vim/neovim
    • sublime
    • atom
    • emacs
    • doom emacs
    • spacemacs (?)
    • kakoune

This issue is about how to install and use (editor integration) hls. Only available methods.

@Anrock
Copy link
Contributor

Anrock commented May 25, 2020

Neovim + CoC could be just copypastted from hie, only changing executable name to hls-wrapper.

@suhdonghwi
Copy link

@Anrock Did you manage to use formatter plugins? For me, running :call CocAction('format') silently fails without any error messages.

@Anrock
Copy link
Contributor

Anrock commented May 26, 2020

@suhdonghwi not much of a fan of autoformatting, but

" Formatting selected code.
xmap <leader>f  <Plug>(coc-format-selected)
nmap <leader>f  <Plug>(coc-format-selected)

is working on my setup.

@jneira jneira changed the title Ad installation and usage instructions Add installation and usage instructions May 26, 2020
@suhdonghwi
Copy link

@Anrock Thank you! It works well now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants