Improve editor/dockerfile
This commit is contained in:
parent
c258754069
commit
65568ac27b
1 changed files with 44 additions and 11 deletions
55
Dockerfile
55
Dockerfile
|
|
@ -56,20 +56,53 @@ RUN \
|
|||
bundle config set app_config ${GEM_HOME}
|
||||
|
||||
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
|
||||
ARG HELIX_VERSION=24.07
|
||||
RUN curl -L https://github.com/helix-editor/helix/releases/download/${HELIX_VERSION}/helix-${HELIX_VERSION}-x86_64-linux.tar.xz -o /tmp/helix.tar.xz && \
|
||||
cd /opt/ && \
|
||||
tar -xf /tmp/helix.tar.xz && \
|
||||
ln -s /opt/helix-${HELIX_VERSION}-x86_64-linux/hx /usr/local/bin chmod +x /usr/local/bin/
|
||||
|
||||
USER ${NAME}
|
||||
|
||||
RUN mkdir -p ~/.config/fish && echo "set fish_greeting" >> ~/.config/fish/config.fish
|
||||
RUN \
|
||||
echo >> ~/.config/fish/config.fish &&\
|
||||
echo "function fish_prompt" >> ~/.config/fish/config.fish &&\
|
||||
echo " set -l last_status \$status" >> ~/.config/fish/config.fish &&\
|
||||
echo " set -l stat" >> ~/.config/fish/config.fish &&\
|
||||
echo " if test \$last_status -ne 0" >> ~/.config/fish/config.fish &&\
|
||||
echo " set stat (set_color red)\"[\$last_status]\"(set_color normal)" >> ~/.config/fish/config.fish &&\
|
||||
echo " end" >> ~/.config/fish/config.fish &&\
|
||||
echo " string join '' -- (set_color green) (prompt_pwd) (set_color normal) \$stat ' 🐳 '" >> ~/.config/fish/config.fish && \
|
||||
echo "end" >> ~/.config/fish/config.fish
|
||||
RUN mkdir -p ~/.config/fish ~/.config/helix
|
||||
|
||||
COPY <<FISH /home/app/.config/fish/config.fish
|
||||
set fish_greeting
|
||||
|
||||
function fish_prompt
|
||||
set -l last_status \$status
|
||||
set -l stat
|
||||
if test \$last_status -ne 0
|
||||
set stat (set_color red)\
|
||||
end
|
||||
string join '' -- (set_color green) (prompt_pwd) (set_color normal) \$stat ' 🐳 '
|
||||
end
|
||||
|
||||
FISH
|
||||
|
||||
COPY <<LANGS /home/app/.config/helix/languages.toml
|
||||
[[language]]
|
||||
name = "ruby"
|
||||
shebangs = ["ruby"]
|
||||
roots = ["Gemfile.lock"]
|
||||
language-servers = [ "ruby-lsp" ]
|
||||
auto-format = true
|
||||
|
||||
[language-server.ruby-lsp]
|
||||
command = "ruby-lsp"
|
||||
args = ["--debug"]
|
||||
|
||||
LANGS
|
||||
|
||||
COPY <<CONF /home/app/.config/helix/config.toml
|
||||
theme = "gruvbox_dark_hard"
|
||||
|
||||
[editor]
|
||||
true-color = true
|
||||
|
||||
CONF
|
||||
|
||||
CMD ["/usr/bin/fish", "-l"]
|
||||
|
||||
FROM ruby:${RUBY_VERSION}-alpine AS builder
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue