Using use-package to load lsp-mode
I’m using use-package to load lsp-mode
… I’m wondering how I configure it such that the autoloads are loaded properly?
I tried adding:
(autoload ‘lsp-modeline-workspace-status-mode “lsp-modeline-workspace-status” nil t nil)
to the use-package.<lsp-mode>
.config but that doesn’t work… still complains the Symbols’ value as variable is void.
(use-package lsp-mode
:after (company flycheck which-key)
:bind (:map lsp-mode-map
("C-c f r" . lsp-find-references)
("C-c l d" . dap-hydra)
("C-c r a" . lsp-execute-code-action)
("C-c r f" . lsp-format-buffer)
("C-c r g" . lsp-format-region)
("C-c r r" . lsp-rename)
)
:commands (lsp)
:defines (lsp-prefer-flymake)
:hook (lsp-mode . lsp-enable-which-key-integration)
:hook (scala-mode . lsp)
:hook (lsp-mode . lsp-lens-mode)
:init
(setq lsp-keymap-prefix "C-c l")
(which-key-add-key-based-replacements "C-c l d" "debugger")
:config
(setq lsp-diagnostics-provider :flycheck)
(add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]\\.Trash\\'")
(add-to-list 'lsp-file-watch-ignored-files "[/\\\\]\\.Trash\\'")
(setq lsp-prefer-flymake nil)
(define-key lsp-mode-map (kbd "C-c l") lsp-command-map)
(autoload ‘lsp-modeline-workspace-status-mode “lsp-modeline-workspace-status” nil t nil)
)
Solution:
(setq lsp-modeline-workspace-status-enable nil
lsp-modeline-diagnostics-enable nil
lsp-modeline-code-actions-enable nil
lsp-eldoc-render-all nil
lsp-headerline-breadcrumb-enable nil)
My site is free of ads and trackers. Was this post helpful to you? Why not
Disqus is great for comments/feedback but I had no idea it came with these gaudy ads.