@@ 1,6 1,7 @@
(setq user-full-name "Adrian Eichelbaum"
- user-mail-address "ad.eichelbaum@gmail.com")
+ user-mail-address "adrsrv@protonmail.com")
+(setq inhibit-splash-screen t)
(setq initial-scratch-message ";; Welcome back, Zeno")
(scroll-bar-mode -1) ; Disable visible scrollbar
@@ 37,8 38,8 @@
(substitute-key-definition 'kill-buffer 'kill-buffer-and-window global-map)
-(setq split-height-threshold nil)
-(setq split-width-threshold 0)
+;;(setq split-height-threshold nil)
+;;(setq split-width-threshold 0)
(setq org-publish-project-alist
'(("zenopage" ;; my blog project (just a name)
@@ 63,16 64,6 @@
(global-set-key (kbd "C-c n") #'new-buffer-new-window)
-(use-package rust-mode
-)
-
-(add-hook 'rust-mode-hook
- (lambda () (setq indent-tabs-mode nil)))
-
-(setq rust-format-on-save t)
-
-(define-key rust-mode-map (kbd "C-c C-c") 'rust-run)
-
(require 'package)
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
@@ 86,7 77,7 @@
(require 'use-package)
(setq use-package-always-ensure t)
-(require 'splash-screen)
+;;(require 'splash-screen)
(setq calendar-location-name "Leizpig, DE")
(setq calendar-latitude 51.33)
@@ 119,8 110,8 @@
(doom-modeline-minor-modes 1))
)
-(use-package rainbow-delimiters
- :hook (prog-mode . rainbow-delimiters-mode))
+(use-package rainbow-delimiters)
+(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)
(use-package markdown-mode
:mode (("README\\.md\\'" . gfm-mode)
@@ 134,6 125,7 @@
("C-c l" . 'org-store-link)
("C-c a" . 'org-agenda)
("C-c c" . 'org-capture)
+ ("M-SPC" . 'org-insert-item)
)
)
@@ 203,3 195,36 @@
(use-package elpher
)
(add-hook 'elpher-mode-hook (lambda () (display-line-numbers-mode 0)))
+
+(use-package hl-todo
+:hook (csharp-mode . hl-todo-mode)
+:hook (rust-mode . hl-todo-mode)
+:hook (org-mode . hl-todo-mode))
+(add-hook 'prog-mode-hook 'hl-todo-mode)
+
+(setq hl-todo-keyword-faces
+ '(("TODO" . "#ffd000")
+ ("FIXME" . "#FF0000")
+ ("NOTE" . "#15ff00")))
+
+(use-package rust-mode
+)
+
+(add-hook 'prog-mode-hook #'electric-pair-local-mode)
+
+(add-hook 'rust-mode-hook
+ (lambda () (setq indent-tabs-mode nil)))
+
+(setq rust-format-on-save t)
+
+(define-key rust-mode-map (kbd "C-c C-c") 'rust-run)
+
+;;(add-hook 'csharp-mode-hook (lambda () (hl-todo-mode)))
+
+(use-package tree-sitter)
+(use-package tree-sitter-langs)
+
+(use-package csharp-mode
+ :config
+ (add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-tree-sitter-mode))
+ )
@@ 7,13 7,14 @@
#+begin_src emacs-lisp
(setq user-full-name "Adrian Eichelbaum"
- user-mail-address "ad.eichelbaum@gmail.com")
+ user-mail-address "adrsrv@protonmail.com")
#+end_src
* UI Customization
Sets a custom scratch-buffer message and disables some UI elements to make emacs more minimal in appearance
#+BEGIN_SRC emacs-lisp
+(setq inhibit-splash-screen t)
(setq initial-scratch-message ";; Welcome back, Zeno")
(scroll-bar-mode -1) ; Disable visible scrollbar
@@ 53,6 54,29 @@ Show line numbers, highlight current line
(load-theme 'doom-horizon t)
#+END_SRC
+* Package setup
+Prepare the repos and other stuff
+
+#+begin_src emacs-lisp
+(require 'package)
+
+(setq package-archives '(("melpa" . "https://melpa.org/packages/")
+ ("org" . "https://orgmode.org/elpa/")
+ ("elpa" . "https://elpa.gnu.org/packages/")))
+
+(package-initialize)
+(unless package-archive-contents
+ (package-refresh-contents))
+#+end_src
+* Use-package
+A more easy and usefull way of managing packages, everyhting which belongs together is in one place and can be installed automatically
+
+#+begin_src emacs-lisp
+(require 'use-package)
+(setq use-package-always-ensure t)
+#+end_src
+
+The =use-package-always-ensure t= enables auto install
* Folder Setup
Adds the custom folder to the load-path. This is where custom emacs addons are stored, if not installed with the package manager.
@@ 78,7 102,7 @@ Changes the location where backupfiles and autosave files are stored, so they do
#+END_SRC
* QOL Changes
-** Delete the selected region, when typing over it, like on expects
+** Delete the selected region, when typing over it, like one expects
#+BEGIN_SRC emacs-lisp
(delete-selection-mode t)
@@ 97,11 121,10 @@ Changes the location where backupfiles and autosave files are stored, so they do
#+END_SRC
** Split buffers vertically
-
-#+BEGIN_SRC emacs-lisp
-(setq split-height-threshold nil)
-(setq split-width-threshold 0)
-#+END_SRC
+ #+BEGIN_SRC emacs-lisp
+ ;;(setq split-height-threshold nil)
+ ;;(setq split-width-threshold 0)
+ #+END_SRC
* Publishing to Jekyll with org-mode
I publish my blog using Jekyll and I want to be able to publish using EMACS's org-mode
@@ 134,85 157,11 @@ creates a function, which creates a new bufer in a new frame and assign it to =C
(global-set-key (kbd "C-c n") #'new-buffer-new-window)
#+end_src
-* Rust Environment
-** Rust Major Mode
-#+begin_src emacs-lisp
-(use-package rust-mode
-)
-#+end_src
-
-** Spaces rather than tabs to indent
-Rust uses spaces to indent, rather than tabs, so we disable the use of tabs for indentation
-
-#+begin_src emacs-lisp
-(add-hook 'rust-mode-hook
- (lambda () (setq indent-tabs-mode nil)))
-#+end_src
-
-** Code formatting on save
-The =rust-format-buffer= function will format your code with =rustfmt= if installed. By default, this is bound to =C-c C-f=.
-The variable =rust-format-on-save= enables automatic formatting on save.
-
-#+begin_src emacs-lisp
-(setq rust-format-on-save t)
-#+end_src
-
-** Running / testing / compiling code
-The =rust-run=, =rust-test=, =rust-compile= and =rust-check= functions shell out to Cargo to run, test, build and check your code. Under the hood, these use the standard Emacs compile function.
-
-These are not bound by default. To bind these to keyboard shortcuts, you can use the following in your init.el:
-
-#+begin_src emacs-lisp
-(define-key rust-mode-map (kbd "C-c C-c") 'rust-run)
-#+end_src
-
* Packages
-** Package setup
-Prepare the repos and other stuff
-
-#+begin_src emacs-lisp
-(require 'package)
-
-(setq package-archives '(("melpa" . "https://melpa.org/packages/")
- ("org" . "https://orgmode.org/elpa/")
- ("elpa" . "https://elpa.gnu.org/packages/")))
-
-(package-initialize)
-(unless package-archive-contents
- (package-refresh-contents))
-#+end_src
-
-** Use-package
-A more easy and usefull way of managing packages, everyhting which belongs together is in one place and can be installed automatically
-
-#+begin_src emacs-lisp
-(require 'use-package)
-(setq use-package-always-ensure t)
-#+end_src
-
-The =use-package-always-ensure t= enables auto install
-
** Custom splash-screen
#+begin_src emacs-lisp
-(require 'splash-screen)
-#+end_src
-
-** Change theme based on time
-
-Set your location, to get sunrise and sunset
-
-#+begin_src emacs-lisp
-(setq calendar-location-name "Leizpig, DE")
-(setq calendar-latitude 51.33)
-(setq calendar-longitude 12.37)
-#+end_src
-
-Load the package and set the theme based on time. The first argument is day, the second the theme night.
-
-#+begin_src emacs-lisp
-(require 'theme-changer)
-(change-theme 'doom-horizon 'doom-horizon)
+;;(require 'splash-screen)
#+end_src
** Move buffers around
@@ 230,6 179,10 @@ Install package through use-package and define keybindings in the =:bind=-sectio
)
#+end_src
+** All-the-icons
+ #+begin_src emacs-lisp
+ (use-package all-the-icons)
+ #+end_src
** Doom-themes
Install using use-package. In the =:config=-part you can define config options for the package.
@@ 261,13 214,13 @@ Change the modeline to the one of doom emacs, because I think it is more beautif
** Rainbow-delimiters
-Changes paranthesis to dfferent colors, corosponding paranthesis have the same color.
-It is enabled in every =prog-mode=, which means, it is activated in every mode, which is classified as a programming mode
+ Changes paranthesis to dfferent colors, corosponding paranthesis have the same color.
+ It is enabled in every =prog-mode=, which means, it is activated in every mode, which is classified as a programming mode
-#+begin_src emacs-lisp
-(use-package rainbow-delimiters
- :hook (prog-mode . rainbow-delimiters-mode))
-#+end_src
+ #+begin_src emacs-lisp
+ (use-package rainbow-delimiters)
+ (add-hook 'prog-mode-hook #'rainbow-delimiters-mode)
+ #+end_src
** Markdown
@@ 298,18 251,18 @@ Activate the package on certain file extensions. If configs are to be added, jus
("C-c l" . 'org-store-link)
("C-c a" . 'org-agenda)
("C-c c" . 'org-capture)
+ ("M-SPC" . 'org-insert-item)
)
)
#+end_src
*** Org-bullets
+ Change the headline bullet points to icons, is pretty
-Change the headline bullet points to icons, is pretty
-
-#+begin_src emacs-lisp
-(use-package org-bullets)
-(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
-#+end_src
+ #+begin_src emacs-lisp
+ (use-package org-bullets)
+ (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
+ #+end_src
*** Ox-pandoc
@@ 426,3 379,78 @@ A gemeni/gopher client
)
(add-hook 'elpher-mode-hook (lambda () (display-line-numbers-mode 0)))
#+end_src
+** hl-todo
+ Highlights keywords like todo, fixme, ...
+ #+begin_src emacs-lisp
+ (use-package hl-todo
+ :hook (csharp-mode . hl-todo-mode)
+ :hook (rust-mode . hl-todo-mode)
+ :hook (org-mode . hl-todo-mode))
+ (add-hook 'prog-mode-hook 'hl-todo-mode)
+ #+end_src
+
+ To set the keywords to highlight, aswell as the color add them to this list
+ #+begin_src emacs-lisp
+ (setq hl-todo-keyword-faces
+ '(("TODO" . "#ffd000")
+ ("FIXME" . "#FF0000")
+ ("NOTE" . "#15ff00")))
+ #+end_src
+* Rust Environment
+** Rust Major Mode
+#+begin_src emacs-lisp
+(use-package rust-mode
+)
+#+end_src
+
+** Electric-pair mode
+ Mode to automatically close delimiters like parenthesis
+ #+begin_src emacs-lisp
+ (add-hook 'prog-mode-hook #'electric-pair-local-mode)
+ #+end_src
+
+** Spaces rather than tabs to indent
+Rust uses spaces to indent, rather than tabs, so we disable the use of tabs for indentation
+
+#+begin_src emacs-lisp
+(add-hook 'rust-mode-hook
+ (lambda () (setq indent-tabs-mode nil)))
+#+end_src
+
+** Code formatting on save
+The =rust-format-buffer= function will format your code with =rustfmt= if installed. By default, this is bound to =C-c C-f=.
+The variable =rust-format-on-save= enables automatic formatting on save.
+
+#+begin_src emacs-lisp
+(setq rust-format-on-save t)
+#+end_src
+
+** Running / testing / compiling code
+The =rust-run=, =rust-test=, =rust-compile= and =rust-check= functions shell out to Cargo to run, test, build and check your code. Under the hood, these use the standard Emacs compile function.
+
+These are not bound by default. To bind these to keyboard shortcuts, you can use the following in your init.el:
+
+#+begin_src emacs-lisp
+(define-key rust-mode-map (kbd "C-c C-c") 'rust-run)
+#+end_src
+
+** hl-todo Mode
+ #+begin_src emacs-lisp
+ ;;(add-hook 'csharp-mode-hook (lambda () (hl-todo-mode)))
+ #+end_src
+* C# Environment
+** tree-sitter support
+ For indentation and highlighting
+ #+begin_src emacs-lisp
+ (use-package tree-sitter)
+ (use-package tree-sitter-langs)
+ #+end_src
+
+** C#-mode
+ Mode for editing C# in emacs
+ #+begin_src emacs-lisp
+ (use-package csharp-mode
+ :config
+ (add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-tree-sitter-mode))
+ )
+ #+end_src