chenyanming / spacemacs_module_for_doom

Aim to port spacemacs features (defaults keybinding, transient state, layers and more) to doom, and provides a spacemacs module for doom.
146 stars 15 forks source link

Unable to fine evil-set-initial-state #4

Closed x61 closed 4 years ago

x61 commented 4 years ago

I am getting the following error message:

Error in private config: modules/spacemacs/+spacemacs.el, (void-function evil-set-initial-state) I looked in the file but I could not find the function evil-set-initial-state being used in +spacemacs.el

chenyanming commented 4 years ago

I think you are missing evil package. Did you enable evil module in .doom.d/init.el? @x61

x61 commented 4 years ago

That did the trick. Thanks for your time

tsoernes commented 3 years ago

I have the same issue. I have (evil +everywhere) in the init.el.

chenyanming commented 3 years ago

Post your init.el and packages.el and lets check what still missing.

tsoernes commented 3 years ago

I went the route of Setup as Doom Private Module.

This is my packages.el. As I understand it, no manual edit is needed here.

Click to expand

``` ;; -*- no-byte-compile: t; -*- ;;; .doom.d/packages.el (package! winum) (package! evil-matchit) (package! ripgrep) (package! deadgrep) (package! color-theme-modern) (package! webpaste) (package! treemacs-persp) (package! yapfify) (package! zeal-at-point) (package! eterm-256color) ;;; Examples: ;; (package! some-package) ;; (package! another-package :recipe (:host github :repo "username/repo")) ;; (package! builtin-package :disable t) (package! solaire-mode :disable t) ```

This is the init.el.

