asdfghasfg
This commit is contained in:
parent
ca2a287911
commit
0648d70635
102
config/init.org
102
config/init.org
|
@ -49,6 +49,20 @@
|
|||
#+begin_src emacs-lisp
|
||||
(electric-indent-mode 1)
|
||||
(electric-pair-mode 1)
|
||||
(setq c-basic-offset 2)
|
||||
(setq-default indent-tabs-mode nil)
|
||||
#+end_src
|
||||
|
||||
** Show Whitespace
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq whitespace-display-mappings
|
||||
'((space-mark ?\ [?\u00B7] [?.])
|
||||
(tab-mark ?\t [?\u00BB ?\t])))
|
||||
|
||||
(global-whitespace-mode 1)
|
||||
|
||||
(add-hook 'before-save-hook 'whitespace-cleanup)
|
||||
#+end_src
|
||||
|
||||
** Rainbow Delimiters
|
||||
|
@ -74,10 +88,10 @@
|
|||
(global-display-line-numbers-mode t)
|
||||
(setq display-line-numbers-type 'relative)
|
||||
(dolist (mode '(term-mode-hook
|
||||
vterm-mode-hook
|
||||
shell-mode-hook
|
||||
eshell-mode-hook
|
||||
treemacs-mode-hook))
|
||||
vterm-mode-hook
|
||||
shell-mode-hook
|
||||
eshell-mode-hook
|
||||
treemacs-mode-hook))
|
||||
(add-hook mode (lambda () (display-line-numbers-mode 0))))
|
||||
#+end_src
|
||||
|
||||
|
@ -111,6 +125,26 @@
|
|||
|
||||
* Package Management
|
||||
|
||||
** Ligatures
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defvar ligatures-MapleMono
|
||||
'("--" "---" "==" "===" "!=" "!==" "=!=" "=:=" "=/=" "<=" ">=" "&&" "&&&" "&=" "++" "+++"
|
||||
"***" ";;" "!!" "??" "?:" "?." "?=" "<:" ":<" ":>" ">:" "<>" "<<<" ">>>" "<<" ">>" "||" "-|"
|
||||
"_|_" "|-" "||-" "|=" "||=" "##" "###" "####" "#{" "#[" "]#" "#(" "#?" "#_" "#_(" "#:"
|
||||
"#!" "#=" "^=" "<$>" "<$" "$>" "<+>" "<+ +>" "<*>" "<* *>" "</" "</>" "/>" "<!--"
|
||||
"<#--" "-->" "->" "->>" "<<-" "<-" "<=<" "=<<" "<<=" "<==" "<=>" "<==>" "==>" "=>"
|
||||
"=>>" ">=>" ">>=" ">>-" ">-" ">--" "-<" "-<<" ">->" "<-<" "<-|" "<=|" "|=>" "|->" "<-"
|
||||
"<~~" "<~" "<~>" "~~" "~~>" "~>" "~-" "-~" "~@" "[||]" "|]" "[|" "|}" "{|" "[<" ">]"
|
||||
"|>" "<|" "||>" "<||" "|||>" "|||>" "<|>" "..." ".." ".=" ".-" "..<" ".?" "::" ":::"
|
||||
":=" "::=" ":?" ":?>" "//" "///" "/*" "*/" "/=" "//=" "/==" "@_" "__"))
|
||||
|
||||
(use-package ligature
|
||||
:config
|
||||
(ligature-set-ligatures 'prog-mode ligatures-MapleMono)
|
||||
(global-ligature-mode t))
|
||||
#+end_src
|
||||
|
||||
** Theme
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -133,6 +167,27 @@
|
|||
(setq recentf-exclude '("~/.emacs.d/.cache/treemacs-persist")))
|
||||
#+end_src
|
||||
|
||||
** Better M-x
|
||||
|
||||
*** Ivy Mode (Completions)
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ivy
|
||||
:ensure t
|
||||
:hook (after-init . ivy-mode)
|
||||
:config
|
||||
(setq ivy-use-virtual-buffers t)
|
||||
(setq enable-recursive-minibuffers t))
|
||||
#+end_src
|
||||
|
||||
*** Amx Mode (Better Interface)
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package amx
|
||||
:ensure t
|
||||
:hook (after-init . amx-mode))
|
||||
#+end_src
|
||||
|
||||
** Modeline
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -238,13 +293,13 @@
|
|||
#+begin_src emacs-lisp
|
||||
(add-hook 'prog-mode-hook 'eglot-ensure)
|
||||
(use-package haskell-mode :ensure t
|
||||
:hook (haskell-mode . eglot-ensure))
|
||||
:hook (haskell-mode . eglot-ensure))
|
||||
|
||||
(setq-default eglot-workspace-configuration
|
||||
'((haskell
|
||||
(plugin
|
||||
(stan
|
||||
(globalOn . :json-false)))))) ;; disable stan
|
||||
'((haskell
|
||||
(plugin
|
||||
(stan
|
||||
(globalOn . :json-false)))))) ;; disable stan
|
||||
|
||||
(defun my/eglot-format-buffer-on-save ()
|
||||
"Format the current buffer if Eglot is active."
|
||||
|
@ -269,6 +324,27 @@
|
|||
(use-package vue-mode
|
||||
:config
|
||||
(setq mmm-submode-decoration-level 2))
|
||||
|
||||
(add-hook 'c-mode-hook 'hide-ifdef-mode)
|
||||
(add-hook 'c++-mode-hook 'hide-ifdef-mode)
|
||||
(setq hide-ifdef-initially t)
|
||||
(setq hide-ifdef-shadow 'font-lock-comment-face)
|
||||
|
||||
;; Load posframe for popups
|
||||
(use-package eldoc-box
|
||||
:ensure t)
|
||||
|
||||
(add-hook 'eglot-managed-mode-hook #'eldoc-box-hover-mode t)
|
||||
(defun my/eldoc-box-post-frame-hook (frame)
|
||||
(modify-frame-parameters
|
||||
eldoc-box--frame
|
||||
`(
|
||||
(background-color . "white")
|
||||
(internal-border-width . ,1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(add-hook 'eldoc-box-frame-hook #'my/eldoc-box-post-frame-hook)
|
||||
#+end_src
|
||||
|
||||
** Corfu Completions
|
||||
|
@ -411,10 +487,10 @@
|
|||
(defvar my/tab-left (powerline-wave-right 'tab-line nil my/tab-height))
|
||||
(defvar my/tab-right (powerline-wave-left nil 'tab-line my/tab-height))
|
||||
|
||||
(defun my/tab-line-tab-name-buffer (buffer &optional _buffers)
|
||||
(powerline-render (list my/tab-left
|
||||
(format "%s" (buffer-name buffer))
|
||||
my/tab-right)))
|
||||
(defun my/tab-line-tab-name-buffer (buffer &optional _buffers)
|
||||
(powerline-render (list my/tab-left
|
||||
(format "%s" (buffer-name buffer))
|
||||
my/tab-right)))
|
||||
|
||||
(setq tab-line-tab-name-function #'my/tab-line-tab-name-buffer)
|
||||
|
||||
|
|
Loading…
Reference in a new issue