diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-03-12 23:58:54 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-03-12 23:58:54 +0900 |
| commit | 6747549e3a712d45422d88ac0583a90fbb1e18b6 (patch) | |
| tree | 597f1f9f0c9ea819371f42293d1dc252a64508c9 /scripts | |
| parent | 11c9b4e4018c1979ca65a0250f626d6bc5358726 (diff) | |
| download | dotfiles-6747549e3a712d45422d88ac0583a90fbb1e18b6.tar.gz dotfiles-6747549e3a712d45422d88ac0583a90fbb1e18b6.tar.zst dotfiles-6747549e3a712d45422d88ac0583a90fbb1e18b6.zip | |
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/rotate-nvim-lsp-log.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/rotate-nvim-lsp-log.sh b/scripts/rotate-nvim-lsp-log.sh new file mode 100644 index 0000000..705aa60 --- /dev/null +++ b/scripts/rotate-nvim-lsp-log.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +set -euo pipefail + +lsp_log=$(nvim --headless -c "lua io.stdout:write(vim.lsp.get_log_path())" -c "qa" 2>/dev/null) + +if [[ -s "$lsp_log" ]]; then + cp "$lsp_log" "$lsp_log.bak" + truncate -s 0 "$lsp_log" +fi |
