Switch from corfu to company.

It seems corfu is causing problems with eglot: https://github.com/joaotavora/eglot/discussions/1127.
This commit is contained in:
Tom Alexander 2023-10-12 00:50:46 -04:00
parent 8975324e7c
commit 68139849f6
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 25 additions and 10 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

@ -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

@ -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))