Merge branch 'master' of git.jeremydormitzer.com:jdormit/dotfiles

This commit is contained in:
Jeremy Dormitzer 2019-02-17 12:01:09 -05:00
commit 89dcf6cb4b

View File

@ -970,10 +970,13 @@ Use nvm to manage node versions:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package web-mode) (use-package web-mode)
#+END_SRC #+END_SRC
* Java * LSP Mode
LSP Java uses the Eclipse JDT Language Server as a backend to enable Java IDE features. Emacs support for the Language Server Protocol
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package lsp-mode) (use-package lsp-mode
:config
(leader-def-key "cd" #'xref-find-definitions))
(use-package company-lsp (use-package company-lsp
:after (company) :after (company)
@ -987,6 +990,13 @@ LSP Java uses the Eclipse JDT Language Server as a backend to enable Java IDE fe
lsp-ui-sideline-show-code-actions t lsp-ui-sideline-show-code-actions t
lsp-ui-sideline-update-mode 'point)) lsp-ui-sideline-update-mode 'point))
(use-package dap-mode
:after (lsp-mode))
#+END_SRC
* Java
LSP Java uses the Eclipse JDT Language Server as a backend to enable Java IDE features.
#+BEGIN_SRC emacs-lisp
(defun jdormit/set-up-java () (defun jdormit/set-up-java ()
(lsp-java-enable) (lsp-java-enable)
(flycheck-mode t) (flycheck-mode t)
@ -1013,11 +1023,15 @@ Configure Java project sources:
#+END_SRC #+END_SRC
* Python * Python
#+BEGIN_SRC emacs-lisp
(add-hook 'python-mode-hook #'lsp)
#+END_SRC
Elpy is a python IDE package: Elpy is a python IDE package:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package elpy (use-package elpy
:config :config
(elpy-enable) ; (elpy-enable)
(pyvenv-mode) (pyvenv-mode)
(leader-def-key "sp" #'elpy-shell-switch-to-shell)) (leader-def-key "sp" #'elpy-shell-switch-to-shell))
@ -1056,16 +1070,9 @@ Basic support:
:mode (("\\.go\\'" . go-mode))) :mode (("\\.go\\'" . go-mode)))
#+END_SRC #+END_SRC
Add in autocompletion. This requires [[https://github.com/mdempsky/gocode][gocode]] to be installed: LSP support - requires [[https://github.com/sourcegraph/go-langserver][go-langserver]].
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package company-go (add-hook 'go-mode-hook #'lsp)
:after go-mode
:config
(add-hook 'go-mode-hook
(lambda ()
(set (make-local-variable 'company-backends) '(company-go))
(company-mode-on))))
#+END_SRC #+END_SRC
* Clojure * Clojure
@ -1192,16 +1199,9 @@ An Eshell alias to start PHP using XDebug:
"php -d xdebug.remote_enable=on -d xdebug.remote_host=127.0.0.1 -d xdebug.remote_port=9000 -d xdebug.remote_handler=dbgp -d xdebug.idekey=geben -d xdebug.remote_autostart=On $*"))) "php -d xdebug.remote_enable=on -d xdebug.remote_host=127.0.0.1 -d xdebug.remote_port=9000 -d xdebug.remote_handler=dbgp -d xdebug.idekey=geben -d xdebug.remote_autostart=On $*")))
#+END_SRC #+END_SRC
Company-mode autocompletion for PHP: LSP for PHP requires [[https://github.com/felixfbecker/php-language-server][php-language-server]] to be installed in ~/.composer:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package company-php (add-hook 'php-mode-hook #'lsp)
:config
(add-hook 'php-mode-hook
(lambda ()
(ac-php-core-eldoc-setup)
(make-local-variable 'company-backends)
(add-to-list 'company-backends 'company-ac-php-backend))))
#+END_SRC #+END_SRC
* Pharen * Pharen
@ -1210,6 +1210,13 @@ Company-mode autocompletion for PHP:
(add-to-list 'auto-mode-alist '("\\.phn\\'" . clojure-mode)) (add-to-list 'auto-mode-alist '("\\.phn\\'" . clojure-mode))
#+END_SRC #+END_SRC
* Bash
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))
#+END_SRC
* CSVs * CSVs
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package csv-mode (use-package csv-mode