From 5656c288ce7c210ab77eecbbbf61139724509e69 Mon Sep 17 00:00:00 2001 From: Niklas Hofer Date: Sun, 13 Oct 2019 02:30:02 +0200 Subject: [PATCH 1/4] disable code that is incompatible with emacs 26 and latest packages --- config.el | 4 ++-- packages.el | 16 +++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/config.el b/config.el index 37e2224..e367b4d 100644 --- a/config.el +++ b/config.el @@ -11,5 +11,5 @@ ;; Variables -(spacemacs|defvar-company-backends irony-mode) -(spacemacs|defvar-company-backends irony-mode) +;; TODO fix this for spacemacs26 +;;(spacemacs|defvar-company-backends irony-mode) diff --git a/packages.el b/packages.el index 7618a35..484abf4 100644 --- a/packages.el +++ b/packages.el @@ -32,11 +32,12 @@ (irony-cdb-autosetup-compile-options))) )) -(defun platformio/init-company-irony () - (use-package company-irony - :defer t - :init - (push 'company-irony company-backends-irony-mode))) +;; TODO setup irony for emacs26 +;; (defun platformio/init-company-irony () +;; (use-package company-irony +;; :defer t +;; :init +;; (push 'company-irony company-backends-irony-mode))) (defun platformio/init-irony-eldoc () (use-package irony-eldoc @@ -44,8 +45,9 @@ :init (add-hook 'irony-mode-hook 'irony-eldoc))) -(defun platformio/post-init-company () - (spacemacs|add-company-hook irony-mode)) +;; TODO setup company for emacs26 +;; (defun platformio/post-init-company () +;; (spacemacs|add-company-hook irony-mode)) (defun platformio/init-platformio-mode () (use-package platformio-mode From 330506cb507a69b5eab1b048a079dd447cf0c4e6 Mon Sep 17 00:00:00 2001 From: Niklas Hofer Date: Sun, 13 Oct 2019 02:49:17 +0200 Subject: [PATCH 2/4] Works for me. Not sure what I am doing here. --- config.el | 3 --- packages.el | 15 +++++---------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/config.el b/config.el index e367b4d..20aa5fc 100644 --- a/config.el +++ b/config.el @@ -10,6 +10,3 @@ ;;; License: GPLv3 ;; Variables - -;; TODO fix this for spacemacs26 -;;(spacemacs|defvar-company-backends irony-mode) diff --git a/packages.el b/packages.el index 484abf4..893fb56 100644 --- a/packages.el +++ b/packages.el @@ -32,12 +32,11 @@ (irony-cdb-autosetup-compile-options))) )) -;; TODO setup irony for emacs26 -;; (defun platformio/init-company-irony () -;; (use-package company-irony -;; :defer t -;; :init -;; (push 'company-irony company-backends-irony-mode))) +(defun platformio/init-company-irony () + (use-package company-irony + :defer t + :config + (add-to-list 'company-backends 'company-irony))) (defun platformio/init-irony-eldoc () (use-package irony-eldoc @@ -45,10 +44,6 @@ :init (add-hook 'irony-mode-hook 'irony-eldoc))) -;; TODO setup company for emacs26 -;; (defun platformio/post-init-company () -;; (spacemacs|add-company-hook irony-mode)) - (defun platformio/init-platformio-mode () (use-package platformio-mode :commands platformio-conditionally-enable From 01b283c7ec5a111d639db2bda2147190866b3c6f Mon Sep 17 00:00:00 2001 From: Niklas Hofer Date: Tue, 22 Oct 2019 01:18:46 +0200 Subject: [PATCH 3/4] configure autocompletion Followed instructions at https://github.com/syl20bnr/spacemacs/blob/develop/layers/+completion/auto-completion/README.org#add-auto-completion-in-a-layer Could not test, no clue how to trigger autocompletion. --- packages.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages.el b/packages.el index 893fb56..caf37f2 100644 --- a/packages.el +++ b/packages.el @@ -13,7 +13,7 @@ '( company irony - company-irony + (company-irony :toggle (configuration-layer/package-used-p 'company)) irony-eldoc platformio-mode )) @@ -35,8 +35,10 @@ (defun platformio/init-company-irony () (use-package company-irony :defer t - :config - (add-to-list 'company-backends 'company-irony))) + :init + (spacemacs|add-company-backends + :backends company-irony + :modes irony-mode))) (defun platformio/init-irony-eldoc () (use-package irony-eldoc From 1f792e221f88027fd9ab0a3412a0dffdba572996 Mon Sep 17 00:00:00 2001 From: Niklas Hofer Date: Tue, 22 Oct 2019 15:32:37 +0200 Subject: [PATCH 4/4] company package is initialized by company-irony isn't it? --- packages.el | 1 - 1 file changed, 1 deletion(-) diff --git a/packages.el b/packages.el index caf37f2..4fc86a4 100644 --- a/packages.el +++ b/packages.el @@ -11,7 +11,6 @@ (defconst platformio-packages '( - company irony (company-irony :toggle (configuration-layer/package-used-p 'company)) irony-eldoc