Skip to content

Commit

Permalink
Fix the icons in treemacs
Browse files Browse the repository at this point in the history
  • Loading branch information
tmonck committed Jun 10, 2024
1 parent cccc416 commit 2ee85a3
Show file tree
Hide file tree
Showing 11 changed files with 249 additions and 153 deletions.
39 changes: 22 additions & 17 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
timeStart=$(date +%s)
case $- in
*i*) ;;
*) return ;;
Expand Down Expand Up @@ -110,15 +111,14 @@ fi
#Evaluate brew
[ -s /opt/homebrew/bin/brew ] && eval "$(/opt/homebrew/bin/brew shellenv)"

if type brew &>/dev/null; then
HOMEBREW_PREFIX="$(brew --prefix)"
if [[ -r "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh" ]]; then
source "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh"
else
for COMPLETION in "${HOMEBREW_PREFIX}/etc/bash_completion.d/"*; do
[[ -r "${COMPLETION}" ]] && source "${COMPLETION}"
done
fi
if type brew &>/dev/null; then
HOMEBREW_PREFIX="$(brew --prefix)"
if [[ -r "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh" ]]; then
source "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh"
else
for COMPLETION in "${HOMEBREW_PREFIX}/etc/bash_completion.d/"*; do
[[ -r "${COMPLETION}" ]] && source "${COMPLETION}"
done
fi
fi

Expand All @@ -134,11 +134,11 @@ if command -v tkn >/dev/null; then
source <(tkn completion bash)
fi

if command -v oc; then
if command -v oc >/dev/null; then
source <(oc completion bash)
fi

if command -v aws; then
if command -v aws >/dev/null; then
complete -C '$(brew --prefix)/bin/aws_completer' aws
fi

Expand All @@ -148,12 +148,12 @@ command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"

# nvm/node
# if command -v nvm
# then
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# fi
export NVM_DIR="$HOME/.nvm"
if [ -s "$NVM_DIR/nvm.sh" ] && [ -s "$NVM_DIR/bash_completion" ]; then
source "$NVM_DIR/nvm.sh" # This loads nvm
source "$NVM_DIR/bash_completion" # This loads nvm bash_completion
fi

export GPG_TTY=$(tty)

# Dotnet
Expand Down Expand Up @@ -183,4 +183,9 @@ if [ -d $GOENV_ROOT ]; then
export PATH=$PATH:"$GOPATH/bin"
fi

#set -o vi
export PROMPT_COMMAND='history -a;'$PROMPT_COMMAND

timeEnd=$(date +%s)
sec=$(((timeStart-timeEnd)%60))
printf '.bashrc loaded in: %ss\n' "$sec"
109 changes: 84 additions & 25 deletions .doom.d/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -48,44 +48,66 @@
;; (setq doom-font (font-spec :family "JetBrains Mono")
;; doom-variable-pitch-font (font-spec :family "DejaVu Sans"))

;; (use-package! nerd-icons)
;; (use-package! treemacs-nerd-icons
;; :config
;; (treemacs-load-theme "nerd-icons"))
;; (setq doom-themes-treemacs-theme "nerd-icons")
;; (setq doom-themes-treemacs-theme "Default")

(use-package! lsp-treemacs :after treemacs)


