Update config with impatient mode and lsp file watcher config

This commit is contained in:
Wojciech Kozlowski 2020-10-01 21:19:07 +02:00
parent fd7ce594cf
commit f148787a95
2 changed files with 21 additions and 3 deletions

View File

@ -31,6 +31,7 @@
highlight-parentheses highlight-parentheses
ibuffer-vc ibuffer-vc
iedit iedit
impatient-mode
pdf-tools pdf-tools
perspective perspective
projectile projectile
@ -519,6 +520,23 @@
((mail-mode . auto-fill-mode) ((mail-mode . auto-fill-mode)
(mail-mode . (lambda () (setq fill-column 71))))) (mail-mode . (lambda () (setq fill-column 71)))))
;; --------------------------------------------------------------------------
;; `impatient-mode'
;; --------------------------------------------------------------------------
;; To preview markdown, start an HTTP daemon `httpd-start' and enable
;; `impatient-mode'. Then, in a browser, visit http://localhost:8080/imp.
(defun markdown-html (buffer)
(princ (with-current-buffer buffer
(format "<!DOCTYPE html><html><title>Impatient Markdown</title><xmp theme=\"united\" style=\"display:none;\"> %s </xmp><script src=\"http://strapdownjs.com/v/0.2/strapdown.js\"></script></html>"
(buffer-substring-no-properties (point-min)
(point-max))))
(current-buffer)))
(use-package impatient-mode
:hook ((markdown-mode . (lambda () (setq imp-user-filter
'markdown-html)))))
;; -------------------------------------------------------------------------- ;; --------------------------------------------------------------------------
;; `pdf-tools' - use instead of DocView. ;; `pdf-tools' - use instead of DocView.
;; -------------------------------------------------------------------------- ;; --------------------------------------------------------------------------

View File

@ -299,11 +299,11 @@
(use-package lsp-mode (use-package lsp-mode
:commands lsp :commands lsp
:init :init
(setq lsp-diagnostic-package :flycheck (setq lsp-diagnostics-provider :flycheck
lsp-flycheck-live-reporting nil
lsp-signature-auto-activate t lsp-signature-auto-activate t
lsp-signature-doc-lines 1 lsp-signature-doc-lines 1
lsp-enable-indentation nil)) lsp-enable-indentation nil
lsp-file-watch-threshold 10000))
(use-package lsp-ui (use-package lsp-ui
:commands lsp-ui-mode :commands lsp-ui-mode