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
* 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
#+begin_src emacs-lisp
(require 'package)
@ -17,9 +24,10 @@ this speeds up emacs startup
#+end_src
** 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" . "http://melpa.org/packages/"))
#+end_src

View File

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

View File

@ -70,7 +70,14 @@ This package provides Popup autocompletion
(company-minimum-prefix-length 1)
(company-idle-delay 0.0))
#+end_src
* RESTClient
REST API Client in Emacs
#+begin_src emacs-lisp
(use-package restclient
:command (restclient-mode))
#+end_src
* Eglot
A simple package for LSP support

View File

@ -79,7 +79,9 @@ python venv manager
#+begin_src emacs-lisp
(use-package pyvenv
: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
*** Tab Size