diff --git a/init.lua b/init.lua index e0379ee..c5005f5 100644 --- a/init.lua +++ b/init.lua @@ -32,6 +32,17 @@ vim.opt.shortmess:append("sI") vim.opt.wrap = false vim.opt.title = true vim.opt.titlestring = [[%{fnamemodify(getcwd(), ':t')}]] +vim.g.clipboard = { + name = 'OSC 52', + copy = { + ['+'] = require('vim.ui.clipboard.osc52').copy('+'), + ['*'] = require('vim.ui.clipboard.osc52').copy('*'), + }, + paste = { + ['+'] = require('vim.ui.clipboard.osc52').paste('+'), + ['*'] = require('vim.ui.clipboard.osc52').paste('*'), + }, +} ------------------------------------------------------------------------------- -- VSCode @@ -567,3 +578,4 @@ vim.api.nvim_create_autocmd('BufWritePost', { vim.loop.spawn("git", { args = { "push" } }) end }) + diff --git a/nvim_remote b/nvim_remote index d213ff6..8ed6be5 100755 --- a/nvim_remote +++ b/nvim_remote @@ -1,7 +1,8 @@ #!/bin/bash -line=$(cut -d " " -f 1 <<< $@) -path=$(cut -d " " -f 2 <<< $@) +IFS=':' read -a args <<< "$1" +path=${args[0]} +line=${args[1]} main_module_repo_path=$(git rev-parse --show-superproject-working-tree 2>/dev/null) repo_path=$(git rev-parse --show-toplevel 2>/dev/null) @@ -16,9 +17,9 @@ relative_file_path=$path servername=/tmp/nvr$(echo $main_module_repo_path | tr "/" "_") if [ -f "$relative_file_path" ]; then - nvr -s --servername $servername $line "$relative_file_path" + nvr -s --servername $servername +$line "$relative_file_path" elif [ -f "$repo_relative_file_path" ]; then - nvr -s --servername $servername $line "$repo_relative_file_path" + nvr -s --servername $servername +$line "$repo_relative_file_path" elif [ -f "$main_module_relative_file_path" ]; then - nvr -s --servername $servername $line "$main_module_relative_file_path" + nvr -s --servername $servername +$line "$main_module_relative_file_path" fi diff --git a/tmux.conf b/tmux.conf index dba8ace..6faf185 100644 --- a/tmux.conf +++ b/tmux.conf @@ -2,6 +2,11 @@ set-option -g status-right "" set -g @plugin 'catppuccin/tmux' set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'Morantron/tmux-fingers' + +set -s set-clipboard on +set -g @fingers-pattern-filelc '(([.\w\-~\$@]+)?(/[.\w\-@]+)+/?(\:\d+){0,2})' +bind -n C-f run -b "#{@fingers-cli} start #{pane_id} --patterns filelc --main-action 'xargs nvim_remote'" set-option -sa terminal-features ',xterm-256color:RGB'