Commit 7e6fed8e authored by David Sveningsson's avatar David Sveningsson
Browse files

emacs: minor lsp config

parent 90526b12
......@@ -331,11 +331,21 @@ Tabs and ribbons for the mode line.
company-dabbrev-ignore-case nil
company-dabbrev-code-other-buffers t
company-tooltip-align-annotations t
company-minimum-prefix-length 3
company-minimum-prefix-length 1
company-require-match 'never
company-frontends '(company-pseudo-tooltip-frontend company-echo-metadata-frontend)
company-backends '(company-dabbrev-code company-capf company-keywords company-files company-dabbrev)
company-transformers '(company-sort-by-occurrence)))
(use-package company-lsp
:requires company
:ensure t
:config
(push 'company-lsp company-backends)
;; Disable client-side cache because the LSP server does a better job.
(setq company-transformers nil
company-lsp-async t
company-lsp-cache-candidates nil))
#+END_SRC
** Whitespace
#+BEGIN_SRC emacs-lisp
......@@ -460,6 +470,32 @@ _p_rev _u_pper _=_: upper/lower _r_esolve
"Save and bury buffer" :color blue)
("q" nil "cancel" :color blue)))
#+END_SRC
** LSP
Enable ~~lsp-mode~~ for selected languages
#+BEGIN_SRC emacs-lisp
(use-package lsp-mode
:ensure t
:config
(add-hook 'python-mode-hook #'lsp)
(setq lsp-prefer-flymake nil)) ;; Prefer using lsp-ui (flycheck) over flymake.
(use-package lsp-ui
:ensure t
:requires lsp-mode flycheck
:config
(setq lsp-ui-doc-enable t
lsp-ui-doc-use-childframe t
lsp-ui-doc-position 'top
lsp-ui-doc-include-signature t
lsp-ui-sideline-enable nil
lsp-ui-flycheck-enable t
lsp-ui-flycheck-list-position 'right
lsp-ui-flycheck-live-reporting t
lsp-ui-peek-enable t
lsp-ui-peek-list-width 60
lsp-ui-peek-peek-height 25)
(add-hook 'lsp-mode-hook 'lsp-ui-mode))
#+END_SRC
* Project management
** Projectile
#+BEGIN_SRC emacs-lisp
......@@ -607,6 +643,7 @@ _r_efactor _R_ename file _o_rganize imports _q_uit _V_erify se
(setq emmet-self-closing-tag-style ""))
#+END_SRC
** Markdown
#+BEGIN_SRC emacs-lisp
(use-package markdown-mode
:ensure t
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment