tools/lsp: noop lsp! if used more than once
This commit is contained in:
parent
d39500f143
commit
eb42f95777
1 changed files with 13 additions and 12 deletions
|
@ -11,15 +11,16 @@ been moved out to their respective modules, or these hooks:
|
||||||
+ `+lsp|init-company' (on `lsp-mode-hook')
|
+ `+lsp|init-company' (on `lsp-mode-hook')
|
||||||
+ `+lsp|init-ui-flycheck-or-flymake' (on `lsp-ui-mode-hook')"
|
+ `+lsp|init-ui-flycheck-or-flymake' (on `lsp-ui-mode-hook')"
|
||||||
(require 'lsp-mode)
|
(require 'lsp-mode)
|
||||||
(when lsp-auto-configure
|
(unless lsp-mode
|
||||||
(require 'lsp-clients))
|
(when lsp-auto-configure
|
||||||
(when (and (buffer-file-name)
|
(require 'lsp-clients))
|
||||||
(setq-local lsp--buffer-workspaces
|
(when (and (buffer-file-name)
|
||||||
(or (lsp--try-open-in-library-workspace)
|
(setq-local lsp--buffer-workspaces
|
||||||
(lsp--try-project-root-workspaces (equal arg '(4))
|
(or (lsp--try-open-in-library-workspace)
|
||||||
(and arg (not (equal arg 1)))))))
|
(lsp--try-project-root-workspaces (equal arg '(4))
|
||||||
(lsp-mode 1)
|
(and arg (not (equal arg 1)))))))
|
||||||
(lsp--info
|
(lsp-mode 1)
|
||||||
"Connected to %s."
|
(lsp--info
|
||||||
(apply #'concat (mapcar (lambda (it) (format "[%s]" (lsp--workspace-print it)))
|
"Connected to %s."
|
||||||
lsp--buffer-workspaces)))))
|
(apply #'concat (mapcar (lambda (it) (format "[%s]" (lsp--workspace-print it)))
|
||||||
|
lsp--buffer-workspaces))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue