diff --git a/.emacs.d/init.el b/.emacs.d/init.el index b2d668d..781c3c8 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -361,6 +361,7 @@ :bind ("C-=" . er/expand-region)) (use-package company-quickhelp :ensure + :disabled :config (company-quickhelp-mode 1) (setq company-quickhelp-delay 0.5)) @@ -427,6 +428,41 @@ (bind-key "C-x 2" 'split-window-below-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 (use-package arduino-mode :mode "\\.pde\\'" @@ -454,16 +490,6 @@ :config (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 :config (company-statistics-mode)) @@ -641,12 +667,6 @@ :config (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 :bind (:map nm-mode-map ("n" . nm-read)