|
|
@ -571,10 +571,11 @@ Place your own snippets on =~/.cache/emacs/etc/yasnippet/snippets=
|
|
|
|
* company
|
|
|
|
* company
|
|
|
|
Autocompletion with [[https://company-mode.github.io/][company]]
|
|
|
|
Autocompletion with [[https://company-mode.github.io/][company]]
|
|
|
|
*Remember*: =company-lsp= is deprecated, don't use it.
|
|
|
|
*Remember*: =company-lsp= is deprecated, don't use it.
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package company
|
|
|
|
(use-package company
|
|
|
|
:init
|
|
|
|
:init
|
|
|
|
(global-company-mode t)
|
|
|
|
(global-company-mode t)
|
|
|
|
|
|
|
|
;;(setq company-backends '((company-files company-keywords company-capf company-dabbrev-code company-etags company-dabbrev)))
|
|
|
|
|
|
|
|
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
;; (setq company-idle-delay 0)
|
|
|
|
;; (setq company-idle-delay 0)
|
|
|
@ -586,40 +587,32 @@ Autocompletion with [[https://company-mode.github.io/][company]]
|
|
|
|
:bind
|
|
|
|
:bind
|
|
|
|
("C-<iso-lefttab>" . company-complete-common-or-cycle)
|
|
|
|
("C-<iso-lefttab>" . company-complete-common-or-cycle)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
** company-quickhelp
|
|
|
|
** company-quickhelp
|
|
|
|
In case you want popup help instead of status line help
|
|
|
|
In case you want popup help instead of status line help
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package company-quickhelp
|
|
|
|
(use-package company-quickhelp
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
(company-quickhelp-mode)
|
|
|
|
(company-quickhelp-mode)
|
|
|
|
;; (setq company-quickhelp-delay nil) ; Uncoment to disable quickhelp (default 0.5)
|
|
|
|
;; (setq company-quickhelp-delay nil) ; Uncoment to disable quickhelp (default 0.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
** company-lsp (**DEPRECATED**)
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
|
|
|
|
;; (use-package company-lsp
|
|
|
|
|
|
|
|
;; :ensure
|
|
|
|
|
|
|
|
;; :config
|
|
|
|
|
|
|
|
;; (push 'company-lsp company-backends)
|
|
|
|
|
|
|
|
;; )
|
|
|
|
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
* org-mode
|
|
|
|
* org-mode
|
|
|
|
** org-bullets
|
|
|
|
** org-bullets
|
|
|
|
Nice bullets for org-mode
|
|
|
|
Nice bullets for org-mode
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package org-bullets
|
|
|
|
(use-package org-bullets
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
|
|
|
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
* flycheck
|
|
|
|
* flycheck
|
|
|
|
You *must* use [[https://www.flycheck.org/en/latest/][flycheck]] if you use LSP. (Flymake + LSP is hell)
|
|
|
|
You *must* use [[https://www.flycheck.org/en/latest/][flycheck]] if you use LSP. (Flymake + LSP is hell)
|
|
|
|
Syntax checking for programming languages
|
|
|
|
Syntax checking for programming languages
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(use-package flycheck
|
|
|
|
(use-package flycheck
|
|
|
|
:config
|
|
|
|
:config
|
|
|
|
(global-set-key (kbd "C-c f p") 'flycheck-previous-error)
|
|
|
|
(global-set-key (kbd "C-c f p") 'flycheck-previous-error)
|
|
|
@ -627,7 +620,7 @@ Syntax checking for programming languages
|
|
|
|
:init
|
|
|
|
:init
|
|
|
|
(global-flycheck-mode t)
|
|
|
|
(global-flycheck-mode t)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
* LSP
|
|
|
|
* LSP
|
|
|
|
We are using [[https://emacs-lsp.github.io/lsp-mode/][lsp-mode]] but keep an eye on [[https://github.com/joaotavora/eglot][eglot]] as an alternative.
|
|
|
|
We are using [[https://emacs-lsp.github.io/lsp-mode/][lsp-mode]] but keep an eye on [[https://github.com/joaotavora/eglot][eglot]] as an alternative.
|
|
|
@ -777,7 +770,6 @@ use for your debug templates!
|
|
|
|
;; )
|
|
|
|
;; )
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
** go
|
|
|
|
** go
|
|
|
|
**WARNING**: you need to install =gopls= in your system.
|
|
|
|
**WARNING**: you need to install =gopls= in your system.
|
|
|
|
**WARNING**: =company-go= is deprecated, don't use it
|
|
|
|
**WARNING**: =company-go= is deprecated, don't use it
|
|
|
@ -832,13 +824,13 @@ References:
|
|
|
|
** Rust
|
|
|
|
** Rust
|
|
|
|
- [[https://robert.kra.hn/posts/2021-02-07_rust-with-emacs/][Robert Kra Emacs Rust Configuration]]
|
|
|
|
- [[https://robert.kra.hn/posts/2021-02-07_rust-with-emacs/][Robert Kra Emacs Rust Configuration]]
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
;; (use-package rust-mode
|
|
|
|
(use-package rust-mode
|
|
|
|
;; :hook ((rust-mode . lsp)
|
|
|
|
:hook ((rust-mode . lsp)
|
|
|
|
;; (rust-mode . lsp-lens-mode)
|
|
|
|
(rust-mode . lsp-lens-mode)
|
|
|
|
;; )
|
|
|
|
)
|
|
|
|
;; :custom
|
|
|
|
:custom
|
|
|
|
;; (rust-format-on-save t)
|
|
|
|
(rust-format-on-save t)
|
|
|
|
;; (lsp-rust-server 'rust-analyzer))
|
|
|
|
(lsp-rust-server 'rust-analyzer))
|
|
|
|
#+end_src
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
|
|
** Python
|
|
|
|
** Python
|
|
|
|