purcell/emacs.d

Flycheck error in my init file

Closed this issue · 4 comments

I copied your require and provide structure. (it's faster?)
This is my init.el file:

;;; init.el --- init -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:

(setq package-enable-at-startup nil)
;;(setq debug-on-error t)

(add-to-list 'load-path (expand-file-name "settings" user-emacs-directory))

(require 'init-packages)
(require 'init-defaults)
(require 'init-dired)

(require 'init-minibuffer)
(require 'init-buffers-management)
(require 'init-git)
(require 'init-terminal)

(require 'init-completion)
(require 'init-indent)
(require 'init-formatting)
(require 'init-syntax-check)
(require 'init-org)

(add-to-list 'load-path (expand-file-name "languages" user-emacs-directory))

(require 'init-markdown)
(require 'init-c-c++)
(require 'init-java)
(require 'init-javascript)
(require 'init-haskell)

(require 'init-latex)

(provide 'init)
;;; init.el ends here

Everything work and seems to go perfectly but flycheck says:
Cannot open load file: No such file or directory, init-packages

Thanks in advance.

This looks out of scope in terms of an issue for this repo, but my guess is that the directory which contains your init-packages.el is not included in the variable load-path. In my case, those things go in the lisp subdir, and that directory is explicitly added to load-path (though I forget where). Hope that helps.

I do the same and packages are loaded but flycheck is still in error.

You might need to set flycheck-emacs-lisp-load-path to 'inherit?

Thanks!!