mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
minor fix
This commit is contained in:
parent
6edb5d9e90
commit
5dc5ba0c5f
4 changed files with 23 additions and 15 deletions
|
|
@ -278,7 +278,7 @@ const searchAliases = [
|
||||||
["aw", "ArchWiki", "https://wiki.archlinux.org/index.php?search="],
|
["aw", "ArchWiki", "https://wiki.archlinux.org/index.php?search="],
|
||||||
["bd", "Baidu", "https://www.baidu.com/s?wd="],
|
["bd", "Baidu", "https://www.baidu.com/s?wd="],
|
||||||
["bi", "Bing", "https://www.bing.com/search?q="],
|
["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 "],
|
["br", "HomeBrew", "https://duckduckgo.com/?q=!brew "],
|
||||||
["cg", "ChatGPT", "https://chat.openai.com/?q="],
|
["cg", "ChatGPT", "https://chat.openai.com/?q="],
|
||||||
["cr", "Chrome Web Store", "https://chrome.google.com/webstore/search/"],
|
["cr", "Chrome Web Store", "https://chrome.google.com/webstore/search/"],
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,24 @@
|
||||||
;;; init-package.el
|
;;; init-package.el
|
||||||
|
|
||||||
;; Manual Install Packages (plugins): Options > Manage Emacs Packages (Don't use this)
|
;; Ensure use-package is installed
|
||||||
|
(unless (package-installed-p 'use-package) ; 修正条件检查
|
||||||
(global-company-mode 1) ; Enable company
|
|
||||||
|
|
||||||
;; Ensure use-package is installed (use-package: lazy load plugin manager)
|
|
||||||
(unless (package-install 'use-package)
|
|
||||||
(package-refresh-contents)
|
(package-refresh-contents)
|
||||||
(package-install 'use-package))
|
(package-install 'use-package))
|
||||||
|
|
||||||
;; Plugins Here
|
;; Use `use-package` for plugin management
|
||||||
|
(eval-when-compile
|
||||||
|
(require 'use-package))
|
||||||
|
|
||||||
;; Company - Complete Anything
|
;; Company - Complete Anything
|
||||||
(use-package company
|
(use-package company
|
||||||
:ensure t
|
: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
|
:config
|
||||||
(global-company-mode 1)
|
(setq company-minimum-prefix-length 1 ; 设置最短补全前缀
|
||||||
(define-key company-active-map (kbd "C-n") 'company-select-next)
|
company-idle-delay 0.2)) ; 设置补全延迟(秒)
|
||||||
(define-key company-active-map (kbd "C-p") 'company-select-previous))
|
|
||||||
|
|
||||||
|
|
||||||
(provide 'init-package)
|
(provide 'init-package)
|
||||||
|
;;; init-package.el ends here
|
||||||
|
|
|
||||||
|
|
@ -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_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_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)
|
set -gx XDG_CACHE_HOME (set -q XDG_CACHE_HOME; and echo $XDG_CACHE_HOME; or echo $HOME/.cache)
|
||||||
set -gx XDG_RUNTIME_DIR /run/user/(id -u)
|
|
||||||
|
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 PAGER "less -R"
|
||||||
set -gx EDITOR nvim
|
set -gx EDITOR nvim
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue