| | |
| | | (use-package flycheck
|
| | | :ensure t
|
| | | :diminish flycheck-mode
|
| | | :hook (prog-mode . flycheck-mode)
|
| | | :config
|
| | | (global-flycheck-mode))
|
| | | #+END_SRC
|
| | |
| | | (setq lsp-keymap-prefix "C-c l")
|
| | | :commands lsp
|
| | | :config
|
| | | (add-hook lsp-mode-hook lsp-enable-which-key-integration)
|
| | | (add-hook 'lsp-mode-hook 'lsp-enable-which-key-integration)
|
| | | (setq read-process-output-max (* 1024 1024))
|
| | | (setq lsp-completion-provider :capf)
|
| | | (setq lsp-keep-workspace-alive 'nil)
|
| | | (add-to-list 'exec-path "~/.cargo/bin"))
|
| | |
|
| | | (use-package lsp-ui
|
| | |
| | | company-dabbrev-code
|
| | | company-irony)))
|
| | | #+END_SRC
|
| | | **** COMMENT Clang-format
|
| | | **** Clang-format
|
| | | Automatically format buffer on save.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (when (file-exists-p "/usr/share/clang/clang-format.el")
|
| | |
| | | "IndentCaseLabels: false}"))
|
| | | (setq-default clang-format-style clang-format-linux-style)
|
| | | (defun clang-format-on-save ()
|
| | | (add-hook 'before-save-hook 'clang-format-buffer))
|
| | | (add-hook 'c-mode-hook 'clang-format-on-save)
|
| | | (add-hook 'c++-mode-hook 'clang-format-on-save))
|
| | | (add-hook 'before-save-hook 'clang-format-buffer nil t))
|
| | | (add-hook 'c-mode-hook 'clang-format-on-save nil t)
|
| | | (add-hook 'c++-mode-hook 'clang-format-on-save nil t))
|
| | | #+END_SRC
|
| | | *** emacs-lisp
|
| | | **** COMMENT company
|
| | | **** COMMENT Company
|
| | | Add slime backend.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (add-hook 'emacs-lisp-mode-hook 'company-mode)
|
| | |
| | | ** Up to date org
|
| | | Pull the latest org mode from the repository, rather than the org which comes with emacs.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package org
|
| | | :ensure org-plus-contrib
|
| | | :pin org)
|
| | | (use-package org
|
| | | :ensure org-contrib)
|
| | | #+END_SRC
|
| | |
|
| | | ** Small tweaks
|
| | |
| | | (visual-line-mode 1)))
|
| | | #+END_SRC
|
| | |
|
| | | ** org-bullets
|
| | | ** Fancy org points
|
| | | Use bullets of different colours and styles instead of the "\*\*\*" to denote indentation levels.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package org-bullets
|
| | | (use-package org-superstar
|
| | | :ensure t
|
| | | :config
|
| | | (add-hook 'org-mode-hook (lambda () (org-bullets-mode))))
|
| | | (add-hook 'org-mode-hook (lambda () (org-superstar-mode 1))))
|
| | | #+END_SRC
|
| | |
|
| | | ** Org Babel
|
| | |
| | | #+END_SRC
|
| | |
|
| | | ** Org export additions
|
| | | *** COMMENT Pandoc
|
| | | *** Pandoc
|
| | | Call pandoc on org buffer from org export.
|
| | | Need to add ~#+OPTIONS: H:99~ to enable large level header exports.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package ox-pandoc
|
| | | :ensure t)
|