Use Language Server Protocol completion where possible
This commit is contained in:
parent
4b600c1596
commit
5559b31e36
@ -361,6 +361,7 @@
|
|||||||
:bind ("C-=" . er/expand-region))
|
:bind ("C-=" . er/expand-region))
|
||||||
|
|
||||||
(use-package company-quickhelp :ensure
|
(use-package company-quickhelp :ensure
|
||||||
|
:disabled
|
||||||
:config
|
:config
|
||||||
(company-quickhelp-mode 1)
|
(company-quickhelp-mode 1)
|
||||||
(setq company-quickhelp-delay 0.5))
|
(setq company-quickhelp-delay 0.5))
|
||||||
@ -427,6 +428,41 @@
|
|||||||
(bind-key "C-x 2" 'split-window-below-i3)
|
(bind-key "C-x 2" 'split-window-below-i3)
|
||||||
(bind-key "C-x 3" 'split-window-right-i3))
|
(bind-key "C-x 3" 'split-window-right-i3))
|
||||||
|
|
||||||
|
(use-package lsp-mode :ensure
|
||||||
|
:config
|
||||||
|
(use-package company-lsp :ensure
|
||||||
|
:config
|
||||||
|
(push 'company-lsp company-backends))
|
||||||
|
|
||||||
|
(use-package lsp-ui :ensure
|
||||||
|
:config
|
||||||
|
(setq lsp-ui-sideline-ignore-duplicate t)
|
||||||
|
(add-hook 'lsp-mode-hook 'lsp-ui-mode))
|
||||||
|
|
||||||
|
(use-package lsp-python
|
||||||
|
;; requires python-language-server and/or python2-language-server
|
||||||
|
:hook (python-mode . lsp-python-enable))
|
||||||
|
|
||||||
|
(use-package lsp-java
|
||||||
|
;; requires eclipse jdt language server ("jdtls" in arch)
|
||||||
|
:hook (java-mode . lsp-java-enable))
|
||||||
|
|
||||||
|
(use-package lsp-javascript-typescript
|
||||||
|
;; Requires javascript-typescript-langserver installed locally
|
||||||
|
:hook ((js-mode . lsp-javascript-typescript-enable)
|
||||||
|
(typescript-mode . lsp-javascript-typescript-enable)
|
||||||
|
(js3-mode . lsp-javascript-typescript-enable)
|
||||||
|
(rjsx-mode . lsp-javascript-typescript-enable)))
|
||||||
|
|
||||||
|
(use-package lsp-html
|
||||||
|
;; requires vscode-html-languageserver-bin
|
||||||
|
:hook ((html-mode . lsp-html-enable)
|
||||||
|
(web-mode . lsp-html-enable)))
|
||||||
|
|
||||||
|
(use-package lsp-css
|
||||||
|
;; requires vscode-css-languageserver-bin
|
||||||
|
:hook ((css-mode . lsp-css-enable))))
|
||||||
|
|
||||||
;;;; optional external packages
|
;;;; optional external packages
|
||||||
(use-package arduino-mode
|
(use-package arduino-mode
|
||||||
:mode "\\.pde\\'"
|
:mode "\\.pde\\'"
|
||||||
@ -454,16 +490,6 @@
|
|||||||
:config
|
:config
|
||||||
(add-to-list 'company-backends 'company-c-headers))
|
(add-to-list 'company-backends 'company-c-headers))
|
||||||
|
|
||||||
(use-package company-jedi
|
|
||||||
:init
|
|
||||||
(add-hook 'python-mode-hook (lambda()
|
|
||||||
(add-to-list 'company-backends 'company-jedi)
|
|
||||||
(jedi-mode)))
|
|
||||||
(setq jedi:use-shortcuts t
|
|
||||||
jedi:get-in-function-call-delay 500
|
|
||||||
jedi:tooltip-method nil)
|
|
||||||
:commands (jedi-mode))
|
|
||||||
|
|
||||||
(use-package company-statistics
|
(use-package company-statistics
|
||||||
:config
|
:config
|
||||||
(company-statistics-mode))
|
(company-statistics-mode))
|
||||||
@ -641,12 +667,6 @@
|
|||||||
:config
|
:config
|
||||||
(setq js2-basic-offset 2))
|
(setq js2-basic-offset 2))
|
||||||
|
|
||||||
(use-package company-tern
|
|
||||||
:config
|
|
||||||
(add-to-list 'company-backends 'company-tern)
|
|
||||||
(setq company-tern-property-marker "⚫")
|
|
||||||
:hook (js2-mode . tern-mode))
|
|
||||||
|
|
||||||
(use-package nm
|
(use-package nm
|
||||||
:bind (:map nm-mode-map
|
:bind (:map nm-mode-map
|
||||||
("n" . nm-read)
|
("n" . nm-read)
|
||||||
|
Loading…
Reference in New Issue
Block a user