From 06cd3192de04c741aadfda0b2d2bb3acc689fed6 Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Tue, 2 Jan 2024 15:28:49 +0000 Subject: [PATCH 01/15] fix: rename ripgrep's deb file This was changed in version 14.0.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3b51087..bb861f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -95,7 +95,7 @@ ENV BAT_VERSION 0.24.0 ENV BAT_FILE bat_${BAT_VERSION}_amd64.deb ENV BAT_URL https://github.com/sharkdp/bat/releases/download/v${BAT_VERSION}/${BAT_FILE} ENV RG_VERSION 14.0.3 -ENV RG_FILE ripgrep_${RG_VERSION}_amd64.deb +ENV RG_FILE ripgrep_${RG_VERSION}-1_amd64.deb ENV RG_URL https://github.com/BurntSushi/ripgrep/releases/download/${RG_VERSION}/${RG_FILE} ENV DO_VERSION 24.0.7 ENV DO_URL https://download.docker.com/linux/static/stable/x86_64/docker-${DO_VERSION}.tgz -- 2.47.2 From 33a2fe45e4a846f4c753ceb7d1c451189a662e69 Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Tue, 2 Jan 2024 15:29:11 +0000 Subject: [PATCH 02/15] fix(rtx): allow insecure/asdf plugins --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bb861f9..4a001d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -166,7 +166,7 @@ RUN git config --global user.email "${GIT_USER_EMAIL}" \ && git config --global core.editor nvim # install rtx plugins -RUN ${XDG_DATA_HOME}/rtx/bin/rtx plugins install \ +RUN ${XDG_DATA_HOME}/rtx/bin/rtx plugins install --force --yes \ awscli \ elixir \ erlang \ -- 2.47.2 From 731c021dc8d71b039169d3b789f0fd1ba4c6f1ff Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Tue, 2 Jan 2024 15:29:40 +0000 Subject: [PATCH 03/15] chore(rtx): add missing plugins --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4a001d9..29e94c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -175,7 +175,9 @@ RUN ${XDG_DATA_HOME}/rtx/bin/rtx plugins install --force --yes \ lefthook \ poetry \ terraform \ - tilt + tilt \ + usql \ + yarn # NOTE (jpd): the section below exists mainly to handle a project running elixir 1.11. # It allows the usage of openssl 1.1 and a compatible elixir-ls. -- 2.47.2 From 5a7f0b9cceade18e4d37142312729c7a48acd90e Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Thu, 11 Jan 2024 07:14:49 -0300 Subject: [PATCH 04/15] chore(rtx): add newer plugins Some of them clash with the docker image, we will remove from it. --- config/rtx/config.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/rtx/config.toml b/config/rtx/config.toml index 4cd3451..abe906b 100644 --- a/config/rtx/config.toml +++ b/config/rtx/config.toml @@ -1,18 +1,28 @@ [tools] awscli = "2.15.6" +bat = "0.24.0" +dagger = "0.9.5" elixir = "1.16.0-otp-26" erlang = "26.2.1" +eza = "0.17.0" +fzf = "0.45.0" go = "1.21.5" helm = "3.13.3" +k3d = "5.6.0" kubectl = "1.29.0" +kubie = "0.23.0" lefthook = "1.5.5" node = "21.5.0" poetry = "1.7.1" python = "3.12.1" +ripgrep = "14.1.0" +starship = "1.17.1" terraform = "1.6.6" tilt = "0.33.10" +tmux = "3.3" usql = "0.17.2" yarn = "1.22.19" +zoxide = "0.9.2" [settings] experimental = true -- 2.47.2 From 6906154e25fae02d4510d0d031792846a26c5c2c Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Thu, 11 Jan 2024 07:15:36 -0300 Subject: [PATCH 05/15] fix(tmux): set proper directory with config --- config/tmux/tmux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index 4191da8..7eed151 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -52,7 +52,7 @@ bind-key & kill-window # Reload tmux conf unbind r -bind r source-file ~/.tmux.conf\; display "Reloaded conf." +bind r source-file ~/.config/tmux/tmux.conf\; display "Reloaded conf." # Full color for vim set -g default-terminal "screen-256color" -- 2.47.2 From 71394a7f9a6e966eed386d95247b681ecc22122f Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Thu, 11 Jan 2024 07:16:01 -0300 Subject: [PATCH 06/15] chore(tmux): add plugins to handle section --- config/tmux/tmux.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index 7eed151..f00ab3d 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -94,6 +94,15 @@ set -g history-limit 50000 # list plugins set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'fabioluciano/tmux-tokyo-night' set -g @plugin 'Morantron/tmux-fingers' set -g @plugin 'tmux-plugins/tmux-yank' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' + +# configure resurrect/continuum +set -g @continuum-save-interval '15' +set -g @continuum-restore 'on' + +# load/install plugins run '~/.config/tmux/plugins/tpm/tpm' -- 2.47.2 From 04cf851b8052646076820999db92c2a740204701 Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Thu, 11 Jan 2024 07:16:23 -0300 Subject: [PATCH 07/15] chore(ide): simplify openssl install process --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 29e94c6..f9923c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -187,8 +187,7 @@ RUN ${XDG_DATA_HOME}/rtx/bin/rtx plugins install --force --yes \ # example: KERL_CONFIGURE_OPTIONS="-with-ssl=${HOME}/.local/lib/ssl" asdf install RUN mkdir -p ${HOME}/.local/src \ && cd ${HOME}/.local/src \ - && wget https://www.openssl.org/source/openssl-1.1.1m.tar.gz \ - && tar -xzf openssl-1.1.1m.tar.gz \ + && curl -L https://www.openssl.org/source/openssl-1.1.1m.tar.gz | tar -xz \ && cd openssl-1.1.1m \ && ./config --prefix=${HOME}/.local/lib/ssl --openssldir=${HOME}/.local/lib/ssl shared zlib \ && make \ -- 2.47.2 From f19ab4df1a9604599cb9d292e350213d0a7392a8 Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Thu, 11 Jan 2024 07:16:49 -0300 Subject: [PATCH 08/15] chore(elixir): clone the repo only one time Install each version on a separate release folder. --- Dockerfile | 12 ++++-------- scripts/docker-entrypoint.sh | 12 ++++++++++++ scripts/elixir-ls-setup.sh | 28 ++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 8 deletions(-) create mode 100755 scripts/docker-entrypoint.sh create mode 100755 scripts/elixir-ls-setup.sh diff --git a/Dockerfile b/Dockerfile index f9923c0..56adfbc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -200,11 +200,7 @@ RUN mkdir -p ${HOME}/.local/src \ # mix do deps.get, deps.compile # MIX_ENV=prod mix compile # MIX_ENV=prod mix elixir_ls.release -RUN git clone https://github.com/elixir-lsp/elixir-ls.git ${LOCAL_SRC_HOME}/elixir-ls/v0.12.0 \ - && cd ${LOCAL_SRC_HOME}/elixir-ls/v0.12.0 \ - && git checkout tags/v0.12.0 \ - && cp .release-tool-versions .tool-versions \ - && git clone https://github.com/elixir-lsp/elixir-ls.git ${LOCAL_SRC_HOME}/elixir-ls/v0.14.6 \ - && cd ${LOCAL_SRC_HOME}/elixir-ls/v0.14.6 \ - && git checkout tags/v0.14.6 \ - && cp .release-tool-versions .tool-versions +RUN git clone https://github.com/elixir-lsp/elixir-ls.git ${LOCAL_SRC_HOME}/elixir-ls + +COPY ./scripts/docker-entrypoint.sh /usr/local/bin/docker-entrypoint +COPY ./scripts/elixir-ls-setup.sh /usr/local/bin/elixir-ls-setup diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh new file mode 100755 index 0000000..e296ee2 --- /dev/null +++ b/scripts/docker-entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -e + +# NOTE (jpd): setup elixir-ls for older versions of elixir +if [ ! -d ${LOCAL_SRC_HOME}/elixir-ls/release ]; then + echo "setup elixir ls version 0.12.0" + /usr/local/bin/elixir-ls-setup v0.12.0 + echo "setup elixir ls version 0.14.6" + /usr/local/bin/elixir-ls-setup v0.14.6 +fi + +exec "$@" diff --git a/scripts/elixir-ls-setup.sh b/scripts/elixir-ls-setup.sh new file mode 100755 index 0000000..8b4cd0e --- /dev/null +++ b/scripts/elixir-ls-setup.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +set -e + +function setup() { + local elixir_ls_home=${LOCAL_SRC_HOME}/elixir-ls + local elixir_ls_release=${elixir_ls_home}/release + echo "elixir-ls repo" + cd ${elixir_ls_home} + echo "checkout versions ${1}" + git checkout tags/${1} + echo "set erlang/elixir versions" + cp .release-tool-versions .tool-versions + echo "using erlang $(rtx current erlang) / elixir $(rtx current elixir)" + echo "install erlang/elixir runtimes" + KERL_CONFIGURE_OPTIONS="-with-ssl=${HOME}/.local/lib/ssl" rtx install + echo "install elixir-ls deps" + mix do local.rebar --force, local.hex --force, deps.get, deps.compile + echo "compile and release elixir-ls" + MIX_ENV=prod mix compile + MIX_ENV=prod mix elixir_ls.release -o ${elixir_ls_release}/${1} + echo "remove local .tool-versions" + cp .tool-versions ${elixir_ls_release}/${1} + rm .tool-versions + mix do deps.clean --all, clean + git checkout master +} + +setup $1 -- 2.47.2 From d1063ead11680f117f744d14f2df330ddb0cf6d2 Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Thu, 11 Jan 2024 07:17:59 -0300 Subject: [PATCH 09/15] chore: map local state folder --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 0cc47d7..5ab4209 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,9 +16,11 @@ services: - './config/tmuxp:/home/coder/.config/tmuxp' - 'home_cache:/home/coder/.cache' - 'home_local_share:/home/coder/.local/share' + - 'home_local_state:/home/coder/.local/state' - 'home_plugins_tmux:/home/coder/.config/tmux/plugins' volumes: home_cache: {} home_local_share: {} + home_local_state: {} home_plugins_tmux: {} -- 2.47.2 From 7d6725e19a02e031612988955a8b7d0962192aab Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Thu, 11 Jan 2024 07:18:45 -0300 Subject: [PATCH 10/15] chore: ignore tmux plugins from repo --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3829375 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config/tmux/plugins -- 2.47.2 From 1afba6dbb82f4d0c38415d85ad9102d80462e00f Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Sun, 14 Jan 2024 18:45:11 +0000 Subject: [PATCH 11/15] chore: install missing plugins for rtx Eventhough starship and zoxide are available in rtx, I'm still installing them locally so they are available at startup. --- Dockerfile | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 56adfbc..0e10618 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,6 @@ RUN apt-get update \ ca-certificates \ curl \ doas \ - exa \ fish \ g++ \ gcc \ @@ -91,23 +90,11 @@ RUN apt-get update \ && echo 'permit persist :wheel as root' > /etc/doas.conf # command line utilities -ENV BAT_VERSION 0.24.0 -ENV BAT_FILE bat_${BAT_VERSION}_amd64.deb -ENV BAT_URL https://github.com/sharkdp/bat/releases/download/v${BAT_VERSION}/${BAT_FILE} -ENV RG_VERSION 14.0.3 -ENV RG_FILE ripgrep_${RG_VERSION}-1_amd64.deb -ENV RG_URL https://github.com/BurntSushi/ripgrep/releases/download/${RG_VERSION}/${RG_FILE} ENV DO_VERSION 24.0.7 ENV DO_URL https://download.docker.com/linux/static/stable/x86_64/docker-${DO_VERSION}.tgz ENV DC_VERSION v2.23.3 ENV DC_URL https://github.com/docker/compose/releases/download/${DC_VERSION}/docker-compose-linux-x86_64 RUN curl -sS https://starship.rs/install.sh | sh -s -- --yes \ - && curl -LO ${BAT_URL} \ - && dpkg -i ${BAT_FILE} \ - && rm ${BAT_FILE} \ - && curl -LO ${RG_URL} \ - && dpkg -i ${RG_FILE} \ - && rm ${RG_FILE} \ && mkdir /tmp/download \ && curl -L ${DO_URL} | tar -zx -C /tmp/download \ && chgrp --recursive docker /tmp/download \ @@ -154,7 +141,7 @@ RUN fish -c true \ && echo '{$XDG_DATA_HOME}/rtx/bin/rtx activate fish | source' >> ${XDG_CONFIG_HOME}/fish/config.fish \ && echo 'zoxide init fish | source' >> ${XDG_CONFIG_HOME}/fish/config.fish \ && echo 'alias cat="bat"' >> ${XDG_CONFIG_HOME}/fish/config.fish \ - && echo 'alias l="exa --time-style long-iso --color=auto -F"' >> ${XDG_CONFIG_HOME}/fish/config.fish \ + && echo 'alias l="eza --time-style long-iso --color=auto -F"' >> ${XDG_CONFIG_HOME}/fish/config.fish \ && echo 'alias ll="l -Fahl"' >> ${XDG_CONFIG_HOME}/fish/config.fish \ && echo 'alias la="l -a"' >> ${XDG_CONFIG_HOME}/fish/config.fish @@ -168,16 +155,26 @@ RUN git config --global user.email "${GIT_USER_EMAIL}" \ # install rtx plugins RUN ${XDG_DATA_HOME}/rtx/bin/rtx plugins install --force --yes \ awscli \ + bat \ + dagger \ elixir \ erlang \ + eza \ + fzf \ helm \ + k3d \ kubectl \ + kubie \ lefthook \ poetry \ + ripgrep \ + starship \ terraform \ tilt \ + tmux \ usql \ - yarn + yarn \ + zoxide # NOTE (jpd): the section below exists mainly to handle a project running elixir 1.11. # It allows the usage of openssl 1.1 and a compatible elixir-ls. -- 2.47.2 From 02db07e29f49ea6ac6c9ec532a36fded1b7be7fe Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Sun, 14 Jan 2024 18:49:18 +0000 Subject: [PATCH 12/15] chore(nvim): upgrade kickstart to latest commit --- Dockerfile | 2 +- patch/kickstart.nvim/updates.patch | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0e10618..a15a58d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -130,7 +130,7 @@ COPY ./patch/kickstart.nvim/updates.patch /tmp COPY ./config/nvim/lua/custom/plugins/init.lua /tmp RUN git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME}"/nvim \ && cd ${XDG_CONFIG_HOME}/nvim \ - && git reset --hard 4d0dc8d4b1bd6b94e59f7773158149bb1b0ee5be \ + && git reset --hard 2510c29d62d39d63bb75f1a613d2ae628a2af4ee \ && git apply /tmp/updates.patch \ && cp /tmp/init.lua ${XDG_CONFIG_HOME}/nvim/lua/custom/plugins \ && nvim --headless "+Lazy! sync" +qa diff --git a/patch/kickstart.nvim/updates.patch b/patch/kickstart.nvim/updates.patch index ce18267..fdce31c 100644 --- a/patch/kickstart.nvim/updates.patch +++ b/patch/kickstart.nvim/updates.patch @@ -1,7 +1,5 @@ -:100644 100644 7e68de6 0000000 M init.lua - diff --git a/init.lua b/init.lua -index 7e68de6..f886b8a 100644 +index 1ff16af..2ef9591 100644 --- a/init.lua +++ b/init.lua @@ -266,7 +266,7 @@ require('lazy').setup({ @@ -44,7 +42,7 @@ index 7e68de6..f886b8a 100644 -- [[ Basic Keymaps ]] -- Keymaps for better default experience -@@ -423,11 +432,33 @@ vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = +@@ -423,8 +432,31 @@ vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = vim.defer_fn(function() require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter @@ -77,11 +75,8 @@ index 7e68de6..f886b8a 100644 + }, -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = false, -- - highlight = { enable = true }, - indent = { enable = true }, - incremental_selection = { -@@ -563,13 +594,16 @@ require('mason-lspconfig').setup() + -- Install languages synchronously (only applied to `ensure_installed`) +@@ -568,13 +600,16 @@ require('mason-lspconfig').setup() -- If you want to override the default filetypes that your language server will attach to you can -- define the property 'filetypes' to the map in question. local servers = { @@ -105,7 +100,7 @@ index 7e68de6..f886b8a 100644 lua_ls = { Lua = { workspace = { checkThirdParty = false }, -@@ -578,6 +612,8 @@ local servers = { +@@ -583,6 +618,8 @@ local servers = { -- diagnostics = { disable = { 'missing-fields' } }, }, }, @@ -114,7 +109,7 @@ index 7e68de6..f886b8a 100644 } -- Setup neovim lua configuration -@@ -596,12 +632,23 @@ mason_lspconfig.setup { +@@ -601,12 +638,23 @@ mason_lspconfig.setup { mason_lspconfig.setup_handlers { function(server_name) -- 2.47.2 From 9f29ac371372b9678070c2f38813cbbd3af2a7dc Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Sun, 14 Jan 2024 18:51:23 +0000 Subject: [PATCH 13/15] chore: install openssl lib before rtx plugins --- Dockerfile | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index a15a58d..39cb611 100644 --- a/Dockerfile +++ b/Dockerfile @@ -120,6 +120,24 @@ ENV XDG_CACHE_HOME ${HOME}/.cache ENV STARSHIP_CONFIG ${XDG_CONFIG_HOME}/starship/config.toml ENV PATH ${LOCAL_BIN_HOME}:$PATH +# NOTE (jpd): the section below exists mainly to handle a project running elixir 1.11. +# It allows the usage of openssl 1.1 and a compatible elixir-ls. + +# configure openssl 1.1 +# this is needed to compile older erlang versions +# example: KERL_CONFIGURE_OPTIONS="-with-ssl=$HOME/.local/lib/ssl" mise install +RUN mkdir -p ${HOME}/.local/src \ + && cd ${HOME}/.local/src \ + && curl -L https://www.openssl.org/source/openssl-1.1.1m.tar.gz | tar -xz \ + && cd openssl-1.1.1m \ + && ./config --prefix=${HOME}/.local/lib/ssl --openssldir=${HOME}/.local/lib/ssl shared zlib \ + && make \ + # && make test \ + && make install + +# fetch elixir-ls to install custom releases +RUN git clone https://github.com/elixir-lsp/elixir-ls.git ${LOCAL_SRC_HOME}/elixir-ls + # command line utilities RUN curl https://rtx.pub/install.sh | sh \ && curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash \ @@ -176,28 +194,5 @@ RUN ${XDG_DATA_HOME}/rtx/bin/rtx plugins install --force --yes \ yarn \ zoxide -# NOTE (jpd): the section below exists mainly to handle a project running elixir 1.11. -# It allows the usage of openssl 1.1 and a compatible elixir-ls. - -# configure openssl 1.1 -# this is needed to compile older erlang versions -# example: KERL_CONFIGURE_OPTIONS="-with-ssl=${HOME}/.local/lib/ssl" asdf install -RUN mkdir -p ${HOME}/.local/src \ - && cd ${HOME}/.local/src \ - && curl -L https://www.openssl.org/source/openssl-1.1.1m.tar.gz | tar -xz \ - && cd openssl-1.1.1m \ - && ./config --prefix=${HOME}/.local/lib/ssl --openssldir=${HOME}/.local/lib/ssl shared zlib \ - && make \ - # && make test \ - && make install - -# fetch elixir-ls compatible with elixir 1.11.x and 1.12.x -# to setup this project run the following commands: -# mix do local.rebar --force, local.hex --force -# mix do deps.get, deps.compile -# MIX_ENV=prod mix compile -# MIX_ENV=prod mix elixir_ls.release -RUN git clone https://github.com/elixir-lsp/elixir-ls.git ${LOCAL_SRC_HOME}/elixir-ls - COPY ./scripts/docker-entrypoint.sh /usr/local/bin/docker-entrypoint COPY ./scripts/elixir-ls-setup.sh /usr/local/bin/elixir-ls-setup -- 2.47.2 From 00da94a19fd26d944c314f9dd3f3c341c8137595 Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Sun, 14 Jan 2024 18:53:00 +0000 Subject: [PATCH 14/15] chore(nvim): install custom elixir-ls with the same repo Use only one repo to install all elixir-ls versions. --- patch/kickstart.nvim/updates.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patch/kickstart.nvim/updates.patch b/patch/kickstart.nvim/updates.patch index fdce31c..5abd800 100644 --- a/patch/kickstart.nvim/updates.patch +++ b/patch/kickstart.nvim/updates.patch @@ -125,9 +125,9 @@ index 1ff16af..2ef9591 100644 + local match_version_111 = string.match(version, '^1.11') + local match_version_112 = string.match(version, '^1.12') + if match_version_111 ~= nil then -+ opts = vim.tbl_extend('keep', opts, { cmd = { vim.fn.expand('$LOCAL_SRC_HOME') .. '/elixir-ls/v0.12.0/release/language_server.sh' } }) ++ opts = vim.tbl_extend('keep', opts, { cmd = { vim.fn.expand('$LOCAL_SRC_HOME') .. '/elixir-ls/release/v0.12.0/language_server.sh' } }) + elseif match_version_112 ~= nil then -+ opts = vim.tbl_extend('keep', opts, { cmd = { vim.fn.expand('$LOCAL_SRC_HOME') .. '/elixir-ls/v0.14.6/release/language_server.sh' } }) ++ opts = vim.tbl_extend('keep', opts, { cmd = { vim.fn.expand('$LOCAL_SRC_HOME') .. '/elixir-ls/release/v0.14.6/language_server.sh' } }) + end + end + require('lspconfig')[server_name].setup(opts) -- 2.47.2 From 22afe9a45f56e22bc39419ae51209388f0caf1ba Mon Sep 17 00:00:00 2001 From: Joao P Dubas Date: Sun, 14 Jan 2024 18:55:36 +0000 Subject: [PATCH 15/15] fix: rtx is now mise Check the [blog post][0] about the migration. [0]: https://mise.jdx.dev/rtx.html --- Dockerfile | 6 +++--- config/{rtx => mise}/config.toml | 0 docker-compose.yml | 2 +- patch/kickstart.nvim/updates.patch | 2 +- scripts/elixir-ls-setup.sh | 14 ++++++++------ 5 files changed, 13 insertions(+), 11 deletions(-) rename config/{rtx => mise}/config.toml (100%) diff --git a/Dockerfile b/Dockerfile index 39cb611..970761b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -139,7 +139,7 @@ RUN mkdir -p ${HOME}/.local/src \ RUN git clone https://github.com/elixir-lsp/elixir-ls.git ${LOCAL_SRC_HOME}/elixir-ls # command line utilities -RUN curl https://rtx.pub/install.sh | sh \ +RUN curl https://mise.jdx.dev/install.sh | sh \ && curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash \ && git clone https://github.com/tmux-plugins/tpm.git ${XDG_CONFIG_HOME}/tmux/plugins/tpm @@ -156,7 +156,7 @@ RUN git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME} # configure fish and bash RUN fish -c true \ && echo 'starship init fish | source' >> ${XDG_CONFIG_HOME}/fish/config.fish \ - && echo '{$XDG_DATA_HOME}/rtx/bin/rtx activate fish | source' >> ${XDG_CONFIG_HOME}/fish/config.fish \ + && echo '{$LOCAL_BIN_HOME}/mise activate fish | source' >> ${XDG_CONFIG_HOME}/fish/config.fish \ && echo 'zoxide init fish | source' >> ${XDG_CONFIG_HOME}/fish/config.fish \ && echo 'alias cat="bat"' >> ${XDG_CONFIG_HOME}/fish/config.fish \ && echo 'alias l="eza --time-style long-iso --color=auto -F"' >> ${XDG_CONFIG_HOME}/fish/config.fish \ @@ -171,7 +171,7 @@ RUN git config --global user.email "${GIT_USER_EMAIL}" \ && git config --global core.editor nvim # install rtx plugins -RUN ${XDG_DATA_HOME}/rtx/bin/rtx plugins install --force --yes \ +RUN ${LOCAL_BIN_HOME}/mise plugins install --force --yes \ awscli \ bat \ dagger \ diff --git a/config/rtx/config.toml b/config/mise/config.toml similarity index 100% rename from config/rtx/config.toml rename to config/mise/config.toml diff --git a/docker-compose.yml b/docker-compose.yml index 5ab4209..11eda74 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: command: infinity volumes: - './config/nvim/lua/custom:/home/coder/.config/nvim/lua/custom' - - './config/rtx:/home/coder/.config/rtx' + - './config/mise:/home/coder/.config/mise' - './config/starship:/home/coder/.config/starship' - './config/tmux:/home/coder/.config/tmux' - './config/tmuxp:/home/coder/.config/tmuxp' diff --git a/patch/kickstart.nvim/updates.patch b/patch/kickstart.nvim/updates.patch index 5abd800..8209164 100644 --- a/patch/kickstart.nvim/updates.patch +++ b/patch/kickstart.nvim/updates.patch @@ -121,7 +121,7 @@ index 1ff16af..2ef9591 100644 filetypes = (servers[server_name] or {}).filetypes, } + if server_name == 'elixirls' then -+ local version = vim.fn.system('rtx current elixir') or '' ++ local version = vim.fn.system('mise current elixir') or '' + local match_version_111 = string.match(version, '^1.11') + local match_version_112 = string.match(version, '^1.12') + if match_version_111 ~= nil then diff --git a/scripts/elixir-ls-setup.sh b/scripts/elixir-ls-setup.sh index 8b4cd0e..9da234c 100755 --- a/scripts/elixir-ls-setup.sh +++ b/scripts/elixir-ls-setup.sh @@ -10,18 +10,20 @@ function setup() { git checkout tags/${1} echo "set erlang/elixir versions" cp .release-tool-versions .tool-versions - echo "using erlang $(rtx current erlang) / elixir $(rtx current elixir)" + local current_erlang=$(mise current erlang) + local current_elixir=$(mise current elixir) + echo "using erlang ${current_erlang} / elixir ${current_elixir}" echo "install erlang/elixir runtimes" - KERL_CONFIGURE_OPTIONS="-with-ssl=${HOME}/.local/lib/ssl" rtx install + KERL_CONFIGURE_OPTIONS="-with-ssl=${HOME}/.local/lib/ssl" mise install echo "install elixir-ls deps" - mix do local.rebar --force, local.hex --force, deps.get, deps.compile + mise exec erlang@${current_erlang} elixir@${current_elixir} --command "mix do local.rebar --force, local.hex --force, deps.get, deps.compile" echo "compile and release elixir-ls" - MIX_ENV=prod mix compile - MIX_ENV=prod mix elixir_ls.release -o ${elixir_ls_release}/${1} + mise exec erlang@${current_erlang} elixir@${current_elixir} --command "MIX_ENV=prod mix compile" + mise exec erlang@${current_erlang} elixir@${current_elixir} --command "MIX_ENV=prod mix elixir_ls.release -o ${elixir_ls_release}/${1}" echo "remove local .tool-versions" cp .tool-versions ${elixir_ls_release}/${1} rm .tool-versions - mix do deps.clean --all, clean + mise exec erlang@${current_erlang} elixir@${current_elixir} --command "mix do deps.clean --all, clean" git checkout master } -- 2.47.2