From adb1593a5a3e66db183021a648bfb19098bc71a2 Mon Sep 17 00:00:00 2001 From: bumpsoo Date: Fri, 4 Apr 2025 11:02:18 +0000 Subject: [PATCH 01/10] fix: install typescript when build --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fc22584..318bd79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,7 +57,7 @@ ENV NVM_DIR=${HOME}/.nvm RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash \ && . $NVM_DIR/nvm.sh \ && nvm install --lts \ - && npm install -g typescript-language-server + && npm install -g typescript typescript-language-server COPY --chown=${USERNAME}:${GID} ${CONFIG_PREFIX}.gitconfig /home/${USERNAME}/.gitconfig From e752b042be2c6a819c851b29c8e2b10a87bd092b Mon Sep 17 00:00:00 2001 From: bumpsoo Date: Fri, 4 Apr 2025 11:12:57 +0000 Subject: [PATCH 02/10] fix locale configuration --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 318bd79..5199caf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,8 @@ RUN apt-get update && apt-get install -y \ python3-venv \ sudo -RUN locale-gen ko_KR.UTF-8 +RUN echo "ko_KR.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen +RUN locale-gen ARG UID ARG GID @@ -65,7 +66,8 @@ COPY --chown=${USERNAME}:${GID} .config/nvim /home/${USERNAME}/.config/nvim COPY --chown=${USERNAME}:${GID} .tmux.conf /home/${USERNAME}/.tmux.conf -RUN locale-gen ko_KR.UTF-8 && echo 'export LANG=ko_KR.UTF-8' >> ~/.bashrc +RUN echo 'export LANG=ko_KR.UTF-8' >> ~/.bashrc \ + && echo 'export LC_ALL=ko_KR.UTF-8' >> ~/.bashrc CMD ["/bin/bash"] From ff50325adeafbd7c3a97fcb097b08e0dcfc551d2 Mon Sep 17 00:00:00 2001 From: bumpsoo Date: Fri, 4 Apr 2025 11:13:25 +0000 Subject: [PATCH 03/10] feat: add env to set host network --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 2574f08..261e084 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,11 @@ ifdef WAYLAND_DISPLAY -v /run/user/$(shell id -u)/wayland-0:/run/user/$(shell id -u)/wayland-0 endif +ifdef HOST + RUN_OPTION += \ + --network host +endif + BUILD_OPTION=\ --build-arg USERNAME=$(shell id -un) \ --build-arg UID=$(shell id -u) From e08ef74fa40f7b709b693c83918187b988d286c4 Mon Sep 17 00:00:00 2001 From: bumpsoo Date: Thu, 17 Apr 2025 04:26:25 +0000 Subject: [PATCH 04/10] (feat): add osc52 support --- .config/nvim/lua/bumpsoo/plugins/osc_yank.lua | 27 +++++++++++++++++++ .tmux.conf | 6 ++++- Dockerfile | 2 ++ bin/osc52_copy | 9 +++++++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .config/nvim/lua/bumpsoo/plugins/osc_yank.lua create mode 100755 bin/osc52_copy diff --git a/.config/nvim/lua/bumpsoo/plugins/osc_yank.lua b/.config/nvim/lua/bumpsoo/plugins/osc_yank.lua new file mode 100644 index 0000000..56f0664 --- /dev/null +++ b/.config/nvim/lua/bumpsoo/plugins/osc_yank.lua @@ -0,0 +1,27 @@ +return { + 'ojroques/vim-oscyank', + config = function() + local valid_registers = { + [''] = true, + ['+'] = true, + ['*'] = true, + } + + local valid_operators = { + ['y'] = true, + ['d'] = true, + } + + vim.api.nvim_create_autocmd('TextYankPost', { + callback = function() + local regname = vim.v.event.regname + local operator = vim.v.event.operator + + if valid_registers[regname] and valid_operators[operator] then + vim.fn.OSCYankRegister(regname) + end + end, + }) + end +} + diff --git a/.tmux.conf b/.tmux.conf index 2b9e582..9231750 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -3,5 +3,9 @@ setw -g mode-keys vi bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel bind-key -T copy-mode-vi 'r' send -X rectangle-toggle -set -s copy-command 'wl-copy' + +set-option -s set-clipboard on + +bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "tmux save-buffer - | tmux load-buffer - && tmux show-buffer | osc52_copy" +bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel "tmux save-buffer - | tmux load-buffer - && tmux show-buffer | osc52_copy" diff --git a/Dockerfile b/Dockerfile index 5199caf..28c7e2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,6 +66,8 @@ COPY --chown=${USERNAME}:${GID} .config/nvim /home/${USERNAME}/.config/nvim COPY --chown=${USERNAME}:${GID} .tmux.conf /home/${USERNAME}/.tmux.conf +COPY --chown=${USERNAME}:${GID} bin/osc52_copy /home/${USERNAME}/.local/bin/osc52_copy + RUN echo 'export LANG=ko_KR.UTF-8' >> ~/.bashrc \ && echo 'export LC_ALL=ko_KR.UTF-8' >> ~/.bashrc diff --git a/bin/osc52_copy b/bin/osc52_copy new file mode 100755 index 0000000..617eb33 --- /dev/null +++ b/bin/osc52_copy @@ -0,0 +1,9 @@ +#!/bin/bash +# OSC52로 클립보드에 복사하는 스크립트 +if [ -t 0 ]; then + input="$*" +else + input="$(cat)" +fi +printf '\033]52;c;%s\a' "$(printf "%s" "$input" | base64 | tr -d '\r\n')" + From ae9a96d0f7f26fd20605696d283681112d58b602 Mon Sep 17 00:00:00 2001 From: bumpsoo Date: Mon, 21 Apr 2025 05:45:30 +0000 Subject: [PATCH 05/10] (feat): add avante plugin on neovim --- .config/nvim/lua/bumpsoo/plugins/avante.lua | 30 +++++++++++++++++++ .../nvim/lua/bumpsoo/plugins/treesitter.lua | 1 + Makefile | 5 ++++ 3 files changed, 36 insertions(+) create mode 100644 .config/nvim/lua/bumpsoo/plugins/avante.lua diff --git a/.config/nvim/lua/bumpsoo/plugins/avante.lua b/.config/nvim/lua/bumpsoo/plugins/avante.lua new file mode 100644 index 0000000..41bc09f --- /dev/null +++ b/.config/nvim/lua/bumpsoo/plugins/avante.lua @@ -0,0 +1,30 @@ +return { + "yetone/avante.nvim", + event = "VeryLazy", + version = false, + opts = { + provider = "groq", + vendors = { + groq = { + __inherited_from = "openai", + api_key_name = "GROQ_API_KEY", + endpoint = "https://api.groq.com/openai/v1/", + model = "meta-llama/llama-4-maverick-17b-128e-instruct", + max_tokens = 8192, + }, + } + }, + dependencies = { + "nvim-treesitter/nvim-treesitter", + "stevearc/dressing.nvim", + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", + { + 'MeanderingProgrammer/render-markdown.nvim', + opts = { + file_types = { "markdown", "Avante" }, + }, + ft = { "markdown", "Avante" }, + }, + }, +} diff --git a/.config/nvim/lua/bumpsoo/plugins/treesitter.lua b/.config/nvim/lua/bumpsoo/plugins/treesitter.lua index c7c2c6f..0c182f0 100644 --- a/.config/nvim/lua/bumpsoo/plugins/treesitter.lua +++ b/.config/nvim/lua/bumpsoo/plugins/treesitter.lua @@ -20,6 +20,7 @@ return { "yaml", 'python', "terraform", + "markdown", }, }) end diff --git a/Makefile b/Makefile index 261e084..911a073 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,11 @@ ifdef HOST --network host endif +ifdef GROQ_API_KEY + RUN_OPTION += \ + -e GROQ_API_KEY=${GROQ_API_KEY} +endif + BUILD_OPTION=\ --build-arg USERNAME=$(shell id -un) \ --build-arg UID=$(shell id -u) From 868f0a5eeee590e37065515b0d7b39b6e9eb1eb8 Mon Sep 17 00:00:00 2001 From: bumpsoo Date: Mon, 21 Apr 2025 14:01:58 +0000 Subject: [PATCH 06/10] (fix): remove WAYLAND_DISPLAY --- Makefile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Makefile b/Makefile index 911a073..2862dbc 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,6 @@ RUN_OPTION=\ -v ${HOME}/.ssh:/home/$(shell id -un)/.ssh \ -v ${PWD}:/workspace -ifdef WAYLAND_DISPLAY - RUN_OPTION += \ - -e WAYLAND_DISPLAY=${WAYLAND_DISPLAY} \ - -e XDG_RUNTIME_DIR=/run/user/$(shell id -u) \ - -v /run/user/$(shell id -u)/wayland-0:/run/user/$(shell id -u)/wayland-0 -endif - ifdef HOST RUN_OPTION += \ --network host From f15965991dbddf3915e73f5e1deda041ea201d9a Mon Sep 17 00:00:00 2001 From: bumpsoo Date: Mon, 21 Apr 2025 15:22:16 +0000 Subject: [PATCH 07/10] (feat): add ollama provider to avante plugin. Since Auth header is not supported by avante yet. Using patched version. --- .config/nvim/lua/bumpsoo/plugins/avante.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.config/nvim/lua/bumpsoo/plugins/avante.lua b/.config/nvim/lua/bumpsoo/plugins/avante.lua index 41bc09f..8cf2e82 100644 --- a/.config/nvim/lua/bumpsoo/plugins/avante.lua +++ b/.config/nvim/lua/bumpsoo/plugins/avante.lua @@ -1,9 +1,14 @@ return { - "yetone/avante.nvim", + "bumpsoo/avante.nvim", event = "VeryLazy", version = false, opts = { - provider = "groq", + provider = "ollama", + ollama = { + endpoint = os.getenv("OLLAMA_API_BASE"), + model = "gemma3:27b-it-qat", + api_key_name = "OLLAMA_API_KEY", + }, vendors = { groq = { __inherited_from = "openai", From f4a3b87d4fc2c91d9fe68fb83858e8b7f5c0343b Mon Sep 17 00:00:00 2001 From: bumpsoo Date: Mon, 21 Apr 2025 15:22:59 +0000 Subject: [PATCH 08/10] (refactor): declaring some env vars --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 2862dbc..99da8bb 100644 --- a/Makefile +++ b/Makefile @@ -3,15 +3,15 @@ RUN_OPTION=\ -v ${HOME}/.ssh:/home/$(shell id -un)/.ssh \ -v ${PWD}:/workspace -ifdef HOST - RUN_OPTION += \ - --network host -endif +ENV_VARS := GROQ_API_KEY OLLAMA_API_BASE OLLAMA_API_KEY -ifdef GROQ_API_KEY - RUN_OPTION += \ - -e GROQ_API_KEY=${GROQ_API_KEY} +define CHECK_AND_APPEND +ifneq ($($(1)),) + RUN_OPTION += -e $(1)=$($(1)) endif +endef + +$(foreach VAR,$(ENV_VARS),$(eval $(call CHECK_AND_APPEND,$(VAR)))) BUILD_OPTION=\ --build-arg USERNAME=$(shell id -un) \ From d5976350ebc45d8eac5458b2e1a66861a9e05d8e Mon Sep 17 00:00:00 2001 From: bumpsoo Date: Tue, 22 Apr 2025 08:38:23 +0000 Subject: [PATCH 09/10] (feat): add Host option --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 99da8bb..836f329 100644 --- a/Makefile +++ b/Makefile @@ -3,11 +3,16 @@ RUN_OPTION=\ -v ${HOME}/.ssh:/home/$(shell id -un)/.ssh \ -v ${PWD}:/workspace +ifdef HOST + RUN_OPTION += \ + network host +endif + ENV_VARS := GROQ_API_KEY OLLAMA_API_BASE OLLAMA_API_KEY define CHECK_AND_APPEND ifneq ($($(1)),) - RUN_OPTION += -e $(1)=$($(1)) + RUN_OPTION += -e $(1)=$($(1)) endif endef From 42706006814849c8ee86cb030c623876115f293d Mon Sep 17 00:00:00 2001 From: bumpsoo Date: Sat, 3 May 2025 15:59:05 +0000 Subject: [PATCH 10/10] fix: add rm and host option --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 836f329..c96dceb 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,12 @@ RUN_OPTION=\ -it \ + --rm \ -v ${HOME}/.ssh:/home/$(shell id -un)/.ssh \ -v ${PWD}:/workspace ifdef HOST RUN_OPTION += \ - network host + --network host endif ENV_VARS := GROQ_API_KEY OLLAMA_API_BASE OLLAMA_API_KEY