Skip to content

Instantly share code, notes, and snippets.

@fagnercarvalho
Last active June 7, 2021 03:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fagnercarvalho/02b2ab635a57bee60c57443e9c0b03cd to your computer and use it in GitHub Desktop.
Save fagnercarvalho/02b2ab635a57bee60c57443e9c0b03cd to your computer and use it in GitHub Desktop.
SpaceVim Rust Development Environment
FROM spacevim/spacevim
ENV RUSTUP_HOME=/rust
ENV CARGO_HOME=/cargo
ENV PATH=/cargo/bin:/rust/bin:/home/spacevim:$PATH
USER root
RUN mkdir /home/spacevim/projects && chmod -R 777 /home/spacevim/projects
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN rustup component add rust-src
RUN wget https://github.com/rust-analyzer/rust-analyzer/releases/download/2021-05-31/rust-analyzer-x86_64-unknown-linux-gnu.gz && gzip --decompress rust-analyzer-x86_64-unknown-linux-gnu.gz && mv rust-analyzer-x86_64-unknown-linux-gnu rust-analyzer && chmod +x rust-analyzer
# All SpaceVim option below [option] section
[options]
colorscheme = "gruvbox"
colorscheme_bg = "dark"
enable_guicolors = true
[[layers]]
name = "shell"
default_position = "top"
default_height = 30
[[layers]]
name = "lang#rust"
recommended_style = true
format_on_save = true
racer_cmd = "rust-analyzer"
[[layers]]
name = "lsp"
filetypes = [
"rust"
]
[layers.override_cmd]
rust = ["rust-analyzer"]
docker build --no-cache -t spacevim . && docker run -it --rm -v <config file folder>:/home/spacevim/.SpaceVim.d -v <projects folder>:/home/spacevim/projects spacevim nvim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment