Files
emacsd/lib/init-editor.el
T
2026-10-23 09:35:20 +02:00

91 lines
2.5 KiB
EmacsLisp

;; Editor initialization -*- lexical-binding: t; -*-
(setq company-tooltip-align-annotations t)
;; (require 'helm-config)
;; Vieja config
(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)
;; 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))
(require 'auto-complete-config)
(add-hook 'auto-complete-mode-hook
(lambda ()
(setq ac-sources (remove 'ac-source-abbrev ac-sources))))
(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)
(setq js-indent-level 4)
(tool-bar-mode -1)
(electric-pair-mode +1)
(dumb-jump-mode)
;; (global-display-line-numbers-mode)
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
;; Born to be wild
;; (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)
;; 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)
(require 'org)
(provide 'init-editor)