Add func/binding to compile in lsp project root
This commit is contained in:
parent
0385b3ff35
commit
dffd96df80
@ -580,6 +580,7 @@
|
|||||||
|
|
||||||
(use-package lsp-mode
|
(use-package lsp-mode
|
||||||
:hook ((python-mode html-mode web-mode css-mode js2-mode typescript-mode java-mode) . lsp)
|
:hook ((python-mode html-mode web-mode css-mode js2-mode typescript-mode java-mode) . lsp)
|
||||||
|
:bind (:map lsp-mode-map ("C-M-z" . lsp-compile-in-root))
|
||||||
:config
|
:config
|
||||||
(setq lsp-prefer-flymake nil
|
(setq lsp-prefer-flymake nil
|
||||||
lsp-inhibit-message t
|
lsp-inhibit-message t
|
||||||
@ -589,6 +590,12 @@
|
|||||||
lsp-pylsp-plugins-pydocstyle-enabled nil
|
lsp-pylsp-plugins-pydocstyle-enabled nil
|
||||||
lsp-pylsp-plugins-flake8-enabled t)
|
lsp-pylsp-plugins-flake8-enabled t)
|
||||||
|
|
||||||
|
(defun lsp-compile-in-root ()
|
||||||
|
"Do compilation in the root dir of a project"
|
||||||
|
(interactive)
|
||||||
|
(let ((default-directory (lsp-workspace-root)))
|
||||||
|
(call-interactively 'compile)))
|
||||||
|
|
||||||
(use-package company-lsp :ensure
|
(use-package company-lsp :ensure
|
||||||
:config
|
:config
|
||||||
(setq company-lsp-enable-snippet t
|
(setq company-lsp-enable-snippet t
|
||||||
|
Loading…
Reference in New Issue
Block a user