Don't hard-code pyls executable and switch out lsp for lsp-deferred
This commit is contained in:
parent
32de5d1527
commit
707b20eeff
@ -2637,7 +2637,7 @@ Some formatting stuff:
|
||||
(web-mode-set-content-type "jsx"))
|
||||
(when (or (equal web-mode-content-type "javascript")
|
||||
(equal web-mode-content-type "jsx"))
|
||||
(lsp))))
|
||||
(lsp-deferred))))
|
||||
(add-hook 'web-mode-hook #'disable-tab-insert))
|
||||
#+END_SRC
|
||||
|
||||
@ -2680,7 +2680,7 @@ Manage node version via NVM within Emacs:
|
||||
* Java
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package lsp-java
|
||||
:hook ((java-mode . lsp)))
|
||||
:hook ((java-mode . lsp-deferred)))
|
||||
#+END_SRC
|
||||
|
||||
* Kotlin
|
||||
@ -2690,7 +2690,7 @@ Manage node version via NVM within Emacs:
|
||||
:config
|
||||
(with-eval-after-load 'lsp
|
||||
(when (executable-find "kotlin-language-server")
|
||||
(add-hook 'kotlin-mode-hook #'lsp))))
|
||||
(add-hook 'kotlin-mode-hook #'lsp-deferred))))
|
||||
#+END_SRC
|
||||
|
||||
* Groovy
|
||||
@ -2712,7 +2712,7 @@ Used for Jenkins configuration scripts and probably other things.
|
||||
:mode ("\\.ts\\'")
|
||||
:config
|
||||
(with-eval-after-load 'lsp
|
||||
(add-hook 'typescript-mode-hook 'lsp)))
|
||||
(add-hook 'typescript-mode-hook 'lsp-deferred)))
|
||||
#+END_SRC
|
||||
|
||||
* LSP Mode
|
||||
@ -2750,7 +2750,7 @@ Emacs support for the Language Server Protocol
|
||||
((normal visual motion) lsp-mode-map "K" #'lsp-describe-thing-at-point)
|
||||
:config
|
||||
(setq lsp-prefer-flymake nil)
|
||||
:commands lsp-mode)
|
||||
:commands lsp-mode lsp lsp-deferred)
|
||||
|
||||
(use-package company-lsp
|
||||
:after (lsp-mode company)
|
||||
@ -2855,10 +2855,7 @@ Elpy is a python IDE package:
|
||||
|
||||
Alternatively, use the LSP python client:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(with-eval-after-load 'lsp-pyls
|
||||
(when (file-exists-p (expand-file-name "~/.local/bin/pyls"))
|
||||
(setq lsp-pyls-server-command (list (expand-file-name "~/.local/bin/pyls")))))
|
||||
(add-hook 'python-mode-hook #'lsp)
|
||||
(add-hook 'python-mode-hook #'lsp-deferred)
|
||||
(general-def 'normal python-mode-map "C-c C-d" #'lsp-describe-thing-at-point)
|
||||
#+END_SRC
|
||||
|
||||
@ -3106,7 +3103,7 @@ Basic support:
|
||||
|
||||
LSP support - requires [[https://github.com/sourcegraph/go-langserver][go-langserver]].
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'go-mode-hook #'lsp)
|
||||
(add-hook 'go-mode-hook #'lsp-deferred)
|
||||
#+END_SRC
|
||||
|
||||
* Clojure
|
||||
@ -3311,7 +3308,7 @@ An Eshell alias to start PHP using XDebug:
|
||||
|
||||
LSP for PHP requires [[https://github.com/felixfbecker/php-language-server][php-language-server]] to be installed in ~/.composer:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'php-mode-hook #'lsp)
|
||||
(add-hook 'php-mode-hook #'lsp-deferred)
|
||||
#+END_SRC
|
||||
|
||||
* YAML
|
||||
@ -3330,12 +3327,12 @@ LSP for PHP requires [[https://github.com/felixfbecker/php-language-server][php-
|
||||
Use LSP if [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]] is installed.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(when (executable-find "bash-language-server")
|
||||
(add-hook 'sh-mode-hook #'lsp))
|
||||
(add-hook 'sh-mode-hook #'lsp-deferred))
|
||||
#+END_SRC
|
||||
|
||||
* Ruby
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'ruby-mode-hook #'lsp)
|
||||
(add-hook 'ruby-mode-hook #'lsp-deferred)
|
||||
#+END_SRC
|
||||
|
||||
* Rust
|
||||
@ -3345,7 +3342,7 @@ Use LSP if [[https://github.com/mads-hartmann/bash-language-server][bash-languag
|
||||
:general
|
||||
(rust-mode-map "C-c <tab>" #'rust-format-buffer)
|
||||
:config
|
||||
(add-hook 'rust-mode-hook #'lsp))
|
||||
(add-hook 'rust-mode-hook #'lsp-deferred))
|
||||
|
||||
|
||||
(use-package cargo
|
||||
|
Loading…
Reference in New Issue
Block a user