求助:谁能贴下doom-emacs下的snails配置么

如题。谁能贴下doom-emacs下的snails配置么。我配置了use-package!和 package! 后各种问题。启动不了snails。有点崩溃(系统mac)。 我的配置如下

(package! snails
 :recipe (:host github :repo "manateelazycat/snails"))

(use-package! snails
  :init
  (csetq snails-use-exec-path-from-shell nil))

snails 包最好不要编译。

中 :recipe 部分改为 (:host github :repo "manateelazycat/snails" :no-byte-compile t )

1 个赞

感谢,确实编译后的问题。。

不过(setq snails-use-exec-path-from-shell nil) 后,似乎snails rg不可用了。

还有就是样式比较古怪

Snails 最新版已经解决了编译成 elc 无法使用的问题。

可以更新试一下。

1 个赞

编译后还是用不了,还有一个问题,就是执行snails后,总是在一个全屏的窗口中显示,而不是悬浮窗,我用的是windows10。

编译后具体报啥错? 能粘贴下吗?

悬浮窗口和系统的窗口管理策略相关,可以尝试一下 (setq snails-show-with-frame nil)

doom emacs GccEmacs: 报错如下 暂时删除rm ~/.emacs.d/.local/straight/build-28.0.50/snails/snails-backend-*.elc 保证编译后能运行。话说snails目前pinyinlab还没支持?

the summary

