commit ab9b1a7124a6c89264c9dd6761ba76ad3f8a01eb
parent 7889a7740f78550d8f9c799d3b86bbfa6eeac5eb
Author: Michael Neuper <73108749+michaelneuper@users.noreply.github.com>
Date: Sun, 21 May 2023 20:37:53 +0200
Fix doom and emacs config
Diffstat:
5 files changed, 84 insertions(+), 64 deletions(-)
diff --git a/.config/doom/config.el b/.config/doom/config.el
@@ -1,4 +1,4 @@
-;; __ __ _ _
+;; __ __ _ _
;; | \/ | \ | |
;; | \ / | \| | Michael Neuper
;; | |\/| | . ` | https://michaelneuper.com
@@ -6,23 +6,9 @@
;; |_| |_|_| \_|
;;
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
-;; ; EMACS X WINDOW MANAGER
-;; (require 'exwm)
-;; (require 'exwm-config)
-;; (exwm-config-default)
-;; (require 'exwm-randr)
-;; (setq exwm-randr-workspace-output-plist '(0 "HDMI-0"))
-;; (add-hook 'exwm-randr-screen-change-hook
-;; (lambda ()
-;; (start-process-shell-command
-;; "xrandr" nil "xrandr --output HDMI-0 --mode 1920x1080 --rate 144 --pos 0x0 --rotate normal")))
-;; (exwm-randr-enable)
-;; (require 'exwm-systemtray)
-;; (exwm-systemtray-enable)
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. It is optional.
@@ -60,7 +46,7 @@
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-one)
-;; Custom banner
+;; Doom banner
(setq fancy-splash-image "~/.config/doom/doom-banners/splashes/emacs/emacs-e-logo.png")
;; This determines the style of line numbers in effect. If set to `nil', line
@@ -69,7 +55,7 @@
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
-(setq org-directory "~/Documents/Org/")
+(setq org-directory "~/Documents/org")
;; Whenever you reconfigure a package, make sure to wrap your config in an
@@ -106,13 +92,12 @@
;; ; LATEX
(require 'org)
-(setq org-latex-create-formula-image-program 'dvipng)
(add-to-list 'org-latex-packages-alist '("" "amsmath" t))
(add-to-list 'org-latex-packages-alist '("" "amssymb" t))
(setq org-preview-latex-default-process 'dvipng)
-;; ; ORG ROAM
+;; ORG ROAM
(setq org-roam-directory "~/RoamNotes")
(use-package! websocket
:after org-roam)
@@ -131,13 +116,13 @@
(setq org-roam-database-connector 'sqlite3)
-;; ; GNUPLOT
+;; GNUPLOT
(after! org
(org-babel-do-load-languages
'org-babel-load-languages
'((gnuplot . t))))
-;; ; COMPANY MODE
+;; COMPANY MODE
(add-hook 'after-init-hook 'global-company-mode)
;; from modules/completion/company/config.el
(use-package! company ; `use-package!' is a thin wrapper around `use-package'
@@ -152,9 +137,35 @@
company-dabbrev-ignore-case nil)
[...])
-;; ; TABNINE
-;; (add-to-list 'company-backends #'company-tabnine)
-;; ;; Trigger completion immediately.
-;; (setq company-idle-delay 0)
-;; ;; Number the candidates (use M-1, M-2 etc to select completions).
-;; (setq company-show-quick-access t)
+;; LSP MODE
+(setq lsp-enable-symbol-highlighting t)
+(setq lsp-ui-doc-enable t)
+(setq lsp-lens-enable t)
+(setq lsp-headerline-breadcrumb-enable t)
+(setq lsp-modeline-code-actions-enable t)
+(setq lsp-diagnostics-provider :flycheck)
+(setq lsp-ui-sideline-enable t)
+(setq lsp-completion-show-detail t)
+(setq lsp-completion-show-kind t)
+
+
+;; JAVA
+(after! lsp-mode (require 'lsp-java))
+;; Configure LSP Java
+(after! lsp-java
+ (add-hook 'java-mode-hook #'lsp))
+
+(setq lsp-java-format-on-type-enabled nil
+ lsp-java-format-enabled nil)
+;; Set path to the language server executable
+(set-lsp-priority! 'eclipse-jdt .80)
+(setq lsp-java-server-install-dir "/bin/jdtls")
+(setq lsp-java-workspace-dir "~/Projects/java")
+
+(setq ansi-color-for-compilation-mode 'filter)
+(require 'ansi-color)
+(setq org-babel-java-command "ansi-color-for-comint-mode-on && javac")
+(defun my-enable-ansi-colors ()
+ (when (eq major-mode 'compilation-mode)
+ (ansi-color-apply-on-region compilation-filter-start (point-max))))
+(add-hook 'compilation-filter-hook 'my-enable-ansi-colors)
diff --git a/.config/doom/init.el b/.config/doom/init.el
@@ -21,7 +21,8 @@
;;layout ; auie,ctsrnm is the superior home row
:completion
- (company +childframe) ; the ultimate code completion backend
+ (company
+ +childframe) ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life
@@ -32,38 +33,41 @@
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs
- (emoji ; 🙂
+ (emoji
+ +unicode
+ascii
- +github
- +unicode)
+ +github) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
indent-guides ; highlighted indent columns
- (ligatures ; ligatures and symbols to make your code pretty again
+ (ligatures
+extra
- +fira)
- minimap ; show a map of the code on the side
+ +fira) ; ligatures and symbols to make your code pretty again
+ ;; minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
nav-flash ; blink cursor line after big motions
neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
- (popup ; tame sudden yet inevitable temporary windows
- +defaults)
- ;; tabs ; a tab bar for Emacs
- ;; treemacs ; a project drawer, like neotree but cooler
+ (popup
+ +defaults) ; tame sudden yet inevitable temporary windows
+ ;;tabs ; a tab bar for Emacs
+ (treemacs
+ +lsp) ; a project drawer, like neotree but cooler
unicode ; extended unicode support for various languages
- (vc-gutter ; vcs diff in the fringe
- +pretty)
+ (vc-gutter
+ +pretty) ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
zen ; distraction-free coding or writing
:editor
- (evil +everywhere); come to the dark side, we have cookies
+ (evil
+ +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
- (format +onsave) ; automated prettiness
+ (format
+ +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
multiple-cursors ; editing in many places at once
@@ -74,25 +78,25 @@
word-wrap ; soft wrapping with language-aware indent
:emacs
- (dired ; making dired pretty [functional]
+ (dired
+ranger
- +icons)
+ +icons) ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
- ;;eshell ; the elisp shell that works everywhere
+ eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs
:checkers
- (syntax ; tasing you for every semicolon you forget
- +childframe)
- ;; (spell +flyspell) ; tasing you for misspelling mispelling
- ;; grammar ; tasing grammar mistake every you make
+ (syntax
+ +childframe) ; tasing you for every semicolon you forget
+ ;;(spell +flyspell) ; tasing you for misspelling mispelling
+ ;;grammar ; tasing grammar mistake every you make
:tools
;;ansible
@@ -102,8 +106,8 @@
;;docker
editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
- (eval ; run code, run (also, repls)
- +overlay)
+ (eval
+ +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
lsp ; M-x vscode
@@ -120,7 +124,7 @@
;;upload ; map local to remote projects via ssh/ftp
:os
- ;;(:if IS-MAC macos) ; improve compatibility with macOS
+ ;; (:if IS-MAC macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
:lang
@@ -152,21 +156,23 @@
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
;;json ; At least it ain't XML
- (java +lsp) ; the poster child for carpal tunnel syndrome
+ (java
+ +lsp) ; the poster child for carpal tunnel syndrome
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
- (latex +lsp) ; writing papers in Emacs has never been so fun
- ;;lean ; fo(r fol +lsp())ks +lsp())wit +lsp())h t +lsp())oo +lsp())muc +lsp())h t +lsp())o p +lsp)rove
+ (latex
+ +lsp) ; writing papers in Emacs has never been so fun
+ ;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
- (org ; organize your plain life in plain text
+ (org
+pretty
- +roam)
+ +roam2) ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
@@ -177,10 +183,12 @@
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
- (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
+ (rust
+ +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
- (sh +fish) ; she sells {ba,z,fi}sh shells on the C xor
+ (sh
+ +fish) ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
@@ -201,7 +209,8 @@
emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
- (rss +org) ; emacs as an RSS reader
+ (rss
+ +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config
diff --git a/.config/doom/packages.el b/.config/doom/packages.el
@@ -49,8 +49,8 @@
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t)
+(unpin! org-roam)
(package! dashboard)
(package! chess)
-(package! company)
-(unpin! org-roam)
+(package! company-lsp)
(package! org-roam-ui)
diff --git a/.config/emacs/profiles/load.28.elc b/.config/emacs/profiles/load.28.elc
Binary files differ.
diff --git a/.config/emacs/profiles/load.el b/.config/emacs/profiles/load.el
@@ -1,5 +1,5 @@
;; -*- lexical-binding: t; tab-width: 8; -*-
-;; Updated: 2022-11-17 16:44:32
+;; Updated: 2023-05-21 14:35:06
;; Generated by 'doom profiles sync' or 'doom sync'.
;; DO NOT EDIT THIS BY HAND!
"3.0.0-pre"
@@ -10,6 +10,6 @@
(let nil
(setq user-emacs-directory
(expand-file-name "safe-mode/"
- (expand-file-name "~/Repos/dotfiles/.emacs.d/profiles" user-emacs-directory))))))
+ (expand-file-name "~/.config/emacs/profiles" user-emacs-directory))))))
(setq user-emacs-directory
(file-name-as-directory user-emacs-directory))