This commit is contained in:
ksyasuda 2022-01-07 14:14:08 -08:00
parent 66eb56d101
commit af6ce567ad
2 changed files with 24 additions and 50 deletions

View File

@ -63,15 +63,15 @@
("int" . ?) ("int" . ?)
("not" . ))) ("not" . )))
(setq prettify-symbols-alist ;; (setq prettify-symbols-alist
'(("lambda" . ) ;; '(("lambda" . ?λ)
("&&" . ?∧) ;; ("&&" . ?∧)
("||" . ?) ;; ("||" . ?)
("in" . ?∈) ;; ("in" . ?∈)
("for" . ?∀) ;; ("for" . ?∀)
("function" . ) ;; ("function" . ?ƒ)
("int" . ?) ;; ("int" . ?)
("not" . ))) ;; ("not" . ?¬)))
(use-package! wakatime-mode :ensure t) (use-package! wakatime-mode :ensure t)
@ -92,13 +92,18 @@
(lsp-ui-mode) (lsp-ui-mode)
(use-package lsp-python-ms ;; (require 'lsp-python-ms)
:ensure t ;; (use-package lsp-python-ms
:init (setq lsp-python-ms-auto-install-server t) ;; :init (setq lsp-python-ms-auto-install-server t)
:hook (python-mode . (lambda () ;; :hook (python-mode . (lambda ()
(require 'lsp-python-ms) ;; (require 'lsp-python-ms)
(lsp)))) ; or lsp-deferred ;; (lsp)))) ; or lsp-deferred
(use-package lsp-pyright
:ensure t
:hook (python-mode . (lambda ()
(require 'lsp-pyright)
(lsp)))) ; or lsp-deferred
(use-package! lsp-mode (use-package! lsp-mode
:commands lsp :commands lsp
@ -205,38 +210,6 @@
(add-hook 'org-mode-hook #'org-bullets-mode) (add-hook 'org-mode-hook #'org-bullets-mode)
(add-hook 'before-save-hook 'py-isort-before-save) (add-hook 'before-save-hook 'py-isort-before-save)
;;; SQL MODE
(defun my-sql-save-history-hook ()
(let ((lval 'sql-input-ring-file-name)
(rval 'sql-product))
(if (symbol-value rval)
(let ((filename
(concat "~/.emacs.d/sql/"
(symbol-name (symbol-value rval))
"-history.sql")))
(set (make-local-variable lval) filename))
(error
(format "SQL history will not be saved because %s is nil"
(symbol-name rval))))))
(add-hook 'sql-interactive-mode-hook 'my-sql-save-history-hook)
(defun upcase-sql-keywords ()
(interactive)
(save-excursion
(dolist (keywords sql-mode-postgres-font-lock-keywords)
(goto-char (point-min))
(while (re-search-forward (car keywords) nil t)
(goto-char (+ 1 (match-beginning 0)))
(when (eql font-lock-keyword-face (face-at-point))
(backward-char)
(upcase-word 1)
(forward-char))))))
; (add-hook 'sql-interactive-mode-hook 'my-sql-save-history-hook 'upercase-sql-keywords')
(after! flyspell (after! flyspell
(setq flyspell-lazy-idle-seconds 2)) (setq flyspell-lazy-idle-seconds 2))
@ -263,7 +236,7 @@
(setq eaf-terminal-font-size 12) (setq eaf-terminal-font-size 12)
(setq lsp-treemacs-sync-mode 1) (setq lsp-treemacs-sync-mode 1)
(setq lsp-python-ms-auto-install-server t) ;; (setq lsp-python-ms-auto-install-server t)
(add-hook 'python-mode-hook #'lsp) ; or lsp-deferred (add-hook 'python-mode-hook #'lsp) ; or lsp-deferred

View File

@ -64,4 +64,5 @@
(package! howdoi) (package! howdoi)
(package! persist) (package! persist)
(package! pipenv) (package! pipenv)
(package! lsp-python-ms) ;; (package! lsp-python-ms)
(package! lsp-pyright)