Make LSP servers use current directory if no project detected
it's a but hacky, but oh well
This commit is contained in:
parent
739385b48b
commit
a7135a8baa
@ -471,6 +471,13 @@
|
|||||||
(setq lsp-inhibit-message t
|
(setq lsp-inhibit-message t
|
||||||
lsp-eldoc-render-all nil)
|
lsp-eldoc-render-all nil)
|
||||||
|
|
||||||
|
;; hack to make LSP servers use current directory if no project detected
|
||||||
|
(defun my-default-directory ()
|
||||||
|
"Returns the current directory."
|
||||||
|
default-directory)
|
||||||
|
(advice-add #'lsp--suggest-project-root
|
||||||
|
:after-until #'my-default-directory)
|
||||||
|
|
||||||
(use-package company-lsp :ensure
|
(use-package company-lsp :ensure
|
||||||
:config
|
:config
|
||||||
(push 'company-lsp company-backends)
|
(push 'company-lsp company-backends)
|
||||||
|
Loading…
Reference in New Issue
Block a user