-
-
Notifications
You must be signed in to change notification settings - Fork 391
Add a Gitpod descriptor #2161
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
Merged
Merged
Add a Gitpod descriptor #2161
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7e8deb4
add a gitpod descriptor
pepeiborra bb70e83
preinstall haskell extension and error lens
pepeiborra 9d37d58
before
pepeiborra 76a5b88
Merge branch 'gitpod' of https://github.com/haskell/haskell-language-…
pepeiborra 8986c63
fix tasks
pepeiborra 7a8685f
workspace
pepeiborra d8e8e26
cabal dir
pepeiborra 415602f
stack root
pepeiborra 427fcf3
Make HLS work in gitpod
pepeiborra 5470cf2
tweaks
pepeiborra 5390421
Fix GHC version
pepeiborra e29aac9
fix XDG dirs and use locally built HLS binary
pepeiborra f81e04a
Better ensure that the Cabal home lives under /workspace
pepeiborra 2067a63
Fix location of VSCode settings
pepeiborra b5299bb
Merge branch 'master' into gitpod
pepeiborra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/ | ||
tasks: | ||
- before: | | ||
# Only the /workspace folder is persistent | ||
export XDG_DATA_HOME=/workspace/.local/share | ||
export XDG_CONFIG_HOME=/workspace/.local/config | ||
export XDG_STATE_HOME=/workspace/.local/state | ||
export XDG_CACHE_HOME=/workspace/.cache | ||
export CABAL_DIR=/workspace/.cabal | ||
export STACK_ROOT=/workspace/.stack | ||
|
||
# install ghcup, ghc and cabal | ||
export GHCUP_INSTALL_BASE_PREFIX=/workspace | ||
export BOOTSTRAP_HASKELL_NONINTERACTIVE=1 | ||
export BOOTSTRAP_HASKELL_MINIMAL=1 | ||
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh | ||
/workspace/.ghcup/bin/ghcup install ghc --set | ||
/workspace/.ghcup/bin/ghcup install cabal | ||
|
||
# Add ghcup binaries to the PATH since VSCode does not see 'source .ghcup/env' | ||
pushd /usr/local/bin | ||
sudo ln -s /workspace/.ghcup/bin/* /usr/local/bin | ||
popd | ||
|
||
# Fix the Cabal dir since VSCode does not see CABAL_DIR | ||
cabal update | ||
echo "Symlinking /workspace/.cabal to ~/.cabal" | ||
ln -s /workspace/.cabal ~ | ||
|
||
# Configure VSCode to use the locally built version of HLS | ||
mkdir -p .vscode | ||
echo '{ "haskell.serverExecutablePath": "/workspace/.cabal/bin/haskell-language-server" }' > .vscode/settings.json | ||
|
||
init: | | ||
cabal configure --enable-executable-dynamic | ||
cabal build --enable-tests | ||
cabal install exe:haskell-language-server | ||
command: | | ||
cabal build --enable-tests | ||
|
||
# List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/ | ||
ports: [] | ||
|
||
github: | ||
prebuilds: | ||
# enable for the master/default branch (defaults to true) | ||
master: true | ||
# enable for all branches in this repo (defaults to false) | ||
branches: false | ||
# enable for pull requests coming from this repo (defaults to true) | ||
pullRequests: true | ||
# enable for pull requests coming from forks (defaults to false) | ||
pullRequestsFromForks: true | ||
# add a "Review in Gitpod" button as a comment to pull requests (defaults to true) | ||
addComment: false | ||
# add a "Review in Gitpod" button to pull requests (defaults to false) | ||
addBadge: false | ||
# add a label once the prebuild is ready to pull requests (defaults to false) | ||
addLabel: prebuilt-in-gitpod | ||
|
||
vscode: | ||
extensions: | ||
- "haskell.haskell" | ||
- "justusadam.language-haskell" | ||
- "usernamehw.errorlens" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.