|
|
|
@ -1,27 +1,10 @@
|
|
|
|
|
;; Default mode definitions. |
|
|
|
|
|
|
|
|
|
;;; Code: |
|
|
|
|
;; Easier to identify identifiers |
|
|
|
|
(use-package color-identifiers-mode |
|
|
|
|
:ensure t |
|
|
|
|
:init (add-hook 'after-init-hook 'global-color-identifiers-mode) |
|
|
|
|
:config |
|
|
|
|
(setq color-identifiers:recoloring-delay 1)) |
|
|
|
|
|
|
|
|
|
;; Flycheck is enabled globally. |
|
|
|
|
(use-package flycheck |
|
|
|
|
:ensure t |
|
|
|
|
:hook ((after-init . global-flycheck-mode))) |
|
|
|
|
|
|
|
|
|
;; Company is enabled globally. |
|
|
|
|
(use-package company |
|
|
|
|
:ensure t |
|
|
|
|
:hook ((after-init . global-company-mode)) |
|
|
|
|
:config ;; backend setting must be done only after load. |
|
|
|
|
(push 'company-files company-backends) |
|
|
|
|
(push 'company-keywords company-backends) |
|
|
|
|
(push 'company-capf company-backends)) |
|
|
|
|
|
|
|
|
|
(use-package projectile |
|
|
|
|
:ensure t |
|
|
|
|
:bind-keymap |
|
|
|
@ -29,12 +12,41 @@
|
|
|
|
|
|
|
|
|
|
(use-package lsp-mode |
|
|
|
|
:ensure t |
|
|
|
|
:hook ((python-mode . lsp-deferred)) |
|
|
|
|
:commands (lsp lsp-deferred)) |
|
|
|
|
:hook ((python-mode . lsp-deferred) |
|
|
|
|
(ruby-mode . lsp-deferred) |
|
|
|
|
(c-mode . lsp-deferred) |
|
|
|
|
(c++-mode . lsp-deferred))) |
|
|
|
|
|
|
|
|
|
(use-package lsp-ui |
|
|
|
|
:ensure t |
|
|
|
|
:hook (lsp-mode . lsp-ui-mode)) |
|
|
|
|
:after lsp |
|
|
|
|
:hook ((lsp-mode . lsp-ui-mode)) |
|
|
|
|
:config |
|
|
|
|
(setq lsp-ui-doc-enable t) |
|
|
|
|
(setq lsp-ui-doc-show-with-cursor t) |
|
|
|
|
(setq lsp-ui-doc-show-with-mouse t)) |
|
|
|
|
|
|
|
|
|
;; Way better syntax highlighting for many languages |
|
|
|
|
;; Emacs 29 supports this natively. |
|
|
|
|
(if (version<= emacs-version "29") |
|
|
|
|
(progn |
|
|
|
|
(use-package tree-sitter |
|
|
|
|
:ensure t |
|
|
|
|
:init |
|
|
|
|
(global-tree-sitter-mode) |
|
|
|
|
:hook ((tree-sitter-after-on . tree-sitter-hl-mode))) |
|
|
|
|
(use-package tree-sitter-langs |
|
|
|
|
:ensure t)) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
;; Company is enabled globally. |
|
|
|
|
(use-package company |
|
|
|
|
:ensure t |
|
|
|
|
:hook ((after-init . global-company-mode)) |
|
|
|
|
:config ;; backend setting must be done only after load. |
|
|
|
|
(push 'company-files company-backends) |
|
|
|
|
(push 'company-keywords company-backends) |
|
|
|
|
(push 'company-capf company-backends)) |
|
|
|
|
|
|
|
|
|
(with-eval-after-load 'magit-mode |
|
|
|
|
(add-hook 'after-save-hook 'magit-after-save-refresh-status t)) |
|
|
|
|