LSP and ivy for emacs.

This commit is contained in:
Gabriel Simmer 2021-08-31 22:12:10 +01:00
parent 67c4ae7ece
commit 0d354b0887

View file

@ -15,8 +15,8 @@
(require 'package)
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
("org" . "https://orgmode.org/elpa")
("elpa" . "https://elpa.gnu.org/packages")))
("org" . "https://orgmode.org/elpa/")
("elpa" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(unless package-archive-contents
@ -28,6 +28,7 @@
(require 'use-package)
(setq use-package-always-ensure t)
;; I like Monokai Pro, sue me ;)
(use-package monokai-pro-theme
:ensure t
:config
@ -40,12 +41,49 @@
:bind (:map global-map
("M-0" . treemacs-select-window)
("C-x t t" . treemacs)))
;; LSP config.
(use-package spinner)
(use-package lsp-mode
:init
(setq lsp-keymap-prefix "C-c l")
:hook ((rust-mode . lsp)
(lsp-mode . lsp-enable-which-key-integration))
:commands lsp)
(use-package lsp-ui :commands lsp-ui-mode)
(use-package lsp-ivy :commands lsp-ivy-workspace-symbol)
(use-package lsp-treemacs :commands lsp-treemacs-errors-list)
(use-package rust-mode)
;; Ivy/Swiper/Counsel config.
(use-package swiper)
(use-package counsel)
(use-package ivy
:diminish
:bind (("C-s" . swiper)
:map ivy-minibuffer-map
("TAB" . ivy-alt-done)
("C-l" . ivy-alt-done)
("C-j" . ivy-next-line)
("C-k" . ivy-previous-line)
:map ivy-switch-buffer-map
("C-k" . ivy-previous-line)
("C-l" . ivy-done)
("C-d" . ivy-switch-buffer-kill)
:map ivy-reverse-i-search-map
("C-k" . ivy-previous-line)
("C-d" . ivy-reverse-i-search-kill))
:config
(ivy-mode 1))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages '(treemacs use-package monokai-pro-theme)))
'(package-selected-packages
'(rust-mode swipe spinner lsp-treemacs lsp-ivy lsp-ui lsp-mode counsel swiper ivy treemacs use-package monokai-pro-theme)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.