Click to expand ``` ;;; init.el -*- lexical-binding: t; -*- ;; Copy this file to ~/.doom.d/init.el or ~/.config/doom/init.el ('doom install' ;; will do this for you). The `doom!' block below controls what modules are ;; enabled and in what order they will be loaded. Remember to run 'doom refresh' ;; after modifying it. ;; ;; More information about these modules (and what flags they support) can be ;; found in modules/README.org. (add-to-list 'load-path "~/progs/emacs-libvterm") (require 'vterm) (doom! :input ;;chinese ;;japanese :private spacemacs :completion company ; the ultimate code completion backend helm ; the *other* search engine for love and life ;;ido ; the other *other* search engine... ;;ivy ; a search engine for love and life :ui ;;deft ; notational velocity for Emacs doom ; what makes DOOM look the way it does doom-dashboard ; a nifty splash screen for Emacs doom-quit ; DOOM quit-message prompts when you quit Emacs ;;fill-column ; a `fill-column' indicator hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW ;;hydra ;;indent-guides ; highlighted indent columns modeline ; snazzy, Atom-inspired modeline, plus API nav-flash ; blink the current line after jumping ;;neotree ; a project drawer, like NERDTree for vim ophints ; highlight the region an operation acts on (popup ; tame sudden yet inevitable temporary windows +all ; catch all popups that start with an asterix +defaults) ; default popup rules ;;pretty-code ; replace bits of code with pretty symbols ;;tabs ; an tab bar for Emacs treemacs ; a project drawer, like neotree but cooler ;;unicode ; extended unicode support for various languages vc-gutter ; vcs diff in the fringe vi-tilde-fringe ; fringe tildes to mark beyond EOB ;; (window-select +numbers) ; visually switch windows window-select ; visually switch windows workspaces ; tab emulation, persistence & separate workspaces :editor (evil +everywhere); come to the dark side, we have cookies file-templates ; auto-snippets for empty files fold ; (nigh) universal code folding ;;(format +onsave) ; automated prettiness ;;god ; run Emacs commands without modifier keys ;;lispy ; vim for lisp, for people who don't like vim multiple-cursors ; editing in many places at once ;;objed ; text object editing for the innocent ;;parinfer ; turn lisp into python, sort of rotate-text ; cycle region at point between text candidates snippets ; my elves. They type so I don't have to word-wrap ; soft wrapping with language-aware indent :emacs dired ; making dired pretty [functional] electric ; smarter, keyword-based electric-indent ibuffer ; interactive buffer management vc ; version-control and Emacs, sitting in a tree :term ;;eshell ; a consistent, cross-platform shell (WIP) ;;shell ; a terminal REPL for Emacs ;;term ; terminals in Emacs ;; vterm ; another terminals in Emacs :tools ;;ansible ;;debugger ; FIXME stepping through code, to help you add bugs ;;direnv ;;docker ;;editorconfig ; let someone else argue about tabs vs spaces ;;ein ; tame Jupyter notebooks with emacs (eval +overlay) ; run code, run (also, repls) ;;flyspell ; tasing you for misspelling mispelling ;;gist ; interacting with github gists (lookup ; helps you navigate your code and documentation +docsets) ; ...or in Dash docsets locally ;;lsp ;;macos ; MacOS-specific commands magit ; a git porcelain for Emacs ;;make ; run make tasks from Emacs ;;pass ; password manager for nerds ;;pdf ; pdf enhancements ;;prodigy ; FIXME managing external services & code builders ;;rgb ; creating color strings ;;terraform ; infrastructure as code ;;tmux ; an API for interacting with tmux ;;upload ; map local to remote projects via ssh/ftp :checkers syntax :lang ;;agda ; types of types of types of types... ;;assembly ; assembly for fun or debugging ;;cc ; C/C++/Obj-C madness ;;clojure ; java with a lisp ;;common-lisp ; if you've seen one lisp, you've seen them all ;;coq ; proofs-as-programs ;;crystal ; ruby at the speed of c ;;csharp ; unity, .NET, and mono shenanigans data ; config/data formats ;;elixir ; erlang done right ;;elm ; care for a cup of TEA? emacs-lisp ; drown in parentheses ;;erlang ; an elegant language for a more civilized age ;;ess ; emacs speaks statistics ;;faust ; dsp, but you get to keep your soul ;;fsharp ; ML stands for Microsoft's Language ;;go ; the hipster dialect ;;(haskell +dante) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python ;;idris ; ;;(java +meghanada) ; the poster child for carpal tunnel syndrome javascript ; all(hope(abandon(ye(who(enter(here)))))) ;;julia ; a better, faster MATLAB ;;kotlin ; a better, slicker Java(Script) ;;latex ; writing papers in Emacs has never been so fun ;;lean ;;factor ;;ledger ; an accounting system in Emacs ;;lua ; one-based indices? one-based indices markdown ; writing docs for people to ignore ;;nim ; python + lisp at the speed of c ;;nix ; I hereby declare "nix geht mehr!" ;;ocaml ; an objective camel (org ; organize your plain life in plain text +dragndrop ; drag & drop files/images into org buffers ;;+hugo ; use Emacs for hugo blogging +ipython ; ipython/jupyter support for babel +pandoc ; export-with-pandoc support ;;+pomodoro ; be fruitful with the tomato technique +present) ; using org-mode for presentations ;;perl ; write code no one else can comprehend ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;;purescript ; javascript, but functional (python ; beautiful is better than ugly ;; +pyenv ) ;;qt ; the 'cutest' gui framework ever ;;racket ; a DSL for DSLs ;;rest ; Emacs as a REST client ;;rst ; ReST in peace ;;ruby ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;scala ; java, but good ;;scheme ; a fully conniving family of lisps sh ; she sells {ba,z,fi}sh shells on the C xor ;;solidity ; do you need a blockchain? No. ;;swift ; who asked for emoji variables? ;;terra ; Earth and Moon in alignment for performance. ;;web ; the tubes :email ;;(mu4e +gmail) ;;notmuch ;;(wanderlust +gmail) :app ;;calendar ;;irc ; how neckbeards socialize ;;(rss +org) ; emacs as an RSS reader ;;twitter ; twitter client https://twitter.com/vnought ;;write ; emacs for writers (fiction, notes, papers, etc.) :config ;;literate (default +bindings +smartparens)) ;;(default +smartparens)) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(custom-safe-themes (quote ("a455366c5cdacebd8adaa99d50e37430b0170326e7640a688e9d9ad406e2edfd" "8e7044bfad5a2e70dfc4671337a4f772ee1b41c5677b8318f17f046faa42b16b" "335ad769bcd7949d372879ec10105245255beec6e62213213835651e2eb0b8e0" default)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(vterm-color-blue ((t (:inherit term-color-blue :foreground "deep sky blue"))))) ```

For good measure, this is config.el:

Click to expand ``` ;;; .doom.d/config.el -*- lexical-binding: t; -*- "Theming and appearance" ;; Start frame maximized (add-to-list 'default-frame-alist '(fullscreen . maximized)) ;; Font size ;; (set-face-attribute 'default nil :height 110) (load-theme 'wombat) (custom-theme-set-faces! 'wombat '(region :background "gold" :foreground "black")) (custom-theme-set-faces! 'jb-simple '(region :background "gold" :foreground "black") '(highlight :background "lightgreen" :foreground nil) ) (custom-set-faces! '(which-func :foreground "lightblue") ) ;; Auto switch themes during morning and evening ;; (run-at-time '0600' 86400 'load-theme 'jb-simple) ;; (run-at-time '2000' 86400 'load-theme 'wombat) (defun load-light-theme() (interactive) (load-theme 'jb-simple) ) (defun load-dark-theme() (interactive) (load-theme 'wombat) ) ;; Make modeline count flycheck errors separate from warnings (setq doom-modeline-checker-simple-format nil) ;; Whether display the buffer encoding. (setq doom-modeline-buffer-encoding nil) (setq doom-modeline-env-enable-python nil) (setq doom-modeline-buffer-file-name-style 'relative-from-project) ;; Whether display the indentation information. (setq doom-modeline-indent-info nil) "Windows, Buffers, Navigation" (use-package! winum :init (setq-default winum-scope 'frame-local) :config (load! "bindings/+winum")) (winum-mode) ;; Make Treemacs accessible as window 0 (after! (treemacs winum) (setq winum-ignored-buffers-regexp (delete (regexp-quote (format "%sFramebuffer-" treemacs--buffer-name-prefix)) winum-ignored-buffers-regexp))) (after! flycheck (set-popup-rule! "^\\*Flycheck errors" :side 'bottom :height 0.15) ;; Don't quit on ESC (set-popup-rule! "^\\*Flycheck errors" :select nil :quit nil)) (after! python (set-popup-rule! "^\\*Python" :ignore t :quit nil)) ;; TRY THIS: ;;(set-popup-rules! ;; '(("^\\*Python" :side right :width 0.4 :height 0.5 :select f :slot 0 :vslot 0 :quit nil))) "Python" (add-hook 'python-mode-hook 'yapf-mode) (setenv "WORKON_HOME" "~/anaconda3/envs") (add-hook 'python-mode-hook #'visual-line-mode) (add-hook 'python-mode-hook #'which-function-mode) (add-hook 'before-save-hook 'py-isort-before-save) (setq-hook! 'inferior-python-mode-hook auto-hscroll-mode nil) (add-hook 'inferior-python-mode-hook #'visual-line-mode) ;; ‘comint-output-filter-functions’ ;; inferior-python-mode-hook ;; "TRAMP" ;; To speed up TRAMP ;; ONLY use if remote files are not independently updated outside Tramp's control (setq remote-file-name-inhibit-cache nil ) (setq tramp-verbose 2) (setq tramp-completion-reread-directory-timeout nil) (setq tramp-default-user "ftdb") (setq tramp-default-host "217.94.248.120") ;; (setq tramp-default-method (after! flycheck (setq-default flycheck-flake8-maximum-line-length 100) ) (after! zeal (add-to-list 'zeal-at-point-mode-alist '(python-mode . ("python3" "pandas" "numpy" "tensorflow")))) (defun autoflake () (interactive) (save-buffer) (shell-command (format "autoflake --in-place --expand-star-imports --remove-all-unused-imports %s" (shell-quote-argument (replace-regexp-in-string "/sshx?:[^:]*:" "" (buffer-file-name))))) (revert-buffer t t t) ) "General programming" (after! flycheck (setq-default flycheck-check-syntax-automatically '(save idle-change idle-buffer-switch new-line mode-enabled)) ;; (setq-default flycheck--automatically-disabled-checkers '("python-mypy")) (setq-default flycheck-disabled-checkers '(python-mypy)) ) ;;;; General keybindings (load! "bindings/+spacemacs") (load! "bindings/+bindings") ;; (load! "bindings/+new_bindings") ;; attempt to remove YAS tab binding ;; (map! :i [tab] nil) ;; (after! org ;; (remove-hook 'org-tab-first-hook #'+org-yas-expand-maybe-h)) ;; (setq! evil-want-Y-yank-to-eol t) (after! magit (setq git-commit-summary-max-length 68) ) (setq inhibit-quit t) ;; Make '*' search for whole words containing e.g. '_' (setq-default evil-symbol-word-search t) ```
chenyanming commented 3 years ago

Try to put :private spacemacs to the end of doom!section. So that every module will loaded before spacemacs module. This is the way how I did. If it works, I will update it in README. After your change, remember to run doom sync.

chenyanming commented 3 years ago

I tested and confirmed that :private spacemacs should be put after :default section.