From efa4fd373e6d1a53c450cc2675af909e61a51ac9 Mon Sep 17 00:00:00 2001 From: Ian Griffin Date: Mon, 18 Sep 2023 21:48:52 +0800 Subject: [PATCH] font enhancements, README updates, and other minor fixes --- .gitignore | 1 + README.org | 14 +++++++++++++- init.org.d/{50-fonts.org => 30-fonts.org} | 2 +- init.org.d/{30-org.org => 40-org.org} | 22 +++++++++++----------- init.org.d/50-ui.org | 17 +++++++---------- init.org.d/70-lang.org | 2 +- init.org.d/80-misc-end.org | 9 ++++----- 7 files changed, 38 insertions(+), 29 deletions(-) rename init.org.d/{50-fonts.org => 30-fonts.org} (93%) rename init.org.d/{30-org.org => 40-org.org} (80%) diff --git a/.gitignore b/.gitignore index 7c717f2..0930823 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ personal-sample.el # gpg files elpa/* +eln-cache/* # swap and undo files *~ diff --git a/README.org b/README.org index ceadc91..c19de43 100644 --- a/README.org +++ b/README.org @@ -4,15 +4,27 @@ This is the writer's personal configuration for Emacs. * How to use this config? This configuration works best on a GNU/Linux Platform, other platforms are untested. + ** Dependencies Obviously, a full Emacs distribution needs to be installed. Other external dependencies is (usually) specified in their configuration. +*** Language Servers +For Language servers to work, the language servers needs to be installed separately, for example, in Fedora Linux, the required language servers can be installed by running the command below + +#+begin_src sh + sudo dnf install clang-tools-extra npm cargo go + pip install -U pyright + npm i --save -g typescript-language-server typescript vscode-html-languageservice + cargo install texlab + go install golang.org/x/tools/gopls@latest +#+end_src + ** Installation First, download this configuration #+begin_src sh mkdir -p $HOME/.config - git clone "https://gitlab.com/telosama/emacs-config.git" $HOME/.config/emacs + git clone "https://git.telosama.xyz/iang/emacs-config.git" $HOME/.config/emacs #+end_src Then, run Emacs. diff --git a/init.org.d/50-fonts.org b/init.org.d/30-fonts.org similarity index 93% rename from init.org.d/50-fonts.org rename to init.org.d/30-fonts.org index f4939a7..be66842 100644 --- a/init.org.d/50-fonts.org +++ b/init.org.d/30-fonts.org @@ -15,7 +15,7 @@ So for this to run, Fira Sans and FiraCode Nerd Font needs to be installed in t :foundry "CTDB" :family "FiraCode Nerd Font Mono")))) '(fixed-pitch ((t (:family "FiraCode Nerd Font Mono")))) '(fixed-pitch-serif ((t (:family "FiraCode Nerd Font Mono")))) - '(variable-pitch ((t (:inherit default :family "Fira Sans"))))) + '(variable-pitch ((t (:inherit default :height 1.1 :family "Cantarell"))))) #+end_src ** Chinese Font diff --git a/init.org.d/30-org.org b/init.org.d/40-org.org similarity index 80% rename from init.org.d/30-org.org rename to init.org.d/40-org.org index a59d2db..ee55f21 100644 --- a/init.org.d/30-org.org +++ b/init.org.d/40-org.org @@ -19,21 +19,21 @@ Set different types of fonts for differents elements of Org-mode files, like var (defun org-config-font-setup () "set org mode element fonts" (custom-set-faces - '(org-block ((t (:inherit fixed-pitch)))) + '(org-block ((t (:inherit fixed-pitch :height 0.91)))) ;; '(org-block-begin-line ((t (:inherit fixed-pitch)))) ;; '(org-block-end-line ((t (:inherit fixed-pitch)))) - '(org-checkbox ((t (:inherit fixed-pitch)))) - '(org-code ((t (:inherit (shadow fixed-pitch))))) + '(org-checkbox ((t (:inherit fixed-pitch :height 0.91)))) + '(org-code ((t (:inherit (shadow fixed-pitch) :height 0.91)))) '(org-document-info ((t (:foreground "dark orange")))) - '(org-document-info-keyword ((t (:inherit (shadow fixed-pitch))))) - '(org-indent ((t (:inherit (org-hide fixed-pitch))))) + '(org-document-info-keyword ((t (:inherit (shadow fixed-pitch) :height 0.91)))) + '(org-indent ((t (:inherit (org-hide fixed-pitch) :height 0.91)))) '(org-link ((t (:foreground "royal blue" :underline t)))) - '(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch))))) - '(org-property-value ((t (:inherit fixed-pitch))) t) - '(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch))))) - '(org-table ((t (:inherit fixed-pitch :foreground "#83a598")))) - '(org-tag ((t (:inherit (shadow fixed-pitch) :weight bold :height 0.8)))) - '(org-verbatim ((t (:inherit (shadow fixed-pitch))))))) + '(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch) :height 0.91)))) + '(org-property-value ((t (:inherit fixed-pitch :height 0.91))) t) + '(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch) :height 0.91)))) + '(org-table ((t (:inherit fixed-pitch :foreground "#83a598" :height 0.91)))) + '(org-tag ((t (:inherit (shadow fixed-pitch) :height 0.91 :weight bold :height 0.8)))) + '(org-verbatim ((t (:inherit (shadow fixed-pitch) :height 0.91)))))) #+end_src ** Header Font Setup diff --git a/init.org.d/50-ui.org b/init.org.d/50-ui.org index 03ef618..7d54225 100644 --- a/init.org.d/50-ui.org +++ b/init.org.d/50-ui.org @@ -5,15 +5,12 @@ this file/section configures the UI settings * Toolbar and Scrollbar removing this stuff makes emacs looks more cleaner - - #+BEGIN_SRC emacs-lisp - - (tool-bar-mode -1) - (menu-bar-mode 1) - (scroll-bar-mode 1) - - #+END_SRC - +#+begin_src emacs-lisp + (tool-bar-mode -1) + (menu-bar-mode -1) + (scroll-bar-mode 1) +#+end_src + * Maximize Start emacs as a maximized window at start @@ -137,7 +134,7 @@ sets the tab size 5 spaces Load theme (that is built-in) #+begin_src emacs-lisp - (load-theme 'modus-operandi t) + (load-theme 'modus-vivendi t) #+end_src * Welcome Screen diff --git a/init.org.d/70-lang.org b/init.org.d/70-lang.org index 0cca1c7..f1e99e3 100644 --- a/init.org.d/70-lang.org +++ b/init.org.d/70-lang.org @@ -30,7 +30,7 @@ (mhtml-mode . ("html-language-server")) (java-mode . ("jdtls")) (js-mode . ("typescript-language-server")) - (python-mode . ("jedi-language-server")) + (python-mode . ("pyright")) (latex-mode . ("texlab"))))) (setq eglot-server-programs (append server-programs eglot-server-programs))) #+end_src diff --git a/init.org.d/80-misc-end.org b/init.org.d/80-misc-end.org index c5e4681..cd6b527 100644 --- a/init.org.d/80-misc-end.org +++ b/init.org.d/80-misc-end.org @@ -20,11 +20,10 @@ Ido is a autocomplete package for emacs' commands This config just sets the download directory #+begin_src emacs-lisp - (use-package eww - :custom - (eww-download-directory "~/dls" "location to put downloaded files") - :config - (setq eww-download-directory "~/dls")) + (use-package eww + :custom + (eww-download-directory "~/dls" "location to put downloaded files") + (eww-search-prefix "https://lite.duckduckgo.com/lite/?q=" "prefix url to do search")) #+end_src * Fancy Battery