From f8565daf66763337431b4c2bdf80034e4b4a9a03 Mon Sep 17 00:00:00 2001 From: xiudi Date: Fri, 3 Jan 2025 18:10:02 +0800 Subject: [PATCH] Add emacs-rime as input method --- init.el | 1 + install/install-arch.sh | 46 ++++++++++++++++++++++++++++++++++++++++ install/install-macos.sh | 4 ++++ lisp/init-rime.el | 18 ++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 install/install-arch.sh create mode 100644 lisp/init-rime.el diff --git a/init.el b/init.el index 74c9183..4fa1ea9 100644 --- a/init.el +++ b/init.el @@ -19,6 +19,7 @@ (require 'init-save) (require 'init-window) (require 'init-ai) +(require 'init-rime) ;; Edit (require 'init-completion) diff --git a/install/install-arch.sh b/install/install-arch.sh new file mode 100644 index 0000000..3ca0470 --- /dev/null +++ b/install/install-arch.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +if command -v xelatex > /dev/null 2> /dev/null; then + echo "TeX Live is already installed." +else + echo "ERROR! TeX Live has not been installed. Make sure it's installed and environment variables are configured correctly." + echo "Depends on the TeX Live edition, append corresponding environments variables into ~/.zshrc" + echo 'export PATH="/usr/local/texlive/2024/bin/x86_64-linux:$PATH"' + echo 'export MANPATH="/usr/local/texlive/2024/texmf-dist/doc/man:$MANPATH"' + echo 'export INFOPATH="/usr/local/texlive/2024/texmf-dist/doc/info:$INFOPATH"' + exit 1 +fi + +# emacs +sudo pacman -S emacs + +# fonts +yay -S nerd-fonts-sarasa-term +sudo pacman -S ttf-nerd-fonts-symbols + +# lsp-bridge +## dependency +sudo pacman -S python-orjson python-six python-setuptools python-paramiko python-rapidfuzz python-watchdog python-packaging +yay -S python-epc python-sexpdata python-pynput +## lsp +sudo pacman -S npm +sudo npm install -g yaml-language-server +sudo npm install -g bash-language-server +sudo npm install -g vscode-langservers-extracted +sudo npm install -g pyright +yay -S python-lsp-ruff +sudo pacman -S texlab + +# vterm +sudo pacman -S cmake + +# aider +export PATH="$PATH:$HOME/.local/bin" +python -m pip install aider-install --break-system-packages +aider-install + +# rime +sudo pacman -S librime + +# fetch submodules +git submodule update --init diff --git a/install/install-macos.sh b/install/install-macos.sh index f59f520..257960c 100644 --- a/install/install-macos.sh +++ b/install/install-macos.sh @@ -36,5 +36,9 @@ brew install texlab # aider brew install aider +# rime +brew install --cask squirrel +brew install librime + # fetch submodules git submodule update --init diff --git a/lisp/init-rime.el b/lisp/init-rime.el new file mode 100644 index 0000000..8311b83 --- /dev/null +++ b/lisp/init-rime.el @@ -0,0 +1,18 @@ +;;; init-rime.el --- Rime settings -*- lexical-binding: t -*- +;;; Commentary: + +;;; Code: + +(use-package rime + :ensure t + :config + (setq default-input-method "rime") + (setq rime-user-data-dir "~/.config/fcitx/rime") + (setq rime-show-candidate 'posframe) + :bind + ("C-SPC" . 'toggle-input-method) + ) + +(provide 'init-rime) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; init-rime.el ends here