This commit is contained in:
rawley
2025-07-03 21:03:24 -06:00
parent 033755b567
commit c8661d9e3f

33
init.el
View File

@@ -10,7 +10,7 @@
(setq visible-bell nil) (setq visible-bell nil)
(setq ring-bell-function 'ignore) (setq ring-bell-function 'ignore)
(setq shell-file-name "/bin/bash") (setq shell-file-name "/bin/bash")
(setq shell-command-switch "-ic") (setq shell-command-switch "-c")
(setq indent-tabs-mode nil) (setq indent-tabs-mode nil)
(setq require-final-newline t) (setq require-final-newline t)
(setq frame-inhibit-implied-resize t) (setq frame-inhibit-implied-resize t)
@@ -28,6 +28,8 @@
(add-to-list 'image-types 'svg) (add-to-list 'image-types 'svg)
(setq require-final-newline t) (setq require-final-newline t)
(set-face-attribute 'default nil :height 120)
;; Stupid bold font for no reason, BEGONE! ;; Stupid bold font for no reason, BEGONE!
(mapc (mapc
(lambda (face) (lambda (face)
@@ -97,12 +99,7 @@
;; The best linter/code checker ever made ;; The best linter/code checker ever made
(use-package flycheck (use-package flycheck
:init (global-flycheck-mode) :init (global-flycheck-mode))
:config
(setq flycheck-perl-include-path ; Lookup our local Perl libs.
(add-to-list
'flycheck-perl-include-path
"~/perl5/lib/perl5/")))
;; Generic completion ;; Generic completion
(use-package ivy (use-package ivy
@@ -203,19 +200,22 @@
(setq perltidy-on-save t) (setq perltidy-on-save t)
(require 'perl-mode) (require 'perl-mode)
(require 'cperl-mode) (require 'cperl-mode)
(require 'projectile)
(setq cperl-set-style "linux") (setq cperl-set-style "linux")
(setq cperl-highlight-variables-indiscriminately t) (setq cperl-highlight-variables-indiscriminately t)
(defalias 'perl-mode 'cperl-mode) (defalias 'perl-mode 'cperl-mode)
(setq cperl-indent-parens-as-block t) (setq cperl-indent-parens-as-block t)
(let ((rf-perl-version (shell-command-to-string "perl -e 'print $]'"))) ;; Set Perl include path
'((cperl-mode (setq flycheck-perl-include-path '())
(flycheck-perl-include-path . (concat "~/perl5/perlbrew/perls/perl-"
'rf-perl-version ;;; This is kinda ugly, assuming you use perlbrew its fine :)
"lib" (when (file-directory-p "~/perl5/perlbrew")
'rf-perl-version)) (let ((rf-perl-version (shell-command-to-string "source ~/.bashrc && perl -e 'print($^V =~ s/v//r)' 2> /dev/null")))
(when (projectile-project-p) (add-to-list 'flycheck-perl-include-path (concat "~/perl5/perlbrew/perls/perl-" rf-perl-version "/lib/" rf-perl-version))))
(flycheck-perl-include-path . (concat (projectile-project-root) "/lib")))))) (add-hook 'cperl-mode-hook
(lambda ()
(add-to-list 'flycheck-perl-include-path (concat (projectile-project-root) "lib"))))
(eval-after-load 'cperl-mode (eval-after-load 'cperl-mode
'(progn '(progn
@@ -232,9 +232,10 @@
:slant 'italic :slant 'italic
) )
)) ))
;;;; END cperl-mode ;;;; END cperl-mode
(custom-set-variables (custom-set-variables)
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.