minor fix

This commit is contained in:
js0ny 2025-01-28 21:23:28 +00:00
parent 6edb5d9e90
commit 5dc5ba0c5f
4 changed files with 23 additions and 15 deletions

View file

@ -278,7 +278,7 @@ const searchAliases = [
["aw", "ArchWiki", "https://wiki.archlinux.org/index.php?search="],
["bd", "Baidu", "https://www.baidu.com/s?wd="],
["bi", "Bing", "https://www.bing.com/search?q="],
["bl", "Bilibili", "https://search.bilibili.com/all?keyword="]
["bl", "Bilibili", "https://search.bilibili.com/all?keyword="],
["br", "HomeBrew", "https://duckduckgo.com/?q=!brew "],
["cg", "ChatGPT", "https://chat.openai.com/?q="],
["cr", "Chrome Web Store", "https://chrome.google.com/webstore/search/"],

View file

@ -1,22 +1,24 @@
;;; init-package.el
;; Manual Install Packages (plugins): Options > Manage Emacs Packages (Don't use this)
(global-company-mode 1) ; Enable company
;; Ensure use-package is installed (use-package: lazy load plugin manager)
(unless (package-install 'use-package)
;; Ensure use-package is installed
(unless (package-installed-p 'use-package) ; 修正条件检查
(package-refresh-contents)
(package-install 'use-package))
;; Plugins Here
;; Use `use-package` for plugin management
(eval-when-compile
(require 'use-package))
;; Company - Complete Anything
(use-package company
:ensure t
:hook (after-init . global-company-mode) ; 在启动后自动启用 global-company-mode
:bind (:map company-active-map ; 自定义快捷键
("C-n" . company-select-next)
("C-p" . company-select-previous))
:config
(global-company-mode 1)
(define-key company-active-map (kbd "C-n") 'company-select-next)
(define-key company-active-map (kbd "C-p") 'company-select-previous))
(setq company-minimum-prefix-length 1 ; 设置最短补全前缀
company-idle-delay 0.2)) ; 设置补全延迟(秒)
(provide 'init-package)
;;; init-package.el ends here

View file

@ -16,7 +16,13 @@ set -gx XDG_CONFIG_HOME (set -q XDG_CONFIG_HOME; and echo $XDG_CONFIG_HOME; or e
set -gx XDG_DATA_HOME (set -q XDG_DATA_HOME; and echo $XDG_DATA_HOME; or echo $HOME/.local/share)
set -gx XDG_STATE_HOME (set -q XDG_STATE_HOME; and echo $XDG_STATE_HOME; or echo $HOME/.local/state)
set -gx XDG_CACHE_HOME (set -q XDG_CACHE_HOME; and echo $XDG_CACHE_HOME; or echo $HOME/.cache)
if test (uname) = "Darwin"
set -gx XDG_RUNTIME_DIR $HOME/.tmp/run/
else
set -gx XDG_RUNTIME_DIR /run/user/(id -u)
end
set -gx PAGER "less -R"
set -gx EDITOR nvim