Compare commits

...

10 commits

Author SHA1 Message Date
4270600681 fix: add rm and host option 2025-05-03 15:59:05 +00:00
d5976350eb (feat): add Host option 2025-04-22 08:38:23 +00:00
f4a3b87d4f (refactor): declaring some env vars 2025-04-21 15:22:59 +00:00
f15965991d (feat): add ollama provider to avante plugin.
Since Auth header is not supported by avante yet. Using patched version.
2025-04-21 15:22:16 +00:00
868f0a5eee (fix): remove WAYLAND_DISPLAY 2025-04-21 14:01:58 +00:00
ae9a96d0f7 (feat): add avante plugin on neovim 2025-04-21 05:45:30 +00:00
e08ef74fa4 (feat): add osc52 support 2025-04-17 04:41:20 +00:00
ff50325ade feat: add env to set host network 2025-04-04 11:13:25 +00:00
e752b042be fix locale configuration 2025-04-04 11:12:57 +00:00
adb1593a5a fix: install typescript when build 2025-04-04 11:02:18 +00:00
7 changed files with 97 additions and 8 deletions

View file

@ -0,0 +1,35 @@
return {
"bumpsoo/avante.nvim",
event = "VeryLazy",
version = false,
opts = {
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",
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" },
},
},
}

View file

@ -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
}

View file

@ -20,6 +20,7 @@ return {
"yaml", "yaml",
'python', 'python',
"terraform", "terraform",
"markdown",
}, },
}) })
end end

View file

@ -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 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 y send-keys -X copy-selection-and-cancel
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle 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"

View file

@ -16,7 +16,8 @@ RUN apt-get update && apt-get install -y \
python3-venv \ python3-venv \
sudo 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 UID
ARG GID ARG GID
@ -57,7 +58,7 @@ ENV NVM_DIR=${HOME}/.nvm
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash \ RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash \
&& . $NVM_DIR/nvm.sh \ && . $NVM_DIR/nvm.sh \
&& nvm install --lts \ && 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 COPY --chown=${USERNAME}:${GID} ${CONFIG_PREFIX}.gitconfig /home/${USERNAME}/.gitconfig
@ -65,7 +66,10 @@ COPY --chown=${USERNAME}:${GID} .config/nvim /home/${USERNAME}/.config/nvim
COPY --chown=${USERNAME}:${GID} .tmux.conf /home/${USERNAME}/.tmux.conf 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 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
CMD ["/bin/bash"] CMD ["/bin/bash"]

View file

@ -1,15 +1,24 @@
RUN_OPTION=\ RUN_OPTION=\
-it \ -it \
--rm \
-v ${HOME}/.ssh:/home/$(shell id -un)/.ssh \ -v ${HOME}/.ssh:/home/$(shell id -un)/.ssh \
-v ${PWD}:/workspace -v ${PWD}:/workspace
ifdef WAYLAND_DISPLAY ifdef HOST
RUN_OPTION += \ RUN_OPTION += \
-e WAYLAND_DISPLAY=${WAYLAND_DISPLAY} \ --network host
-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 endif
ENV_VARS := GROQ_API_KEY OLLAMA_API_BASE OLLAMA_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_OPTION=\
--build-arg USERNAME=$(shell id -un) \ --build-arg USERNAME=$(shell id -un) \
--build-arg UID=$(shell id -u) --build-arg UID=$(shell id -u)

9
bin/osc52_copy Executable file
View file

@ -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')"