Old emacs version (>26.3, >28) versions compatibility, tab size by filetype, and other minor fixes

This commit is contained in:
Ian Griffin 2023-10-06 11:02:19 +08:00
parent 0b04c73071
commit ef8f6c04e2
4 changed files with 26 additions and 8 deletions

View File

@ -1,5 +1,12 @@
#+TITLE: Packages #+TITLE: Packages
* Old Emacs TLS Compatibility
Emacs versions older than 26.3 have problems with TLS Authentication to connect with ELPA, this fixes that
#+begin_src emacs-lisp
(when (version< emacs-version "26.3")
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))
#+end_src
* Configuration * Configuration
#+begin_src emacs-lisp #+begin_src emacs-lisp
(require 'package) (require 'package)
@ -17,9 +24,10 @@ this speeds up emacs startup
#+end_src #+end_src
** Add package sources ** Add package sources
#+begin_src emacs-lisp
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
#+begin_src emacs-lisp
(add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/"))
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/")) (add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
#+end_src #+end_src

View File

@ -118,7 +118,7 @@ sets the tab size 5 spaces
* Ligatures * Ligatures
#+begin_src emacs-lisp #+begin_src emacs-lisp
(when (> emacs-major-version 28)
(use-package ligature (use-package ligature
:config :config
;; Enable the "www" ligature in every possible major mode ;; Enable the "www" ligature in every possible major mode
@ -142,7 +142,8 @@ sets the tab size 5 spaces
"\\\\" "://")) "\\\\" "://"))
;; Enables ligature checks globally in all buffers. You can also do it ;; Enables ligature checks globally in all buffers. You can also do it
;; per mode with `ligature-mode'. ;; per mode with `ligature-mode'.
(global-ligature-mode t)) (global-ligature-mode t)))
#+end_src #+end_src

View File

@ -71,6 +71,13 @@ This package provides Popup autocompletion
(company-idle-delay 0.0)) (company-idle-delay 0.0))
#+end_src #+end_src
* RESTClient
REST API Client in Emacs
#+begin_src emacs-lisp
(use-package restclient
:command (restclient-mode))
#+end_src
* Eglot * Eglot
A simple package for LSP support A simple package for LSP support

View File

@ -79,7 +79,9 @@ python venv manager
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package pyvenv (use-package pyvenv
:commands (pyvenv-mode pyvenv-activate pyvenv-workon pyvenv-exec-shell pyvenv-virtual-env) :commands (pyvenv-mode pyvenv-activate pyvenv-workon pyvenv-exec-shell pyvenv-virtual-env)
:hook (python-mode . pyvenv-mode)) :hook (python-mode . pyvenv-mode)
:config
(setenv "WORKON_HOME" (expand-file-name ".local/opt/miniforge3/envs" (safe-getenv "HOME" user-home-path))))
#+end_src #+end_src
*** Tab Size *** Tab Size