My own configuration files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

162 lines
4.2 KiB

;;; init.el -*- lexical-binding: t; -*-
(require 'package)
(add-to-list
'package-archives
'("melpa" . "https://melpa.org/packages/")
t)
(add-to-list
'package-archives
'("org" . "https://orgmode.org/elpa/")
t)
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)
;; update packages
(use-package auto-package-update
:config (setq auto-package-update-delete-old-versions t)
(setq auto-package-update-hide-results t)
(auto-package-update-maybe))
;; rust mode
(use-package rust-mode
:ensure t)
;; Notes
(use-package org
:ensure t
:bind (("\C-cl" . org-store-link)
("\C-ca" . org-agenda)
("\C-cb" . org-iswtichb)))
;; LanguageServer
(use-package lsp-mode
:ensure t
:hook ((python-mode . lsp)
(rust-mode . lsp))
:commands lsp)
(use-package lsp-ui
:commands lsp-ui-mode
:ensure t)
;; Helm, for easy access to commands
; (use-package helm
; :ensure t
; :init (progn (require 'helm-config)
; (setq helm-mode-fuzzy-match t)
; (helm-mode))
; )
;; Markdown mode
(use-package markdown-mode
:ensure t)
;; install goto last change (opens the file in the last position)
; (use-package goto-last-change
; :ensure t)
;; install fill-column-indicador: right side gutter
; (use-package fill-column-indicator
; :ensure t)
;; powerline
(use-package powerline
:ensure t
:config (powerline-center-theme))
;; colorschemes
(use-package doom-themes
:ensure t
:config (setq doom-themes-enable-bold t
doom-themes-enable-italic t)
(load-theme 'doom-molokai t)
)
; (setq-default fill-column 80)
; (define-globalized-minor-mode global-fci-mode fci-mode (lambda () (fci-mode 1)))
; (global-fci-mode 1)
;; highlights the current line
(use-package hlinum
:ensure t)
(set-face-foreground 'linum-highlight-face "white")
(set-face-background 'linum-highlight-face nil)
(hlinum-activate)
;; don't show startup messages
(setq inhibit-startup-message t)
(setq initial-scratch-message nil)
;; git gutters
(use-package diff-hl
:ensure t
:init (setq diff-hl-side 'right))
(global-diff-hl-mode 1)
(diff-hl-margin-mode 1)
(diff-hl-flydiff-mode 1)
;; install editorconfig
(use-package editorconfig
:ensure t
:config (editorconfig-mode 1))
(require 'whitespace)
(setq whitespace-style '(face empty tabs lines-tail trailing))
(global-whitespace-mode t)
;; Snippets
(use-package yasnippet
:ensure t)
(yas-global-mode 1)
;; auto-pairs
(electric-pair-mode 1)
;; disable the menubar and tabbar
(menu-bar-mode 0)
(tool-bar-mode 0)
;; highlight matching paren
(show-paren-mode 1)
;; display line and column in the statusbar
(line-number-mode 1)
(column-number-mode 1)
;; line numbers
(global-linum-mode 1)
(defun configure-linum-colors ()
(set-face-foreground 'linum "#555555"))
(configure-linum-colors)
;; redefine the format; otherwise, the number will get "glued" to the code.
(setq linum-format " %5d ")
;; answer questions with 'y' instead of full 'yes'
(defalias 'yes-or-no-p 'y-or-n-p)
;; Create backup files directly in the .Trash directory
(setq backup-directory-alist '((".*" . "~/.Trash")))
;; Lock files should not be created
(setq create-lockfiles nil)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
'(editorconfig diff-hl hlinum use-package rust-mode doom-themes auto-package-update)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)