68 lines
1.6 KiB
EmacsLisp
68 lines
1.6 KiB
EmacsLisp
;; -*- lexical-binding: t; -*-
|
|
|
|
;; IDE features
|
|
|
|
;; Company-mode provides inline autocompletion
|
|
(use-package company
|
|
:hook (after-init . global-company-mode)
|
|
:config
|
|
(evil-collection-company-setup))
|
|
|
|
;; Flycheck gives you error squigglies
|
|
(use-package flycheck
|
|
:hook (after-init . global-flycheck-mode)
|
|
:custom
|
|
(flycheck-disabled-checkers '(emacs-lisp-checkdoc emacs-lisp)))
|
|
|
|
;; Quick file overview for supported modes
|
|
(use-package imenu
|
|
:straight (:type built-in)
|
|
:general
|
|
(leader-map "m" #'imenu))
|
|
|
|
;; Find definition/references
|
|
(use-package xref
|
|
:straight (:type built-in)
|
|
:config
|
|
(evil-collection-xref-setup)
|
|
:general
|
|
(normal "M-." #'xref-find-definitions)
|
|
(normal "M-," #'xref-pop-marker-stack)
|
|
(normal "M-r" #'xref-find-references)
|
|
:custom
|
|
(xref-prompt-for-identifier nil))
|
|
|
|
;; Full-on IDE functionality via LSP mode
|
|
(use-package lsp-mode
|
|
:hook
|
|
(python-mode . lsp-deferred)
|
|
(rust-mode . lsp-deferred)
|
|
(go-mode . lsp-deferred)
|
|
(sh-mode . lsp-deferred)
|
|
:config
|
|
(add-hook 'lsp-mode-hook #'lsp-enable-which-key-integration)
|
|
:custom
|
|
(lsp-keymap-prefix "C-c l")
|
|
(lsp-headerline-breadcrumb-enable nil)
|
|
(lsp-file-watch-threshold 100000)
|
|
:general
|
|
("C-c l" lsp-mode-map :which-key "lsp"))
|
|
|
|
(use-package lsp-ui
|
|
:after lsp)
|
|
|
|
;; Some compilation-mode conveniences
|
|
(use-package compile
|
|
:straight (:type built-in)
|
|
:commands compile
|
|
:config
|
|
(evil-collection-compile-setup))
|
|
|
|
;; Code formatting library
|
|
(use-package apheleia
|
|
:straight (apheleia :host github :repo "raxod502/apheleia")
|
|
:general
|
|
("C-c f" #'apheleia-format-buffer))
|
|
|
|
(provide 'init-ide)
|