Debugger entered–Lisp error: (invalid-function snails-create-sync-backend) snails-create-sync-backend(:name “IMENU” :candidate-filter #f(compiled-function (input) #<bytecode -0x91e1c06442cda9>) :candidate-do #f(compiled-function (candidate) #<bytecode 0x16557125b46eafce>)) byte-code("\300\301\302\303\304\305\306&\6\210\307\310!\207" [snails-create-sync-backend :name “IMENU” :candidate-filter #f(compiled-function (input) #<bytecode -0x91e1c06442cda9>) :candidate-do #f(compiled-function (candidate) #<bytecode 0x16557125b46eafce>) provide snails-backend-imenu] 7) require(snails-backend-imenu) eval-buffer(#<buffer load-416750> nil “/home/gtrun/.emacs.d/.local/straight/build-28.0.50…” nil t) ; Reading at buffer position 2284 load-with-code-conversion("/home/gtrun/.emacs.d/.local/straight/build-28.0.50…" “/home/gtrun/.emacs.d/.local/straight/build-28.0.50…” nil t) require(snails nil nil) eval-buffer(#<buffer load-335833> nil “/home/gtrun/.doom.d/config.el” nil t) ; Reading at buffer position 6602 load-with-code-conversion("/home/gtrun/.doom.d/config.el" “/home/gtrun/.doom.d/config.el” t t) load("/home/gtrun/.doom.d/config" t nomessage) (let (file-name-handler-alist) (load (expand-file-name “config” doom-private-dir) t 'nomessage)) (condition-case e (let (file-name-handler-alist) (load (expand-file-name “config” doom-private-dir) t 'nomessage)) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom–handle-load-error e (expand-file-name “config” doom-private-dir) doom-private-dir))) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped 'doom-init-modules-hook #'doom-try-run-hook) (condition-case e (let (file-name-handler-alist) (load (expand-file-name “config” doom-private-dir) t 'nomessage)) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom–handle-load-error e (expand-file-name “config” doom-private-dir) doom-private-dir))) (load custom-file 'noerror (not doom-debug-mode))) (progn (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #(“DOOM Initializing user config” 0 5 (face font-lock-comment-face)))))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped 'doom-before-init-modules-hook #'doom-try-run-hook) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped 'doom-init-modules-hook #'doom-try-run-hook) (condition-case e (let (file-name-handler-alist) (load (expand-file-name “config” doom-private-dir) t 'nomessage)) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom–handle-load-error e (expand-file-name “config” doom-private-dir) doom-private-dir))) (load custom-file 'noerror (not doom-debug-mode)))) (if init-p (progn (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #(“DOOM Initializing user config” 0 5 (face font-lock-comment-face)))))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped 'doom-before-init-modules-hook #'doom-try-run-hook) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped 'doom-init-modules-hook #'doom-try-run-hook) (condition-case e (let (file-name-handler-alist) (load (expand-file-name “config” doom-private-dir) t 'nomessage)) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom–handle-load-error e (expand-file-name “config” doom-private-dir) doom-private-dir))) (load custom-file 'noerror (not doom-debug-mode)))) nil) (let* ((init-p (and t (condition-case e (let (file-name-handler-alist) (load (expand-file-name doom-module-init-file doom-private-dir) t 'nomessage)) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom–handle-load-error e (expand-file-name doom-module-init-file doom-private-dir) doom-private-dir)))))) (if init-p (progn (if doom-debug-p (progn (let ((inhibit-message …)) (message #(“DOOM Initializing user config” 0 5 …))))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped 'doom-before-init-modules-hook #'doom-try-run-hook) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped 'doom-init-modules-hook #'doom-try-run-hook) (condition-case e (let (file-name-handler-alist) (load (expand-file-name “config” doom-private-dir) t 'nomessage)) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (doom–handle-load-error e (expand-file-name “config” doom-private-dir) doom-private-dir))) (load custom-file 'noerror (not doom-debug-mode)))) nil)) (progn (setq doom-init-modules-p t) (if no-config-p nil (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #(“DOOM Initializing core modules” 0 5 (face font-lock-comment-face)))))) (doom-initialize-core-modules)) (let* ((init-p (and t (condition-case e (let (file-name-handler-alist) (load … t …)) ((debug doom-error) (signal … …)) ((debug error) (doom–handle-load-error e … doom-private-dir)))))) (if init-p (progn (if doom-debug-p (progn (let (…) (message …)))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped 'doom-before-init-modules-hook #'doom-try-run-hook) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped 'doom-init-modules-hook #'doom-try-run-hook) (condition-case e (let (file-name-handler-alist) (load … t …)) ((debug doom-error) (signal … …)) ((debug error) (doom–handle-load-error e … doom-private-dir))) (load custom-file 'noerror (not doom-debug-mode)))) nil))) (if (or force-p (not doom-init-modules-p)) (progn (setq doom-init-modules-p t) (if no-config-p nil (if doom-debug-p (progn (let ((inhibit-message …)) (message #(“DOOM Initializing core modules” 0 5 …))))) (doom-initialize-core-modules)) (let* ((init-p (and t (condition-case e (let … …) (… …) (… …))))) (if init-p (progn (if doom-debug-p (progn (let … …))) (maphash (doom-module-loader doom-module-init-file) doom-modules) (run-hook-wrapped 'doom-before-init-modules-hook #'doom-try-run-hook) (if no-config-p nil (maphash (doom-module-loader doom-module-config-file) doom-modules) (run-hook-wrapped 'doom-init-modules-hook #'doom-try-run-hook) (condition-case e (let … …) (… …) (… …)) (load custom-file 'noerror (not doom-debug-mode)))) nil)))) doom-initialize-modules(nil) (progn (setq doom-init-p t) (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #(“DOOM Initializing Doom” 0 5 (face font-lock-comment-face)))))) (progn (set-default 'exec-path doom–initial-exec-path) (set-default 'load-path doom–initial-load-path) (set-default 'process-environment doom–initial-process-environment)) (condition-case e (load (string-remove-suffix “.el” doom-autoloads-file) nil 'nomessage) (file-missing (if (locate-file doom-autoloads-file load-path) (signal 'doom-autoload-error e) (signal 'doom-error (list “Doom is in an incomplete state” “run ‘doom sync’ on the command line to repair it”))))) (if (or (display-graphic-p) (daemonp)) (doom-load-envvars-file doom-env-file 'noerror)) (require 'core-modules) (autoload 'doom-initialize-packages “core-packages”) (eval-after-load ‘package #’(lambda nil (require 'core-packages))) (eval-after-load ‘straight #’(lambda nil (doom-initialize-packages))) (add-hook 'doom-first-buffer-hook #'gcmh-mode) (add-hook 'after-change-major-mode-hook #'doom-run-local-var-hooks-h) (add-hook 'emacs-startup-hook #'doom-load-packages-incrementally-h) (add-hook 'window-setup-hook #'doom-display-benchmark-h) (doom-run-hook-on 'doom-first-buffer-hook '(after-find-file doom-switch-buffer-hook)) (doom-run-hook-on 'doom-first-file-hook '(after-find-file dired-initial-position-hook)) (doom-run-hook-on 'doom-first-input-hook '(pre-command-hook)) (if doom-debug-p (doom-debug-mode 1)) (doom-initialize-modules force-p)) (if (or force-p (not doom-init-p)) (progn (setq doom-init-p t) (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #(“DOOM Initializing Doom” 0 5 (face font-lock-comment-face)))))) (progn (set-default 'exec-path doom–initial-exec-path) (set-default 'load-path doom–initial-load-path) (set-default 'process-environment doom–initial-process-environment)) (condition-case e (load (string-remove-suffix “.el” doom-autoloads-file) nil 'nomessage) (file-missing (if (locate-file doom-autoloads-file load-path) (signal 'doom-autoload-error e) (signal 'doom-error (list “Doom is in an incomplete state” “run ‘doom sync’ on the command line to repair it”))))) (if (or (display-graphic-p) (daemonp)) (doom-load-envvars-file doom-env-file 'noerror)) (require 'core-modules) (autoload 'doom-initialize-packages “core-packages”) (eval-after-load ‘package #’(lambda nil (require 'core-packages))) (eval-after-load ‘straight #’(lambda nil (doom-initialize-packages))) (add-hook 'doom-first-buffer-hook #'gcmh-mode) (add-hook 'after-change-major-mode-hook #'doom-run-local-var-hooks-h) (add-hook 'emacs-startup-hook #'doom-load-packages-incrementally-h) (add-hook 'window-setup-hook #'doom-display-benchmark-h) (doom-run-hook-on 'doom-first-buffer-hook '(after-find-file doom-switch-buffer-hook)) (doom-run-hook-on 'doom-first-file-hook '(after-find-file dired-initial-position-hook)) (doom-run-hook-on 'doom-first-input-hook '(pre-command-hook)) (if doom-debug-p (doom-debug-mode 1)) (doom-initialize-modules force-p))) doom-initialize() eval-buffer(#<buffer load> nil “/home/gtrun/.emacs.d/init.el” nil t) ; Reading at buffer position 2110 load-with-code-conversion("/home/gtrun/.emacs.d/init.el" “/home/gtrun/.emacs.d/init.el” t t) load("/home/gtrun/.emacs.d/init" noerror nomessage) startup–load-user-init-file(#f(compiled-function () #<bytecode 0x1fe5c0795b5618>) #f(compiled-function () #<bytecode 0xc0853d4c321d44c>) nil) command-line() normal-top-level()

不报错,但就是只显示搜索的页面,什么结果都没有,删除elc文件后是正常的。不能悬浮显示,只能(setq snails-show-with-frame nil),抄了一点别人的配置, 搜索窗口的字体大小看起来舒服多了。 :if (display-graphic-p) :custom-face (snails-content-buffer-face ((t (:background “#111” :height 110)))) (snails-input-buffer-face ((t (:background “#222” :foreground “gold” :height 110)))) (snails-header-line-face ((t (:inherit font-lock-function-name-face :underline t :height 1.1))))