2026-10-23 09:35:20 +02:00
|
|
|
;; Editor initialization -*- lexical-binding: t; -*-
|
2020-04-13 22:29:41 +02:00
|
|
|
|
|
|
|
|
(setq company-tooltip-align-annotations t)
|
2023-03-25 19:21:24 +01:00
|
|
|
;; (require 'helm-config)
|
2026-10-23 09:35:20 +02:00
|
|
|
|
|
|
|
|
;; Vieja config
|
2020-04-13 22:29:41 +02:00
|
|
|
(projectile-mode +1)
|
|
|
|
|
(define-key projectile-mode-map (kbd "s-p") 'projectile-command-map)
|
|
|
|
|
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
|
2026-10-23 09:35:20 +02:00
|
|
|
|
|
|
|
|
;; Optional: ag is nice alternative to using grep with Projectile
|
|
|
|
|
(use-package ag
|
|
|
|
|
:ensure t)
|
|
|
|
|
|
|
|
|
|
;; Optional: Enable vertico as the selection framework to use with Projectile
|
|
|
|
|
(use-package vertico
|
|
|
|
|
:ensure t
|
|
|
|
|
:init
|
|
|
|
|
(vertico-mode +1))
|
|
|
|
|
|
|
|
|
|
;; Optional: marginalia annotates the completion candidates - file sizes and
|
|
|
|
|
;; modification times at `projectile-find-file', major modes at
|
|
|
|
|
;; `projectile-switch-to-buffer', and so on.
|
|
|
|
|
(use-package marginalia
|
|
|
|
|
:ensure t
|
|
|
|
|
:init
|
|
|
|
|
(marginalia-mode +1))
|
|
|
|
|
|
|
|
|
|
;; Optional: which-key will show you options for partially completed keybindings
|
|
|
|
|
;; It's extremely useful for packages with many keybindings like Projectile.
|
|
|
|
|
(use-package which-key
|
|
|
|
|
:ensure t
|
|
|
|
|
:config
|
|
|
|
|
(which-key-mode +1))
|
|
|
|
|
|
2020-04-13 22:29:41 +02:00
|
|
|
(require 'auto-complete-config)
|
2026-10-23 09:35:20 +02:00
|
|
|
|
|
|
|
|
(add-hook 'auto-complete-mode-hook
|
|
|
|
|
(lambda ()
|
|
|
|
|
(setq ac-sources (remove 'ac-source-abbrev ac-sources))))
|
|
|
|
|
|
2020-04-13 22:29:41 +02:00
|
|
|
(ac-config-default)
|
|
|
|
|
(require 'neotree)
|
|
|
|
|
(global-set-key (kbd "C-c n") 'neotree-toggle)
|
|
|
|
|
|
|
|
|
|
(require 'all-the-icons)
|
|
|
|
|
|
|
|
|
|
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))
|
|
|
|
|
(setq tab-width 4)
|
2023-01-14 14:59:44 +01:00
|
|
|
(setq js-indent-level 4)
|
2020-04-13 22:29:41 +02:00
|
|
|
(tool-bar-mode -1)
|
|
|
|
|
(electric-pair-mode +1)
|
|
|
|
|
(dumb-jump-mode)
|
2026-10-23 09:35:20 +02:00
|
|
|
;; (global-display-line-numbers-mode)
|
|
|
|
|
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
|
|
|
|
|
|
2020-04-13 22:29:41 +02:00
|
|
|
;; Born to be wild
|
2026-10-23 09:35:20 +02:00
|
|
|
;; (setq make-backup-files nil)
|
|
|
|
|
|
|
|
|
|
;; Put autosave files (ie #foo#) and backup files (ie foo~) in ~/.emacs.d/.
|
|
|
|
|
(custom-set-variables
|
|
|
|
|
'(auto-save-file-name-transforms
|
|
|
|
|
'((".*" "~/.emacs.d/autosaves/" t)))
|
|
|
|
|
'(backup-directory-alist
|
|
|
|
|
'((".*" . "~/.emacs.d/backups/"))))
|
|
|
|
|
|
|
|
|
|
;; create the autosave and backups dir if necessary, since emacs won't.
|
|
|
|
|
(make-directory "~/.emacs.d/autosaves/" t)
|
|
|
|
|
(make-directory "~/.emacs.d/backups/" t)
|
|
|
|
|
|
2023-01-14 14:59:44 +01:00
|
|
|
;; Load user path
|
|
|
|
|
(when (memq window-system '(mac ns x))
|
|
|
|
|
(exec-path-from-shell-initialize))
|
|
|
|
|
|
|
|
|
|
(set-frame-parameter (selected-frame) 'alpha '(97))
|
|
|
|
|
(add-to-list 'default-frame-alist '(alpha . (97)))
|
|
|
|
|
|
|
|
|
|
;; Show full path in window title
|
|
|
|
|
(setq frame-title-format
|
|
|
|
|
'(buffer-file-name "%b - %f" ; File buffer
|
|
|
|
|
(dired-directory dired-directory ; Dired buffer
|
|
|
|
|
(revert-buffer-function "%b" ; Buffer Menu
|
|
|
|
|
("%b - Dir: " default-directory))))) ; Plain buffer
|
|
|
|
|
|
|
|
|
|
(require 'iedit)
|
|
|
|
|
(require 'gitlab-ci-mode)
|
|
|
|
|
(require 'gitlab-ci-mode-flycheck)
|
2026-10-23 09:35:20 +02:00
|
|
|
(require 'org)
|
2020-04-13 22:29:41 +02:00
|
|
|
|
|
|
|
|
(provide 'init-editor)
|