From 36d4c9eb9ce82bbfb3564cb4deb7c951f42c1d5a Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Fri, 13 Jan 2023 00:04:53 +0000
Subject: [PATCH] Added Language tool for writing, fixed plantuml and enabled matlab
---
config.org | 123 +++++++++++++++++++++-------------------
1 files changed, 64 insertions(+), 59 deletions(-)
diff --git a/config.org b/config.org
index 256d756..4354593 100644
--- a/config.org
+++ b/config.org
@@ -22,48 +22,36 @@
Theme switcher, using a cond allows loading of many preconfigured themes which can be switched between easily.
Zenburn theme is my default.
#+BEGIN_SRC emacs-lisp
- (setq emacs-theme 'zenburn)
-
(defun disable-all-themes ()
(dolist (i custom-enabled-themes)
(disable-theme i)))
- (cond ((eq emacs-theme 'zenburn)
- (use-package zenburn-theme
- :init
- (disable-all-themes)
- :config
- (load-theme 'zenburn t)))
- ((eq emacs-theme 'doom-one)
- (use-package doom-themes
- :init
- (disable-all-themes)
- :config
- (setq doom-themes-enable-bolt t
- doom-themes-enable-italic t)
- (load-theme 'doom-one t)
- (doom-themes-visual-bell-config)
- (doom-themes-org-config)))
- ((eq emacs-theme 'nord)
- (use-package nord-theme
- :init
- (disable-all-themes)
- :config
- (load-theme 'nord t)))
- ((eq emacs-theme 'solarized)
- (use-package solarized-theme
- :init
- (disable-all-themes)
- :config
- (load-theme 'solarized-dark t)))
- ((eq emacs-theme 'jetbrains-darcula)
- (use-package jetbrains-darcula-theme
- :init
- (disable-all-themes)
- :config
- (load-theme 'jetbrains-darcula t)))
- ((eq emacs-theme 'none)
- (disable-all-themes)))
+ (defun set-theme (theme)
+ "Set the theme with theme downloading"
+ (interactive "SWhat theme to load? ")
+ (cond ((eq theme 'zenburn)
+ (use-package zenburn-theme))
+ ((string-match-p "^doom" "doom-one")
+ (use-package doom-themes
+ :config
+ (setq doom-themes-enable-bolt t
+ doom-themes-enable-italic t)
+ (doom-themes-visual-bell-config)
+ (doom-themes-org-config)))
+ ((eq theme 'nord)
+ (use-package nord-theme))
+ ((eq theme 'solarized)
+ (use-package solarized-theme))
+ ((eq theme 'jetbrains-darcula)
+ (use-package jetbrains-darcula-theme))
+ ((eq theme 'none)
+ (disable-all-themes)))
+ (setq emacs-theme theme)
+ (when (not (eq theme 'none))
+ (load-theme theme t))
+ (message (format "Theme set to: %s" theme)))
+
+ (set-theme 'zenburn)
#+END_SRC
** Default font
@@ -105,14 +93,15 @@
Auto-enable in latex and org as they're the main writing modes.
#+BEGIN_SRC emacs-lisp
(use-package flyspell
- :hook (tex-mode latex-mode TeX-mode LaTeX-mode org-mode)
+ :hook ((tex-mode latex-mode TeX-mode LaTeX-mode org-mode text-mode) . flyspell-mode)
:diminish flyspell-mode
- :init (require 'ispell)
+ :init
+ (require 'ispell)
:config
(setq-default ispell-program-name "aspell")
(setq-default ispell-local-dictionary "en_AU"))
#+END_SRC
-** COMMENT Language Tool
+** Language Tool
Language tool is an open source grammar checker.
#+BEGIN_SRC emacs-lisp
(use-package langtool
@@ -168,13 +157,13 @@
** Helm core
Helm aids the user interface for emacs. Adds visual and auto-complete feedback for emacs commands.
#+BEGIN_SRC emacs-lisp
- (use-package helm-config
- :ensure helm
+ (use-package helm
:bind (("M-x" . helm-M-x)
("C-x C-f" . helm-find-files)
("M-y" . helm-show-kill-ring)
("C-x b" . helm-mini)
("C-c h o" . helm-occur))
+ :diminish helm-mode
:config
(setq helm-mode-fuzzy-match t
helm-completion-in-regionfuzzy-match t
@@ -725,7 +714,6 @@
(require 'spaceline-config)
(setq spaceline-buffer-encoding-abbrev-p t)
(setq spaceline-line-column-p t)
- (setq spaceline-line-p t)
(setq powerline-default-separator (quote arrow))
(spaceline-spacemacs-theme)
(spaceline-helm-mode))
@@ -962,6 +950,18 @@
("M-RET" . 'srefactor-refactor-at-point)))
#+END_SRC
+** Tree sitter
+Parser library.
+Provides better syntax highlighting and some other neat features.
+#+BEGIN_SRC emacs-lisp
+ (use-package tree-sitter
+ :diminish t)
+ (use-package tree-sitter-langs
+ :config
+ (global-tree-sitter-mode)
+ (add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))
+#+END_SRC
+
** Language specific configs
*** C/C++
**** Flycheck
@@ -1029,15 +1029,19 @@
(setq-local clang-format-style nil)
(setq-local clang-format-style (concat "{BasedOnStyle: LLVM,"
"IndentWidth: " (format "%s" tab-width) ","
+ "TabWidth: " (format "%s" tab-width) ","
"UseTab: " (if (eq indent-tabs-mode nil)
"Never"
"AlignWithSpaces")
","
"BreakBeforeBraces: Linux,"
"AllowShortIfStatementsOnASingleLine: false,"
- "IndentCaseLabels: false}"))))
+ "PointerAlignment: Left,"
+ "IndentCaseBlocks: true,"
+ "IndentCaseLabels: false,"
+ "SortUsingDeclarations: true}"))))
(add-hook 'c-mode-common-hook 'set-clang-format-style)
-
+
(use-package clang-format)
;; (defun clang-format-on-save ()
@@ -1155,11 +1159,11 @@
(cond ((eq system-type 'windows-nt)
(when (file-exists-p "c:/ProgramData/chocolatey/lib/plantuml/tools/plantuml.jar")
(setq plantuml-jar-path "c:/ProgramData/chocolatey/lib/plantuml/tools/plantuml.jar")
- (setq planuml-default-exec-mode 'jar)))
+ (setq plantuml-default-exec-mode 'jar)))
((eq system-type 'gnu/linux)
(when (file-exists-p "/usr/share/java/plantuml/plantuml.jar")
(setq plantuml-jar-path "/usr/share/java/plantuml/plantuml.jar")
- (setq planuml-default-exec-mode 'jar)))))
+ (setq plantuml-default-exec-mode 'jar)))))
#+END_SRC
*** COMMENT Racket
@@ -1209,19 +1213,20 @@
verilog-indent-level-module 4))
#+END_SRC
#+END_SRC
-*** COMMENT MATLAB
+*** MATLAB
Mode for editing MATLAB m-files.
#+BEGIN_SRC emacs-lisp
- (use-package matlab
- :ensure matlab-mode
- :config
- (autoload 'matlab-mode "matlab" "Matlab Editing Mode" t)
- (add-to-list
- 'auto-mode-alist
- '("\\.m$" . matlab-mode))
- (setq matlab-indent-function t)
- (setq matlab-shell-command "matlab")
- (matlab-cedet-setup))
+ (use-package matlab
+ :ensure matlab-mode
+ :config
+ (autoload 'matlab-mode "matlab" "Matlab Editing Mode" t)
+ (add-to-list
+ 'auto-mode-alist
+ '("\\.m$" . matlab-mode))
+ (setq matlab-indent-function t)
+ (setq matlab-shell-command "matlab")
+ (matlab-cedet-setup)
+ (add-to-list 'company-backends 'company-matlab-shell))
#+END_SRC
*** COMMENT MIPS
--
Gitblit v1.10.0