This commit is contained in:
laurensmiers 2018-11-20 23:12:52 +01:00 committed by Laurens Miers
parent 57c0927448
commit 348b36dafd

View file

@ -15,15 +15,12 @@ My personal emacs configuration
This configuration requires the installation of : This configuration requires the installation of :
- the GNU =global= package (for gtags) - the GNU =global= package (for gtags)
- =clang= (for ivory) - ccls language server (for LSP functionality)
- =cmake= (for ivory)
- =llvm-libs= (for cmake, somehow not a dependency on Manjaro when installing cmake) - =llvm-libs= (for cmake, somehow not a dependency on Manjaro when installing cmake)
- Use python-pip to install requirements for elpy: - Use python-pip to install requirements for elpy:
=pip install jedi flake8 importmagic autopep8 yapf= =pip install jedi flake8 importmagic autopep8 yapf=
- =ditaa= (for ascii to image generation in org-mode) - =ditaa= (for ascii to image generation in org-mode)
When first checking out this config, run =irony-install-server= to make and install the irony-server.
* Utils * Utils
** Custom command line arguments ** Custom command line arguments
@ -871,26 +868,20 @@ On-the-fly syntax checking.
** LSP ** LSP
#+BEGIN_SRC emacs-lisp Just awesome IDE features:
(defun cquery//enable () https://github.com/MaskRay/ccls
(condition-case nil https://github.com/MaskRay/emacs-ccls
(lsp-cquery-enable) https://github.com/emacs-lsp/lsp-mode
(user-error nil))) https://github.com/emacs-lsp/lsp-ui
https://github.com/tigersoldier/company-lsp
(use-package cquery #+BEGIN_SRC emacs-lisp
(use-package ccls
:ensure t :ensure t
:init :init
(setq cquery-executable "/usr/bin/cquery") (setq ccls-executable "/usr/bin/ccls")
(add-hook 'c-mode-hook #'cquery//enable)
(add-hook 'c++-mode-hook #'cquery//enable)
) )
;; (use-package ccls
;; :ensure t
;; :init
;; (setq ccls-executable "/usr/bin/ccls")
;; )
(use-package lsp-ui (use-package lsp-ui
:ensure t :ensure t
:init (add-hook 'lsp-after-open-hook #'lsp-ui-mode) :init (add-hook 'lsp-after-open-hook #'lsp-ui-mode)
@ -911,12 +902,8 @@ On-the-fly syntax checking.
company-lsp-cache-candidates t company-lsp-cache-candidates t
company-lsp-async t) company-lsp-async t)
) )
#+END_SRC #+END_SRC
#+RESULTS:
: t
** (Relative) Line numbers ** (Relative) Line numbers
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -931,56 +918,13 @@ On-the-fly syntax checking.
*** Flycheck *** Flycheck
Clang static analyzer with flycheck Functionality provided by LSP and flycheck combination.
https://github.com/alexmurray/flycheck-clang-analyzer
https://github.com/Sarcasm/flycheck-irony
#+BEGIN_SRC emacs-lisp
(use-package flycheck-clang-analyzer
:ensure t
:config
(with-eval-after-load 'flycheck
(require 'flycheck-clang-analyzer)
(flycheck-clang-analyzer-setup)))
;; (use-package flycheck-irony
;; :ensure t
;; :config
;; (eval-after-load 'flycheck
;; '(add-hook 'flycheck-mode-hook #'flycheck-irony-setup))
;; )
#+END_SRC
*** Company *** Company
https://github.com/ikirill/irony-eldoc
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package company-c-headers (use-package company-c-headers
:ensure t) :ensure t)
;; (use-package company-irony
;; :ensure t
;; :config
;; (setq company-backends '((company-c-headers
;; ;; company-dabbrev-code ;; not sure what this is
;; company-irony))))
;; (use-package irony
;; :ensure t
;; :config
;; (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)
;; (add-hook 'c++-mode-hook 'irony-mode)
;; (add-hook 'c-mode-hook 'irony-mode)
;; (add-hook 'objc-mode-hook 'irony-mode)
;; )
(use-package irony-eldoc
:ensure t
:config
(add-hook 'irony-mode-hook 'irony-eldoc)
)
#+END_SRC #+END_SRC
** Python mode ** Python mode