From ea0e9caa6f1a34a1257b86ffe0d3ab3627d1d8e4 Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Thu, 06 Jan 2022 00:06:55 +0000
Subject: [PATCH] Added python lsp config

---
 config.org |   41 ++++++++++++++++++++++++-----------------
 1 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/config.org b/config.org
index 9e81ea7..cddd15f 100644
--- a/config.org
+++ b/config.org
@@ -104,20 +104,10 @@
 Use aspell for spellchecking. 
 Auto-enable in latex and org as they're the main writing modes.
 #+BEGIN_SRC emacs-lisp
-  ;; (require 'ispell)
-  ;; (setq-default ispell-program-name "aspell")
-  ;; (setq-default ispell-local-dictionary "en_AU")
-  ;; (add-hook 'tex-mode-hook 'flyspell-mode)
-  ;; (add-hook 'latex-mode-hook 'flyspell-mode)
-  ;; (add-hook 'TeX-mode-hook 'flyspell-mode)
-  ;; (add-hook 'LaTeX-mode-hook 'flyspell-mode)
-  ;; (add-hook 'latex-mode-hook 'flyspell-buffer)
-  ;; (add-hook 'org-mode-hook 'flyspell-mode)
-  ;; (add-hook 'org-mode-hook 'flyspell-buffer)
-  ;; (diminish 'flyspell-mode)
   (use-package flyspell
     :hook (tex-mode latex-mode TeX-mode LaTeX-mode org-mode)
     :diminish flyspell-mode
+    :init (require 'ispell)
     :config
     (setq-default ispell-program-name "aspell")
     (setq-default ispell-local-dictionary "en_AU"))
@@ -714,6 +704,12 @@
   (use-package highlight-indentation
     :hook (prog-mode . highlight-indentation-mode))
 #+END_SRC
+
+** Auto revert mode
+Update unchanged buffers if underlying file changes.
+#+BEGIN_SRC emacs-lisp
+  (global-auto-revert-mode)
+#+END_SRC
 * Mode line tweaks
 Diminish is used but is included in init.el such that it can be used throughout this document
 ** Spaceline
@@ -800,7 +796,8 @@
              rust-mode
              sh-mode
              ;; verilog-mode
-             go-mode) . lsp))
+             go-mode
+             python-mode) . lsp))
     :init
     (setq lsp-keymap-prefix "C-c l")
     :commands lsp
@@ -905,7 +902,7 @@
   (add-hook 'magit-process-prompt-functions
             #'magit-process-general-yn-prompt-hook)
 #+END_SRC
-*** Gerrit integration
+*** COMMENT Gerrit integration
 Gerrit takes ~origin:refs/for/master~ as a destination.
 Enable magit to work with its oddities.
 #+BEGIN_SRC emacs-lisp
@@ -1034,9 +1031,9 @@
                                              "BreakBeforeBraces: Linux,"
                                              "AllowShortIfStatementsOnASingleLine: false,"
                                              "IndentCaseLabels: false}"))))
-
-  (use-package clang-format
-    :hook (c-mode-common . (set-clang-format-style)))
+  (add-hook 'c-mode-common-hook 'set-clang-format-style)
+  
+  (use-package clang-format)
 
   ;;   (defun clang-format-on-save ()
   ;;     (add-hook 'before-save-hook 'clang-format-buffer nil t))
@@ -1279,6 +1276,15 @@
 #+BEGIN_SRC emacs-lisp
   (use-package company-go)
 #+END_SRC
+*** Python
+**** COMMENT LSP server
+Use jedi, idk why.
+#+BEGIN_SRC emacs-lisp
+  (use-package lsp-jedi
+    :config
+    (add-to-list 'lsp-disabled-clients 'pyls)
+    (add-to-list 'lsp-enabled-clients 'jedi))
+#+END_SRC
 * Org mode
 ** Up to date org
 Pull the latest org mode from the repository, rather than the org which comes with emacs.
@@ -1367,7 +1373,8 @@
 Call pandoc on org buffer from org export.
 Need to add ~#+OPTIONS: H:99~ to enable large level header exports.
 #+BEGIN_SRC emacs-lisp
-  (use-package ox-pandoc)
+  (when (executable-find "pandoc")
+    (use-package ox-pandoc))
 #+END_SRC
 
 *** COMMENT Dokuwiki Wiki

--
Gitblit v1.9.3