Compile and upload works but flycheck complains of Arduino.h not being found
AoifeHughes opened this issue · 3 comments
Not sure if this is a bug on my side with the setup but I have a flycheck error when using platformio-mode that states arduino.h cannot be found, but compile and upload still works.
Hi @SirSharpest,
I quickly skimmed over your Emacs config. I think adding the following line might help:
(add-hook 'flycheck-mode-hook 'flycheck-irony-setup)
I remember running into similar errors regarding arduino.h
when I was writing this, but can't quite remember the specifics.
Let me know how that works out for you.
Awesome.
I'll update the readme to include flycheck-irony
as a package requirement for using auto-complete.
I would like to re-open this, I'm quite lost here.
A section out of my init.el
:
;; PlatformIO
(require 'platformio-mode)
;; This is a C/C++/Objective-C LSP.
(use-package ccls
:ensure t
:config
(setq ccls-executable "ccls")
(setq lsp-prefer-flymake nil)
(setq-default flycheck-disabled-checkers '(c/c++-clang c/c++-cppcheck c/c++-gcc))
:hook ((c-mode c++-mode objc-mode) .
(lambda () (require 'ccls) (lsp))))
;; PlatformIO
;; Enable ccls for all c++ files, and platformio-mode only
;; when needed (platformio.ini present in project root).
(add-hook 'c++-mode-hook (lambda ()
(lsp-deferred)
(platformio-conditionally-enable)))
;; PlatformIO
(add-hook 'flycheck-mode-hook 'flycheck-irony-setup)
But it keeps saying 'Arduino.h' file not found [1]
:
@ZachMassia Any clue? Thanks!