Compare commits

...

3 Commits

Author SHA1 Message Date
Tom Alexander
c652e60619
Move emacs config to .config/emacs. 2023-10-12 15:30:40 -04:00
Tom Alexander
b94e13d63e
Add some emacs settings from https://idiomdrottning.org/bad-emacs-defaults . 2023-10-12 15:30:40 -04:00
Tom Alexander
68139849f6
Switch from corfu to company.
It seems corfu is causing problems with eglot: https://github.com/joaotavora/eglot/discussions/1127.
2023-10-12 15:30:40 -04:00
7 changed files with 39 additions and 19 deletions

View File

@ -8,15 +8,20 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
perc=$1
if [ $perc -gt 100 ]; then
if [ "$perc" -gt 100 ]; then
echo 0 | tee /sys/devices/system/cpu/intel_pstate/no_turbo
perc=100
else
echo 1 | tee /sys/devices/system/cpu/intel_pstate/no_turbo
fi
if [ $perc -lt 50 ]; then
echo "power" | tee /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference
else
if [ "$perc" -ge 80 ]; then
echo "performance" | tee /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference
elif [ "$perc" -ge 60 ]; then
echo "balance_performance" | tee /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference
elif [ "$perc" -ge 40 ]; then
echo "default" | tee /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference
elif [ "$perc" -ge 20 ]; then
echo "balance_power" | tee /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference
else
echo "power" | tee /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference
fi

View File

@ -1,7 +1,7 @@
(use-package diminish)
;; Eglot recommends pulling the latest of the standard libraries it
;; uses from ELPA if you're not tracking the current emacs development
;; uses from ELPA if you're not tracking the current.config/emacsevelopment
;; branch.
(use-package xref
:pin gnu
@ -45,7 +45,7 @@
;; This is an emacs built-in but we're pulling the latest version
:config
(setq recentf-max-saved-items 100)
(setq recentf-save-file (recentf-expand-file-name "~/.emacs.d/private/cache/recentf"))
(setq recentf-save-file (recentf-expand-file-name "~/.config/emacs/private/cache/recentf"))
(recentf-mode 1))
;; Persist history over Emacs restarts. Vertico sorts by history position.

View File

@ -55,6 +55,12 @@
package-native-compile t
;; Confirm when opening a file that does not exist
confirm-nonexistent-file-or-buffer t
;; Do not require double space to end a sentence.
sentence-end-double-space nil
;; Show trailing whitespace
show-trailing-whitespace t
;; Remove the line when killing it with ctrl-k
kill-whole-line t
)
;; (setq-default fringes-outside-margins t)

View File

@ -33,4 +33,14 @@
:commands (consult-eglot-symbols)
)
(use-package company
:after eglot
:hook (eglot-managed-mode . company-mode)
:config
(setq company-backends '((company-capf)))
)
;; (use-package company-box
;; :hook (company-mode . company-box-mode))
(provide 'common-lsp)

View File

@ -48,8 +48,7 @@
(add-to-list 'eglot-server-programs `(rust-ts-mode . (,rust-analyzer-command :initializationOptions (:imports (:granularity (:enforce t :group "item")
:merge (:glob nil)
:prefix "self")
:inlayHints (:maxLength nil)
:workspace (:symbol (:search (:limit 1024)))))))
))))
)
)
(add-hook 'before-save-hook 'eglot-format-buffer nil 'local)

View File

@ -46,11 +46,11 @@
)
)
(use-package corfu
:commands (corfu-mode global-corfu-mode)
:custom
(corfu-auto t)
)
;; (use-package corfu
;; :commands (corfu-mode global-corfu-mode)
;; :custom
;; (corfu-auto t)
;; )
(use-package marginalia
:config (marginalia-mode))

View File

@ -9,7 +9,7 @@
owner: "{{ account_name.stdout }}"
group: "{{ group_name.stdout }}"
loop:
- ".emacs.d/elisp"
- ".config/emacs/elisp"
- name: Configure dotfiles
when: 'emacs_flavor == "full"'
@ -21,9 +21,9 @@
group: "{{ group_name.stdout }}"
loop:
- src: init.el
dest: .emacs.d/init.el
dest: .config/emacs/init.el
- src: early-init.el
dest: .emacs.d/early-init.el
dest: .config/emacs/early-init.el
- name: Configure dotfiles
when: 'emacs_flavor == "plain"'
@ -35,7 +35,7 @@
group: "{{ group_name.stdout }}"
loop:
- src: plainmacs_init.el
dest: .emacs.d/init.el
dest: .config/emacs/init.el
- name: Configure elisp files
when: 'emacs_flavor == "full"'
@ -46,7 +46,7 @@
group: "{{ group_name.stdout }}"
loop:
- src: elisp
dest: .emacs.d/
dest: .config/emacs/
- name: Configure zshrc additional imports
copy: