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

3d - Create a VSCode configuration using Nix and vscode-with-extensions #89

Open
puffnfresh opened this issue May 23, 2020 · 9 comments
Assignees
Labels
core enhancement New feature or request

Comments

@puffnfresh
Copy link
Contributor

nixpkgs has declarative configuration of VSCode with extensions:

https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vscode/with-extensions.nix#L10-L26

It would be great to have an expression for VSCode, preconfigured with HIE and all the other useful extensions.

@puffnfresh
Copy link
Contributor Author

For when we additionally need configuration:

https://github.com/countoren/VSCodeEnv

@freeman42x
Copy link
Owner

@puffnfresh It would be great to have an expression for VSCode, preconfigured with HIE and all the other useful extensions.

That means that when a new developer wants to work on the project nix-shell would provide a VSCode with plugins already installed to him?

@freeman42x
Copy link
Owner

@countoren could you have a chat with @puffnfresh about how this works and related so the solution you provide in your repository? Thank you

@countoren
Copy link
Contributor

sure i would love too, from next week ill have more time. so we look into it.

@freeman42x
Copy link
Owner

my attempts at getting vscode and hie in nix shell https://github.com/atopuzov/haskellstuff/tree/master/helpers/vscode-hie-ghc865 - @atopuzov

@atopuzov
Copy link

atopuzov commented May 24, 2020

I could not get the vscode-with-extensions working as the extensions would not load and there was an error saying read only filesystem so I resorted to using .vscode/extensions.json to suggest the user to install the extensions. Seems to be working with cabal projects but crashes if you open a project that uses stack (you can rename the stack.yaml file and then it works). Now that there is a stack wrapper stack projects seem happy.
Also hit an issue with all-hies and GLIBC (infinisil/all-hies#32) so I pinned to the same version of nixpkgs all-hies uses for ghc865.

vscode-with-extensions error i get:

[2020-05-25 11:14:25.500] [renderer1] [error] EROFS: read-only file system, open '/nix/store/jaqz1kgvq8ik6hccwavaj7vgsdry59i2-vscode-extensions-1.45.0/share/vscode/extensions/justusadam.language-haskell/package.json': Error: EROFS: read-only file system, open '/nix/store/jaqz1kgvq8ik6hccwavaj7vgsdry59i2-vscode-extensions-1.45.0/share/vscode/extensions/justusadam.language-haskell/package.json'
[2020-05-25 11:14:25.501] [renderer1] [error] EROFS: read-only file system, open '/nix/store/jaqz1kgvq8ik6hccwavaj7vgsdry59i2-vscode-extensions-1.45.0/share/vscode/extensions/alanz.vscode-hie-server/package.json': Error: EROFS: read-only file system, open '/nix/store/jaqz1kgvq8ik6hccwavaj7vgsdry59i2-vscode-extensions-1.45.0/share/vscode/extensions/alanz.vscode-hie-server/package.json'
[2020-05-25 11:14:25.501] [renderer1] [error] EROFS: read-only file system, open '/nix/store/jaqz1kgvq8ik6hccwavaj7vgsdry59i2-vscode-extensions-1.45.0/share/vscode/extensions/bbenoist.Nix/package.json': Error: EROFS: read-only file system, open '/nix/store/jaqz1kgvq8ik6hccwavaj7vgsdry59i2-vscode-extensions-1.45.0/share/vscode/extensions/bbenoist.Nix/package.json'

@freeman42x
Copy link
Owner

@puffnfresh For consistency with the other tickets, could you put a time estimate in the title of the issue? Thank you

@freeman42x
Copy link
Owner

I made some changes which provide ghc, etc. inside nix-shell might help: https://github.com/fairy-tale-agi-solutions/haskell-editor-setup/blob/master/shell.nix

@puffnfresh puffnfresh changed the title Provide a VSCode configuration using Nix and vscode-with-extensions 3d - Provide a VSCode configuration using Nix and vscode-with-extensions May 26, 2020
@freeman42x freeman42x changed the title 3d - Provide a VSCode configuration using Nix and vscode-with-extensions 3d - Create a VSCode configuration using Nix and vscode-with-extensions May 27, 2020
@freeman42x freeman42x removed the bounty label May 27, 2020
@freeman42x
Copy link
Owner

@puffnfresh Countoren got his vscodeEnv PR merged. Should probably have a look and see how this impacts this ticket:

#132

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

No branches or pull requests

4 participants