Created
June 10, 2020 07:24
-
-
Save nloyola/0fa0d9e8856a96111bf8c33c64b448c6 to your computer and use it in GitHub Desktop.
Emacs standalone config to test lsp-ui
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Usage: /path/to/emacs -Q -l /path/to/test-lsp-ui.el | |
;;; Date: 2018-01-03_09.07.11 | |
(toggle-debug-on-error) | |
(global-set-key (kbd "C-h") 'delete-backward-char) | |
(global-set-key (kbd "M-h") 'backward-kill-word) | |
(global-set-key (kbd "<f1>") 'help-command) | |
(define-key isearch-mode-map "\C-h" 'isearch-delete-char) | |
(unless (display-graphic-p) | |
(error "Please run Emacs in GUI mode!")) | |
;; ------------------------------------------------------------------ | |
(setq package-user-dir | |
(concat | |
user-emacs-directory | |
(format "elpa--%s/%s" (file-name-base load-file-name) emacs-version))) | |
(unless (load (concat user-emacs-directory "elpa.el") t) | |
(setq package-archives | |
'(("gnu" . "https://elpa.gnu.org/packages/") | |
("melpa" . "https://melpa.org/packages/")))) | |
(package-initialize) | |
(defun require-packages (&rest packages) | |
(dolist (pkg packages) | |
(unless (package-installed-p pkg) | |
(package-refresh-contents) | |
(package-install pkg)) | |
(require pkg))) | |
(require-packages | |
'projectile | |
'key-chord | |
'camcorder | |
'lsp-mode | |
'lsp-ui | |
'lsp-metals | |
'scala-mode | |
'helm | |
'solarized-theme | |
'use-package) | |
(add-hook 'after-init-hook | |
(lambda () | |
;; ------------------------------------------------------------------ | |
;; configuration | |
;; ------------------------------------------------------------------ | |
(load-theme 'solarized-dark t) | |
(add-hook 'lsp-mode-hook 'lsp-ui-mode) | |
(add-hook 'scala-mode-hook #'lsp) | |
(require 'helm-config) | |
(setq helm-ff-skip-boring-files nil) | |
(global-set-key (kbd "M-x") 'helm-M-x) | |
(global-set-key (kbd "C-x C-f") 'helm-find-files) | |
(global-set-key (kbd "C-x b") 'helm-mini) | |
)) | |
(run-hooks 'after-init-hook) | |
;;; test-lsp-ui.el ends here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment