diff --git a/.emacs.d/init.el b/.emacs.d/init.el index d18f19f..5a4a700 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -471,6 +471,13 @@ (setq lsp-inhibit-message t 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 :config (push 'company-lsp company-backends)