| | |
| | | (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
|
| | |
| | | ("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
|
| | |
| | | (global-set-key (kbd "C-c e i") 'init-visit)
|
| | | #+END_SRC
|
| | |
|
| | | *** Go to early-init.el
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (defun early-init-visit ()
|
| | | (interactive)
|
| | | (find-file "~/.emacs.d/early-init.el"))
|
| | | (global-set-key (kbd "C-c e e") 'early-init-visit)
|
| | | #+END_SRC
|
| | |
|
| | | *** Reload configuration
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (defun config-reload ()
|
| | |
| | | (use-package undo-tree
|
| | | :diminish undo-tree-mode
|
| | | :config
|
| | | (setq-default undo-tree-auto-save-history t)
|
| | | (add-to-list 'undo-tree-incompatible-major-modes 'archive-mode)
|
| | | (global-undo-tree-mode))
|
| | | #+END_SRC
|
| | |
|
| | |
| | | ** Line numbers
|
| | | Everyone needs line numbers when programming.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (add-hook 'prog-mode-hook 'linum-mode)
|
| | | (if (version<= "26.0.50" emacs-version)
|
| | | (add-hook 'prog-mode-hook 'display-line-numbers-mode)
|
| | | (add-hook 'prog-mode-hook 'linum-mode))
|
| | | #+END_SRC
|
| | |
|
| | | ** Garbage collection
|
| | |
| | | (setq read-process-output-max (* 1024 1024))
|
| | | (setq lsp-completion-provider :capf)
|
| | | (setq lsp-keep-workspace-alive 'nil)
|
| | | (add-to-list 'exec-path "~/.cargo/bin"))
|
| | | (add-to-list 'exec-path "~/.cargo/bin")
|
| | | (add-to-list 'exec-path "~/.local/bin"))
|
| | |
|
| | | (use-package lsp-ui
|
| | | :commands lsp-ui-mode)
|
| | |
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package tex
|
| | | :ensure auctex
|
| | | :straight auctex
|
| | | :config
|
| | | (setq TeX-auto-save t
|
| | | TeX-parse-self t
|
| | |
| | | (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
|
| | |
| | | verilog-indent-level-directive 4
|
| | | verilog-indent-level-module 4))
|
| | | #+END_SRC
|
| | | **** FPGA
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package fpga
|
| | | :init
|
| | | (setq fpga-feature-list '(xilinx)))
|
| | | #+END_SRC
|
| | | *** COMMENT MATLAB
|
| | | **** Run and test
|
| | | Run the open buffer and display the output in a new buffer.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (defun run-verilator ()
|
| | | (interactive)
|
| | | (save-buffer)
|
| | | (if (not (eq (shell-command (concat "verilator --binary -j 0 " (buffer-file-name)) "*verilator output*") 0))
|
| | | (display-buffer "*verilator output*" 'display-buffer-reuse-window)
|
| | | (shell-command (concat (file-name-directory (buffer-file-name))
|
| | | '"obj_dir/V"
|
| | | (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))
|
| | | "*test output*")
|
| | | (display-buffer "*test output*" 'display-buffer-reuse-window))
|
| | | t)
|
| | | (define-key verilog-mode-map (kbd "C-c c") 'run-verilator)
|
| | | #+END_SRC
|
| | | *** MATLAB
|
| | | Mode for editing MATLAB m-files.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package matlab
|
| | | :ensure matlab-mode
|
| | | :straight matlab-mode
|
| | | :config
|
| | | (autoload 'matlab-mode "matlab" "Matlab Editing Mode" t)
|
| | | (add-to-list
|
| | |
| | | '("\\.m$" . matlab-mode))
|
| | | (setq matlab-indent-function t)
|
| | | (setq matlab-shell-command "matlab")
|
| | | (matlab-cedet-setup))
|
| | | (matlab-cedet-setup)
|
| | | (add-to-list 'company-backends 'company-matlab-shell))
|
| | | #+END_SRC
|
| | |
|
| | | *** COMMENT MIPS
|
| | |
| | | (add-to-list 'lsp-enabled-clients 'jedi))
|
| | | #+END_SRC
|
| | | * Org mode
|
| | | ** Up to date org
|
| | | Pull the latest org mode from the repository, rather than the org which comes with emacs.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package org
|
| | | :ensure org-contrib)
|
| | | #+END_SRC
|
| | |
|
| | | ** Small tweaks
|
| | | Small quality of life changes to org-mode.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | |
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package emms-setup
|
| | | :ensure emms
|
| | | :straight emms
|
| | | :init
|
| | | (add-to-list 'load-path "~/elisp/emms/")
|
| | | :config
|