diff options
| author | Jakob L. Kreuze | 2019-02-24 14:36:00 -0500 |
|---|---|---|
| committer | Jakob L. Kreuze | 2019-02-24 14:36:00 -0500 |
| commit | ab7f6d7cd690ba75009eb571a405bfba7bc65fcd (patch) | |
| tree | 0a8eff9388ac712294182fa9e77c82a7bcb4edfe /jakob.org | |
| parent | 466cb4e1615793f401d3a1ed55311e07a6f16b53 (diff) | |
Configure lsp-mode
Diffstat (limited to 'jakob.org')
| -rw-r--r-- | jakob.org | 84 |
1 files changed, 61 insertions, 23 deletions
@@ -1116,6 +1116,30 @@ here, since =use-package= doesn't like split =:bind= declarations. ("C-c C-q" . counsel-org-tag)) #+END_SRC +** Workflow + +Automatically open a buffer named =*Mind Dump*= to, well, save all of my +thoughts. They're dated and saved in a directory so I can =ag= them. This is the +closest thing I will ever have to an implementation of =ag= for my thoughts. + +#+BEGIN_SRC elisp + :init + (defvar mind-dump-directory "~/Notes/Mind Dumps" + "Where to store dated 'mind dump' files.") + + (defun mind-dump-filename () + "Returns the path of today's 'mind dump' file." + (concatenate 'string + (file-name-as-directory mind-dump-directory) + (format-time-string "%Y-%m-%d") + ".org")) + + :config + (let* ((buffer (find-file-noselect (mind-dump-filename)))) + (set-buffer buffer) + (rename-buffer "*Mind Dump*")) +#+END_SRC + ** Personal Wiki I maintain somewhat of a "personal wiki" using Org and I like to link between @@ -1178,29 +1202,6 @@ Code for generating hierarchical category listings. (newline)))))))) #+END_SRC -** Workflow - -Automatically open a buffer named =*Mind Dump*= to, well, save all of my -thoughts. They're dated and saved in a directory so I can =ag= them. This is the -closest thing I will ever have to an implementation of =ag= for my thoughts. - -#+BEGIN_SRC elisp - :config - (defvar mind-dump-directory "~/Notes/Mind Dumps" - "Where to store dated 'mind dump' files.") - - (defun mind-dump-filename () - "Returns the path of today's 'mind dump' file." - (concatenate 'string - (file-name-as-directory mind-dump-directory) - (format-time-string "%Y-%m-%d") - ".org")) - - (let* ((buffer (find-file-noselect (mind-dump-filename)))) - (set-buffer buffer) - (rename-buffer "*Mind Dump*")) -#+END_SRC - ** Capture Low-friction of adding things to the day's "mind dump" and my GTD inbox. @@ -1704,6 +1705,43 @@ I think tooltips are a little nicer than spitting errors into the echo area. * Programming Languages +** Language Server Protocol + +The reason I'm using =lsp-mode= in the first place is to integrate with the +packages I've set up in [[Programming Tools]], so use that instead of the provided +machinery. + +#+BEGIN_SRC elisp +(use-package lsp-mode + :init + (setq lsp-prefer-flymake nil) + (setq lsp-enable-xref t) + + :bind + (:map lsp-mode-map + ("M-." . lsp-find-definition) + ("M-," . pop-tag-mark))) + +(use-package company-lsp + :requires company + :commands company-lsp + + :init + (setq company-lsp-cache-candidates 'auto)) +#+END_SRC + + +The only reason I'm using =lsp-ui= is for integration with [[Flycheck]]. The features +like lenses don't interest me. + +#+BEGIN_SRC elisp +(use-package lsp-ui + :init + (setq lsp-ui-sideline-enable nil) + (setq lsp-ui-peek-enable nil) + (setq lsp-ui-doc-enable nil)) +#+END_SRC + ** Rust Enable [[company]], ElDoc, and racer. |