Updated the shit
This commit is contained in:
parent
66d5c1f60b
commit
288d81be1b
1 changed files with 680 additions and 569 deletions
217
config.org
217
config.org
|
@ -76,7 +76,7 @@ and other packages I use.
|
||||||
Here I install some packages that don't need configuration.
|
Here I install some packages that don't need configuration.
|
||||||
Remember to run M-x all-the-icons-install-fonts after the first
|
Remember to run M-x all-the-icons-install-fonts after the first
|
||||||
init to install the fonts.
|
init to install the fonts.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC elisp
|
||||||
|
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode
|
||||||
:defer 1
|
:defer 1
|
||||||
|
@ -132,6 +132,35 @@ it. I don't think i'd ever use the overwritten.
|
||||||
:ensure t
|
:ensure t
|
||||||
:defer 1)
|
:defer 1)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
* My functions
|
||||||
|
Functions I wrote because emacs lisp is cool and useful.
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun qorg/goto-previous-buffer ()
|
||||||
|
"Switch to the previous buffer."
|
||||||
|
(interactive)
|
||||||
|
(switch-to-buffer (other-buffer)))
|
||||||
|
|
||||||
|
(defun kill-inner-word ()
|
||||||
|
"Unlike (kill-word) function, this function actually kill a world."
|
||||||
|
(interactive)
|
||||||
|
(forward-char 1)
|
||||||
|
(backward-word)
|
||||||
|
(kill-word 1))
|
||||||
|
(defun qorg/no-lines()
|
||||||
|
"Locally disable number line mode, useful hooks."
|
||||||
|
(display-line-numbers-mode -1))
|
||||||
|
|
||||||
|
(defun qorg/git-pushall ()
|
||||||
|
"Call the git pushall shell command."
|
||||||
|
(interactive)
|
||||||
|
(shell-command "git pushall"))
|
||||||
|
|
||||||
|
(defun qorg/goto-dashboard ()
|
||||||
|
"Goes to the dashboard buffer"
|
||||||
|
(interactive)
|
||||||
|
(switch-to-buffer "*dashboard*")
|
||||||
|
(dashboard-mode))
|
||||||
|
#+end_src
|
||||||
* Programs
|
* Programs
|
||||||
Emacs customization, Here is where most of the configuration is.
|
Emacs customization, Here is where most of the configuration is.
|
||||||
** Pseudopersonalization
|
** Pseudopersonalization
|
||||||
|
@ -146,7 +175,7 @@ The basic emacs persdonalization lol
|
||||||
(setq-default major-mode 'text-mode)
|
(setq-default major-mode 'text-mode)
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
;; Are you experienced?
|
;; Are you experienced?
|
||||||
(set-cursor-color "purple")
|
|
||||||
(set-face-background 'line-number nil)
|
(set-face-background 'line-number nil)
|
||||||
(set-face-background 'line-number-current-line nil)
|
(set-face-background 'line-number-current-line nil)
|
||||||
(setq-default Man-notify-method 'pushy)
|
(setq-default Man-notify-method 'pushy)
|
||||||
|
@ -196,7 +225,7 @@ It should use your default shell by default.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package "vterm"
|
(use-package "vterm"
|
||||||
:ensure t
|
:ensure t
|
||||||
:bind("C-x t" . vterm))
|
:bind("C-x C-t" . vterm))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Theme
|
** Theme
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -204,7 +233,8 @@ It should use your default shell by default.
|
||||||
:ensure t
|
:ensure t
|
||||||
:init(load-theme 'base16-harmonic-dark t))
|
:init(load-theme 'base16-harmonic-dark t))
|
||||||
(set-face-attribute 'default nil :font "IBM Plex Mono 12")
|
(set-face-attribute 'default nil :font "IBM Plex Mono 12")
|
||||||
(set-frame-font "Inconsolata 14")
|
(set-frame-font "Source Code Pro 12")
|
||||||
|
(set-cursor-color "purple")
|
||||||
#+end_src
|
#+end_src
|
||||||
** ctrlf
|
** ctrlf
|
||||||
So, you know, C-s in emacs sucks, so this is a repleacement for that.
|
So, you know, C-s in emacs sucks, so this is a repleacement for that.
|
||||||
|
@ -278,10 +308,10 @@ to.
|
||||||
:init
|
:init
|
||||||
(add-hook 'c-mode-hook 'c-turn-on-eldoc-mode))
|
(add-hook 'c-mode-hook 'c-turn-on-eldoc-mode))
|
||||||
(setq c-default-style "k&r")
|
(setq c-default-style "k&r")
|
||||||
(add-hook 'c-mode-hook '(lambda ()
|
(add-hook 'c-mode-hook (lambda ()
|
||||||
(lsp 1)
|
"" ""
|
||||||
(flycheck-select-checker 'c/c++-clang)))
|
(lsp)
|
||||||
(setq c-mode-hook nil)
|
(irony-mode -1)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** Raku
|
*** Raku
|
||||||
Raku, the cornerstone of any well designed programming language.
|
Raku, the cornerstone of any well designed programming language.
|
||||||
|
@ -289,28 +319,7 @@ Raku, the cornerstone of any well designed programming language.
|
||||||
(setq raku-indent-offset 5)
|
(setq raku-indent-offset 5)
|
||||||
(setq raku-exec-path "/home/qorg/rakudo-star-2021.04/bin/raku")
|
(setq raku-exec-path "/home/qorg/rakudo-star-2021.04/bin/raku")
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Web shit
|
*** Now for indent shit, so it matches the tabsize
|
||||||
Web programming and its consequences have been a disaster for the
|
|
||||||
human race, but it's a necessary evil these days. So here's a little
|
|
||||||
configuration for web-mode. Which is an improved shit for editing html documents.
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package web-mode
|
|
||||||
:ensure t
|
|
||||||
:init
|
|
||||||
(setq web-mode-markup-indent-offset 5)
|
|
||||||
(setq web-mode-indent-style nil)
|
|
||||||
(setq web-mode-css-indent-offset 5)
|
|
||||||
(setq web-mode-code-indent-offset 5)
|
|
||||||
(add-to-list 'web-mode-indentation-params '("lineup-args" . nil))
|
|
||||||
(add-to-list 'web-mode-indentation-params '("lineup-calls" . nil))
|
|
||||||
(add-to-list 'web-mode-indentation-params '("lineup-concats" . nil))
|
|
||||||
(add-to-list 'web-mode-indentation-params '("lineup-ternary" . nil))
|
|
||||||
(setq web-mode-enable-current-element-highlight t)
|
|
||||||
(set-face-attribute 'web-mode-html-tag-face nil :foreground "Green3")
|
|
||||||
(set-face-attribute 'web-mode-html-attr-value-face nil :foreground "Orange4")
|
|
||||||
(set-face-attribute 'web-mode-html-attr-name-face nil :foreground "Yellow4"))
|
|
||||||
#+end_src
|
|
||||||
Now for indent shit, so it matches the tabsize
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq css-indent-offset 5)
|
(setq css-indent-offset 5)
|
||||||
(setq sgml-basic-offset 5)
|
(setq sgml-basic-offset 5)
|
||||||
|
@ -324,7 +333,7 @@ Now for indent shit, so it matches the tabsize
|
||||||
(setq org-export-with-smart-quotes t)
|
(setq org-export-with-smart-quotes t)
|
||||||
(setq org-src-window-setup 'current-window)
|
(setq org-src-window-setup 'current-window)
|
||||||
(add-hook 'org-mode-hook 'org-indent-mode)
|
(add-hook 'org-mode-hook 'org-indent-mode)
|
||||||
(add-hook 'org-mode-hook 'no-lines)
|
(add-hook 'org-mode-hook 'qorg/no-lines)
|
||||||
;; Syntax highlighting in exports
|
;; Syntax highlighting in exports
|
||||||
(use-package htmlize
|
(use-package htmlize
|
||||||
:ensure t)
|
:ensure t)
|
||||||
|
@ -334,25 +343,16 @@ Now for indent shit, so it matches the tabsize
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq org-agenda-files (quote ("~/Documentos/agenda.org")))
|
(setq org-agenda-files (quote ("~/Documentos/agenda.org")))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Extra functions
|
** Keybindings
|
||||||
Here I put functions I won't bother to document because they're so
|
Here I put functions I won't bother to document because they're so
|
||||||
simple.
|
simple.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun git-pushall ()
|
|
||||||
(interactive)
|
|
||||||
(shell-command "git pushall"))
|
|
||||||
(defun no-lines()
|
|
||||||
(display-line-numbers-mode -1))
|
|
||||||
(defun kill-inner-word ()
|
|
||||||
(interactive)
|
|
||||||
(forward-char 1)
|
|
||||||
(backward-word)
|
|
||||||
(kill-word 1))
|
|
||||||
(global-set-key (kbd "M-d") 'kill-inner-word)
|
(global-set-key (kbd "M-d") 'kill-inner-word)
|
||||||
(global-set-key (kbd "M-.") 'repeat)
|
(global-set-key (kbd "M-.") 'repeat)
|
||||||
(global-set-key (kbd "C-x k") 'kill-buffer)
|
(global-set-key (kbd "C-x k") 'kill-buffer)
|
||||||
(global-set-key (kbd "C-x C-k") 'kill-current-buffer)
|
(global-set-key (kbd "C-x C-k") 'kill-current-buffer)
|
||||||
(global-set-key (kbd "C-k") 'kill-line)
|
(global-unset-key (kbd "C-x C-b"))
|
||||||
|
(global-set-key (kbd "C-x C-b") 'qorg/goto-previous-buffer)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Hunspell
|
** Hunspell
|
||||||
For some reason, there is no ispell spanish in void linux. so i had
|
For some reason, there is no ispell spanish in void linux. so i had
|
||||||
|
@ -496,9 +496,9 @@ Le language server
|
||||||
** Workspaces
|
** Workspaces
|
||||||
I'm a tilling window manager user, so i know what i'm talking about.
|
I'm a tilling window manager user, so i know what i'm talking about.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package "workgroups"
|
; (use-package "workgroups"
|
||||||
:ensure t
|
; :ensure t
|
||||||
:init(workgroups-mode))
|
; :init(workgroups-mode 1))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Buffers
|
** Buffers
|
||||||
Well, you know sometimes you just want to change to the previous
|
Well, you know sometimes you just want to change to the previous
|
||||||
|
@ -535,6 +535,7 @@ thankfully there's this thing.
|
||||||
:config
|
:config
|
||||||
(use-package "yasnippet-snippets"
|
(use-package "yasnippet-snippets"
|
||||||
:ensure t)
|
:ensure t)
|
||||||
|
:init(yas-global-mode)
|
||||||
(yas-reload-all))
|
(yas-reload-all))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Org-mode customization
|
** Org-mode customization
|
||||||
|
@ -572,6 +573,122 @@ Better \*help\* buffer
|
||||||
:bind ("C-h k". #'helpful-key))
|
:bind ("C-h k". #'helpful-key))
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
** Treemacs
|
||||||
|
Le ebin sidebar
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package treemacs
|
||||||
|
:ensure t
|
||||||
|
:defer t
|
||||||
|
:init
|
||||||
|
(with-eval-after-load 'winum
|
||||||
|
(define-key winum-keymap (kbd "M-0") #'treemacs-select-window))
|
||||||
|
:config
|
||||||
|
(progn
|
||||||
|
(setq treemacs-collapse-dirs (if treemacs-python-executable 3 0)
|
||||||
|
treemacs-deferred-git-apply-delay 0.5
|
||||||
|
treemacs-directory-name-transformer #'identity
|
||||||
|
treemacs-display-in-side-window t
|
||||||
|
treemacs-eldoc-display 'simple
|
||||||
|
treemacs-file-event-delay 5000
|
||||||
|
treemacs-file-extension-regex treemacs-last-period-regex-value
|
||||||
|
treemacs-file-follow-delay 0.2
|
||||||
|
treemacs-file-name-transformer #'identity
|
||||||
|
treemacs-follow-after-init t
|
||||||
|
treemacs-expand-after-init t
|
||||||
|
treemacs-find-workspace-method 'find-for-file-or-pick-first
|
||||||
|
treemacs-git-command-pipe ""
|
||||||
|
treemacs-goto-tag-strategy 'refetch-index
|
||||||
|
treemacs-indentation 2
|
||||||
|
treemacs-indentation-string " "
|
||||||
|
treemacs-is-never-other-window nil
|
||||||
|
treemacs-max-git-entries 5000
|
||||||
|
(use-package treemacs-evil
|
||||||
|
:after (treemacs evil)
|
||||||
|
:ensure t)
|
||||||
|
|
||||||
|
treemacs-missing-project-action 'ask
|
||||||
|
treemacs-move-forward-on-expand nil
|
||||||
|
treemacs-no-png-images nil
|
||||||
|
treemacs-no-delete-other-windows t
|
||||||
|
treemacs-project-follow-cleanup nil
|
||||||
|
treemacs-persist-file (expand-file-name ".cache/treemacs-persist" user-emacs-directory)
|
||||||
|
treemacs-position 'left
|
||||||
|
treemacs-read-string-input 'from-child-frame
|
||||||
|
treemacs-recenter-distance 0.1
|
||||||
|
treemacs-recenter-after-file-follow nil
|
||||||
|
treemacs-recenter-after-tag-follow nil
|
||||||
|
treemacs-recenter-after-project-jump 'always
|
||||||
|
treemacs-recenter-after-project-expand 'on-distance
|
||||||
|
treemacs-litter-directories '("/node_modules" "/.venv" "/.cask")
|
||||||
|
treemacs-show-cursor nil
|
||||||
|
treemacs-show-hidden-files t
|
||||||
|
treemacs-silent-filewatch nil
|
||||||
|
treemacs-silent-refresh nil
|
||||||
|
treemacs-sorting 'alphabetic-asc
|
||||||
|
treemacs-select-when-already-in-treemacs 'move-back
|
||||||
|
treemacs-space-between-root-nodes t
|
||||||
|
treemacs-tag-follow-cleanup t
|
||||||
|
treemacs-tag-follow-delay 1.5
|
||||||
|
treemacs-text-scale nil
|
||||||
|
treemacs-user-mode-line-format nil
|
||||||
|
treemacs-user-header-line-format nil
|
||||||
|
treemacs-wide-toggle-width 70
|
||||||
|
treemacs-width 35
|
||||||
|
treemacs-width-increment 1
|
||||||
|
treemacs-width-is-initially-locked t
|
||||||
|
treemacs-workspace-switch-cleanup nil)
|
||||||
|
|
||||||
|
;; The default width and height of the icons is 22 pixels. If you are
|
||||||
|
;; using a Hi-DPI display, uncomment this to double the icon size.
|
||||||
|
;;(treemacs-resize-icons 44)
|
||||||
|
|
||||||
|
(treemacs-follow-mode t)
|
||||||
|
(treemacs-filewatch-mode t)
|
||||||
|
(treemacs-fringe-indicator-mode 'always)
|
||||||
|
|
||||||
|
(pcase (cons (not (null (executable-find "git")))
|
||||||
|
(not (null treemacs-python-executable)))
|
||||||
|
(`(t . t)
|
||||||
|
(treemacs-git-mode 'deferred))
|
||||||
|
(`(t . _)
|
||||||
|
(treemacs-git-mode 'simple)))
|
||||||
|
|
||||||
|
(treemacs-hide-gitignored-files-mode nil))
|
||||||
|
:bind
|
||||||
|
(:map global-map
|
||||||
|
("M-0" . treemacs-select-window)
|
||||||
|
("C-x t 1" . treemacs-delete-other-windows)
|
||||||
|
("C-x t t" . treemacs)
|
||||||
|
("C-x t d" . treemacs-select-directory)
|
||||||
|
("C-x t B" . treemacs-bookmark)
|
||||||
|
("C-x t C-t" . treemacs-find-file)
|
||||||
|
("C-x t M-t" . treemacs-find-tag)))
|
||||||
|
|
||||||
|
(use-package treemacs-projectile
|
||||||
|
:after (treemacs projectile)
|
||||||
|
:ensure t)
|
||||||
|
|
||||||
|
(use-package treemacs-icons-dired
|
||||||
|
:hook (dired-mode . treemacs-icons-dired-enable-once)
|
||||||
|
:ensure t)
|
||||||
|
|
||||||
|
(use-package treemacs-magit
|
||||||
|
:after (treemacs magit)
|
||||||
|
:ensure t)
|
||||||
|
|
||||||
|
(use-package treemacs-tab-bar ;;treemacs-tab-bar if you use tab-bar-mode
|
||||||
|
:after (treemacs)
|
||||||
|
:ensure t
|
||||||
|
:config (treemacs-set-scope-type 'Tabs))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
** Projectile
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package projectile
|
||||||
|
:ensure t
|
||||||
|
:init(projectile-mode))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Helm
|
* Helm
|
||||||
fuck Ido lol
|
fuck Ido lol
|
||||||
|
@ -625,13 +742,7 @@ Here is an useful function I wrote so you can go to the dashboard (Or
|
||||||
create it in case you accidentally killed the buffer)
|
create it in case you accidentally killed the buffer)
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun goto-dashboard ()
|
(global-set-key (kbd "C-c C-d") 'qorg/goto-dashboard)
|
||||||
(interactive)
|
|
||||||
(switch-to-buffer "*dashboard*")
|
|
||||||
;; In case it doesn't exist.
|
|
||||||
(dashboard-mode))
|
|
||||||
|
|
||||||
(global-set-key (kbd "C-c C-d") 'goto-dashboard)
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
|
Loading…
Add table
Reference in a new issue