171 lines
7.8 KiB
EmacsLisp
171 lines
7.8 KiB
EmacsLisp
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
|
|
|
;; Place your private configuration here! Remember, you do not need to run 'doom
|
|
;; sync' after modifying this file!
|
|
|
|
|
|
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
|
;; clients, file templates and snippets. It is optional.
|
|
(setq user-full-name "Marc Marcos"
|
|
user-mail-address "marcmarcosmadruga@gmail.com")
|
|
|
|
;; Doom exposes five (optional) variables for controlling fonts in Doom:
|
|
;;
|
|
;; - `doom-font' -- the primary font to use
|
|
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
|
|
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
|
|
;; presentations or streaming.
|
|
;; - `doom-symbol-font' -- for symbols
|
|
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
|
|
;;
|
|
;; See 'C-h v doom-font' for documentation and more examples of what they
|
|
;; accept. For example:
|
|
;;
|
|
;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
|
|
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
|
|
;;
|
|
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
|
|
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
|
|
;; refresh your font settings. If Emacs still can't find your font, it likely
|
|
;; wasn't installed correctly. Font issues are rarely Doom issues!
|
|
|
|
;; There are two ways to load a theme. Both assume the theme is installed and
|
|
;; available. You can either set `doom-theme' or manually load a theme with the
|
|
;; `load-theme' function. This is the default:
|
|
|
|
;; Use Mono for the main editor
|
|
(setq doom-font (font-spec :family "Hack Nerd Font Mono" :size 16))
|
|
|
|
;; Force Mono even for "variable pitch" sections (prose, UI elements)
|
|
(setq doom-variable-pitch-font (font-spec :family "Hack Nerd Font Mono" :size 16))
|
|
|
|
;; Optional: Use Mono for your big headers/titles too
|
|
(setq doom-big-font (font-spec :family "Hack Nerd Font Mono" :size 20))
|
|
|
|
(setq doom-theme 'doom-gruvbox)
|
|
|
|
;; This determines the style of line numbers in effect. If set to `nil', line
|
|
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
|
(setq display-line-numbers-type t)
|
|
|
|
|
|
|
|
;; Whenever you reconfigure a package, make sure to wrap your config in an
|
|
;; `with-eval-after-load' block, otherwise Doom's defaults may override your
|
|
;; settings. E.g.
|
|
;;
|
|
;; (with-eval-after-load 'PACKAGE
|
|
;; (setq x y))
|
|
;;
|
|
;; The exceptions to this rule:
|
|
;;
|
|
;; - Setting file/directory variables (like `org-directory')
|
|
;; - Setting variables which explicitly tell you to set them before their
|
|
;; package is loaded (see 'C-h v VARIABLE' to look them up).
|
|
;; - Setting doom variables (which start with 'doom-' or '+').
|
|
;;
|
|
;; Here are some additional functions/macros that will help you configure Doom.
|
|
;;
|
|
;; - `load!' for loading external *.el files relative to this one
|
|
;; - `add-load-path!' for adding directories to the `load-path', relative to
|
|
;; this file. Emacs searches the `load-path' when you load packages with
|
|
;; `require' or `use-package'.
|
|
;; - `map!' for binding new keys
|
|
;;
|
|
;; To get information about any of these functions/macros, move the cursor over
|
|
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
|
|
;; This will open documentation for it, including demos of how they are used.
|
|
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
|
|
;; etc).
|
|
;;
|
|
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
|
;; they are implemented.
|
|
|
|
(setq org-directory "~/Nextcloud/doom-vault/") ; The root of your org files
|
|
(setq org-agenda-files '("~/Nextcloud/doom-vault/")) ; Scans all .org files in this folder
|
|
|
|
(defun my-hover-banner ()
|
|
(let* ((banner '(
|
|
" ░▒▓██████████████▓▒░ ░▒▓██████▓▒░░▒▓███████▓▒░ ░▒▓██████▓▒░ "
|
|
" ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ "
|
|
" ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ "
|
|
" ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░▒▓███████▓▒░░▒▓█▓▒░ "
|
|
" ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ "
|
|
" ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓██▓▒░ "
|
|
" ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓██████▓▒░░▒▓██▓▒░ "
|
|
""
|
|
""
|
|
)))
|
|
(dolist (line banner)
|
|
(insert (propertize line 'face 'doom-dashboard-banner) "\n"))))
|
|
|
|
(setq +doom-dashboard-ascii-banner-fn #'my-hover-banner)
|
|
|
|
(setq display-line-numbers-type 'relative)
|
|
|
|
;; Ensure Emacs finds your local binaries (Verible, Scala-cli)
|
|
(add-to-list 'exec-path "~/.local/bin")
|
|
(setenv "PATH" (concat (getenv "PATH") ":/home/" (user-login-name) "/.local/bin"))
|
|
|
|
;; --- Verilog / SystemVerilog ---
|
|
(after! verilog-mode
|
|
;; Indentation
|
|
(setq verilog-indent-level 4
|
|
verilog-indent-level-module 4
|
|
verilog-indent-level-declaration 4
|
|
verilog-indent-level-directive 4
|
|
verilog-case-indent 4
|
|
verilog-cexp-indent 4
|
|
verilog-auto-newline nil)
|
|
|
|
;; verilog-ext: enhanced SystemVerilog support (tree-sitter, navigation, highlighting)
|
|
(when (featurep 'verilog-ext)
|
|
(verilog-ext-mode-setup))
|
|
|
|
;; flycheck-verilator: custom checker for Verilator linting
|
|
(when (featurep 'flycheck)
|
|
(flycheck-define-checker verilog-verilator
|
|
"A Verilog/SystemVerilog syntax checker using Verilator."
|
|
:command ("verilator" "--lint-only" "-Wall" "-Wno-DECLFILENAME"
|
|
"--language" "1800-2017" source-original)
|
|
:error-patterns
|
|
((error line-start "%Error" (optional "-" (one-or-more (any alpha ?_)))
|
|
": " (file-name) ":" line ":" column ": " (message) line-end)
|
|
(warning line-start "%Warning" (optional "-" (one-or-more (any alpha ?_)))
|
|
": " (file-name) ":" line ":" column ": " (message) line-end))
|
|
:modes (verilog-mode verilog-ts-mode))
|
|
(add-to-list 'flycheck-checkers 'verilog-verilator t))
|
|
|
|
;; Verilator compile command for quick syntax/lint checks (M-x compile)
|
|
(setq compile-command "verilator --lint-only -Wall --language 1800-2017 "))
|
|
|
|
;; Global: 4 spaces, no tabs
|
|
(setq-default tab-width 4
|
|
indent-tabs-mode nil)
|
|
|
|
;; --- Chisel / Scala ---
|
|
(after! scala-mode
|
|
;; Set indentation to 2 spaces (standardrfor Chisel)
|
|
(setq scala-indent:step 2))
|
|
|
|
|
|
(after! lsp-metals
|
|
(setq lsp-metals-server-args '("-J-Dmetals.http=on-Dmetals.at-least-java-21=true")
|
|
lsp-metals-enable-http t))
|
|
|
|
;; Verible LSP: Eglot picks it up automatically from PATH.
|
|
;; The default Doom Eglot config registers verible-verilog-ls for verilog-mode.
|
|
;; No extra config needed — just ensure verible-verilog-ls is on PATH.
|
|
|
|
(map! :leader
|
|
(:prefix ("o" . "open")
|
|
:desc "Open agenda file" "a" (lambda () (interactive) (find-file "~/Nextcloud/doom-vault/agenda.org"))))
|
|
|
|
(after! ispell
|
|
(setq ispell-program-name "hunspell")
|
|
;; List the dictionaries you want to use, separated by commas
|
|
;; Note: The names must match the files in your system (e.g., en_US, es_ES, ca)
|
|
(let ((langs "en_US,es_ES,ca_ES"))
|
|
(setq ispell-dictionary langs)
|
|
(ispell-set-spellchecker-params)
|
|
(ispell-hunspell-add-multi-dic langs)))
|