;; 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. The is the default: doom-one
;; (setq doom-theme 'doom-one)
;;(setq doom-theme 'doom-acario-dark)
(setq doom-theme 'doom-material-dark)
;; (setq doom-theme 'doom-acario-dark)
;; (setq doom-theme 'doom-material-dark)
;; (setq doom-theme 'doom-ir-black)
;; (setq doom-theme 'doom-moonlight)
;; (setq doom-theme 'doom-challenger-deep)
;; (setq doom-theme 'doom-dracula)
;; (setq doom-theme 'doom-oksolar-dark)
;; (setq doom-theme 'doom-badger)
(setq doom-theme 'doom-Iosvkem)
;;

(use-package! treemacs-all-the-icons )
;;(with-eval-after-load 'doom-themes
;; (doom-themes-treemacs-config)
;; (doom-themes-treemacs-theme "doom-colors"))
(setq doom-themes-treemacs-theme "Default")
;; Potentially remove this codr
;; (setq treemacs-no-png-images t)
;; (setq lsp-treemacs-theme "Iconless")
;; (use-package! nerd-icons
;; ;; :custom
;; ;; The Nerd Font you want to use in GUI
;; ;; "Symbols Nerd Font Mono" is the default and is recommended
;; ;; but you can use any other Nerd Font if you want
;; ;; (nerd-icons-font-family "Symbols Nerd Font Mono")
;; )
;; (use-package! treemacs-nerd-icons)

;; (use-package! treemacs-all-the-icons )
(use-package! treemacs-nerd-icons
:config
(treemacs-load-theme "nerd-icons"))
;; (setq doom-themes-treemacs-theme "Default")
;; (setq doom-themes-treemacs-theme "doom-colors")

(use-package! treemacs-icons-dired)

(after! dired
(treemacs-icons-dired-enable-once)
)
;; (use-package! treemacs-nerd-icons
;; :config
;; (treemacs-load-theme "nerd-icons"))
;; (setq doom-themes-treemacs-theme "all-the-icons")
;; ;; (setq doom-themes-treemacs-theme "Default")
;; (use-package! nerd-icons)

;; (use-package nerd-icons-dired
;; :hook
;; (dired-mode . nerd-icons-dired-mode))
;; ;; (setq treemacs-load-theme "nerd-icons")
(if (eq initial-window-system 'x) ; if started by emacs command or desktop file
(toggle-frame-maximized)
(toggle-frame-fullscreen))
(toggle-frame-maximized)
)

(doom/set-frame-opacity 90)

(setq treemacs-width 43)
;; Set magit to full screen
(setq magit-display-buffer-function `magit-display-buffer-fullframe-status-v1)

Expand Down Expand Up @@ -156,22 +178,22 @@
(setq org-roam-capture-templates
'(("d" "default" plain
"%?"
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}")
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+category: ${title}")
:unnarrowed t)
("l" "programing languages" plain
"* Characteristics\n\n- Family: %?\n- Inspired by: \n\n*Reference:\n\n"
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}")
:unnarrowed t)
("p" "project" plain
"* Goals\n\n%?\n* Tasks\n\n** TODO Add initial tasks\n\n* Dates"
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+filetags: Project")
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+category: ${title}\n#+filetags: Project")
:unnarrowed t)
))

(setq org-roam-dailies-directory "journals/")
(setq org-roam-dailies-capture-templates
'(("d" "default" entry "* %<%I:%M %p>: %?"
:if-new (file+head "%<%Y-%m-%d>.org" "#+TITLE: %<%A, %d %B %Y>\nTreat yourself better today\n* Daily Questions\n1. On a scale of 1-10 how positive am I feeling?\n2. What is today's Goal?\n** Thinks to remember\nYou don't have to do something you get to.\nYou don't need todo something you want to.\nEnsure you understand the What and the Why, then have a generalized plan.\n* [/] TODOs\n** TODO\n* Meetings"))))
:if-new (file+head "%<%Y-%m-%d>.org" "#+TITLE: %<%A, %d %B %Y>\n#+filetags: journal\nTreat yourself better today\n* Daily Questions\n1. On a scale of 1-10 how positive am I feeling?\n2. What is today's Goal?\n** Thinks to remember\nYou don't have to do something you get to.\nYou don't need todo something you want to.\nEnsure you understand the What and the Why, then have a generalized plan.\n* [/] TODOs\n** TODO\n* Meetings"))))

(after! org-roam
(map! :leader
Expand Down Expand Up @@ -320,6 +342,12 @@
(require 'lsp-grammarly)
(lsp))))

(map! :leader
(:prefix-map ("e" . "errors")
:desc "flycheck list errors" "l" #'flycheck-list-errors
:desc "flycheck list errors" "n" #'flycheck-next-error
:desc "flycheck list errors" "p" #'flycheck-previous-error))

(setq langtool-bin "/opt/homebrew/bin/languagetool")

(use-package! dap-mode)
Expand Down Expand Up @@ -367,26 +395,43 @@
:config
(lsp-enable-which-key-integration t))

;; Use shopify-cli / theme-check-language-server for Shopify's liquid syntax
;; (with-eval-after-load 'lsp-mode
;; (add-to-list 'lsp-language-id-configuration
;; '(shopify-mode . "shopify"))

;; (lsp-register-client
;; (make-lsp-client :new-connection (lsp-stdio-connection "actions-languageserver")
;; :activation-fn (lsp-activate-on "yaml")
;; :server-id 'actions-languageserver))

;;(lsp-generate-settings "/Users/tmonck/code/languageservices/package.json" 'lsp-gha)

(use-package! lsp-ui
:hook (lsp-mode . lsp-ui-mode)
:custom
(lsp-ui-doc-position 'bottom))

(use-package! python-mode
:mode "\\.py\\'"
:hook (python-mode . lsp-deferred))

(use-package! typescript-mode
:mode "\\.ts\\'"
:hook (typescript-mode . lsp-deferred)
:config
(setq typescript-indent-level 2)
(require 'dap-node)
(dap-node-setup) ;; Automatically installs Node debug adapter if needed
;; (require 'dap-node)
;; (dap-node-setup) ;; Automatically installs Node debug adapter if needed
)

(use-package! js2-mode
:mode "\\.js\\'"
:hook (js2-mode . lsp-deferred)
:config
(require 'dap-node)
(dap-node-setup))
;; (require 'dap-node)
;; (dap-node-setup)
)

;; Add a hook?
(use-package! go-mode
Expand All @@ -406,8 +451,9 @@
:mode "\\.vue\\'"
:hook (vue-mode . lsp-deferred)
:config
(require 'dap-node)
(dap-node-setup))
;; (require 'dap-node)
;; (dap-node-setup)
)

(use-package! go-mode
:mode "\\.go\\'"
Expand All @@ -417,5 +463,18 @@

(add-to-list 'auto-mode-alist '("\\.bash_aliases\\'" . sh-mode))
(add-to-list 'auto-mode-alist '("\\.bash_colors\\'" . sh-mode))
;; (add-to-list '+format-on-save-enabled-modes (not ("yaml-mode")))

(setq workspaces-on-switch-project-behavior 't)

(use-package! copilot
:hook (prog-mode . copilot-mode)
:bind (:map copilot-completion-map
("M-]" . 'copilot-next-completion)
("<tab>" . 'copilot-accept-completion)
("TAB" . 'copilot-accept-completion)
("C-TAB" . 'copilot-accept-completion-by-word)
("C-<tab>" . 'copilot-accept-completion-by-word)))

(after! copilot
(add-to-list 'copilot-indentation-alist '(go-mode 4)))
11 changes: 5 additions & 6 deletions .doom.d/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
;;layout ; auie,ctsrnm is the superior home row

:completion
company ; the ultimate code completion backend
helm ; the *other* search engine for love and life
(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

Expand Down Expand Up @@ -58,7 +58,6 @@
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
;;:w
;; (format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
Expand Down Expand Up @@ -138,7 +137,7 @@
;;idris ; a language you can depend on
json ; At least it ain't XML
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here))))))
(javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun
Expand All @@ -154,7 +153,7 @@
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
python ; beautiful is better than ugly
(python +lsp) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
Expand All @@ -164,7 +163,7 @@
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;scheme ; a fully conniving family of lisps
(sh +powershell) ; she sells {ba,z,fi}sh shells on the C xor
(sh +powershell +lsp) ; 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?
Expand Down
13 changes: 11 additions & 2 deletions .doom.d/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t)

(package! nerd-icons)
(package! nerd-icons-dired)
(package! treemacs-nerd-icons)
(package! treemacs-all-the-icons)

(package! treemacs-icons-dired)
(package! lsp-grammarly)

(package! org-roam)

Expand Down Expand Up @@ -82,3 +83,11 @@
(package! dap-mode)

(package! vue-mode)

(package! copilot
:recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el" "dist")))

(package! flycheck-golangci-lint
:recipe (:host github
:repo "tmonck/flycheck-golangci-lint"
:branch "master"))
Loading

0 comments on commit 2ee85a3

Please sign in to comment.