From e43a6a37259308cab744f0296e092629ade139b3 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Mon, 23 Dec 2019 19:20:13 +0100 Subject: Emacs: Simplify pdf-tools check --- dot.emacs.d/init.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dot.emacs.d/init.el') diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index f5b262e..ef812cc 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -205,8 +205,9 @@ (add-hook 'eshell-mode-hook #'qsx-dont-show-line-numbers-hook) (use-package pdf-tools - :if (display-graphic-p) - :unless (eq system-type 'darwin) + :if (and + (display-graphic-p) + (not (eq system-type 'darwin))) :config (pdf-tools-install) (setq-default pdf-view-display-size 'fit-page) -- cgit v1.2.3 From e5f504d1df429da65e1ae94d3259065fe2a04007 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Mon, 7 Oct 2019 18:14:30 +0200 Subject: Emacs: Don’t show line numbers in ledger reports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dot.emacs.d/init.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'dot.emacs.d/init.el') diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index ef812cc..5fad9ec 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -201,8 +201,10 @@ (defun qsx-dont-show-line-numbers-hook () (setq display-line-numbers nil)) -(add-hook 'Man-mode-hook #'qsx-dont-show-line-numbers-hook) -(add-hook 'eshell-mode-hook #'qsx-dont-show-line-numbers-hook) +(dolist (h '('Man-mode-hook + 'eshell-mode-hook + 'ledger-report-mode-hook)) + (add-hook h #'qsx-dont-show-line-numbers-hook)) (use-package pdf-tools :if (and -- cgit v1.2.3 From 59b263c2f84d207a87122bbc0505c03f70628cc4 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Mon, 23 Dec 2019 21:07:59 +0100 Subject: Emacs: Add elpy --- dot.emacs.d/.gitignore | 1 + dot.emacs.d/init.el | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'dot.emacs.d/init.el') diff --git a/dot.emacs.d/.gitignore b/dot.emacs.d/.gitignore index c1d8c62..5c52875 100644 --- a/dot.emacs.d/.gitignore +++ b/dot.emacs.d/.gitignore @@ -12,3 +12,4 @@ /semanticdb/ /.lsp-session-v1 /abbrev_defs +/elpy diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index 5fad9ec..3fe64fa 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -82,11 +82,6 @@ (use-package company-reftex :if (display-graphic-p) :config (add-to-list 'company-backends 'company-reftex)) -(use-package company-jedi - :config - (add-hook 'python-mode-hook (defun qsx-python-mode-hook-jedi () - (make-local-variable company-backends) - (add-to-list 'company-backends 'company-jedi)))) (use-package company-ansible :config (add-to-list 'company-backends 'company-ansible)) (use-package company-shell @@ -98,6 +93,12 @@ :bind (:map c-mode-map ("M-RET" . #'srefactor-refactor-at-point))) +(use-package elpy + :ensure t + :defer t + :init + (advice-add 'python-mode :before 'elpy-enable)) + (use-package lsp-mode :commands lsp :config (require 'lsp-clients)) -- cgit v1.2.3 From 53260b919277b0799588274d6abba436b35daa55 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Mon, 23 Dec 2019 21:08:40 +0100 Subject: Emacs: Move and customise yaml-mode --- dot.emacs.d/init.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'dot.emacs.d/init.el') diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index 3fe64fa..0a753b2 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -165,9 +165,6 @@ (use-package meson-mode) -(use-package yaml-mode - :mode "\\.yml\\'") - (if (< emacs-major-version 26) (use-package linum-relative :ensure t @@ -197,6 +194,12 @@ (use-package ansible) (use-package poly-ansible) +(use-package yaml-mode + :config + (add-hook 'yaml-mode-hook + (defun qsx-hl-indent-mode-hook () + (highlight-indentation-mode)))) + (use-package dockerfile-mode) (defun qsx-dont-show-line-numbers-hook () -- cgit v1.2.3 From 12aa4cc7ee68cf5a1626f6f88433f56a3752dc3e Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Mon, 23 Dec 2019 21:09:02 +0100 Subject: Emacs: Fix line-numbers hook handling --- dot.emacs.d/init.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dot.emacs.d/init.el') diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index 0a753b2..cc3bec5 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -205,9 +205,9 @@ (defun qsx-dont-show-line-numbers-hook () (setq display-line-numbers nil)) -(dolist (h '('Man-mode-hook - 'eshell-mode-hook - 'ledger-report-mode-hook)) +(dolist (h '(Man-mode-hook + eshell-mode-hook + ledger-report-mode-hook)) (add-hook h #'qsx-dont-show-line-numbers-hook)) (use-package pdf-tools -- cgit v1.2.3 From 535fb5bbd60a91d5b60b8b2402179adf0aacc069 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Mon, 23 Dec 2019 21:09:23 +0100 Subject: Emacs: Add go-mode --- dot.emacs.d/init.el | 3 +++ 1 file changed, 3 insertions(+) (limited to 'dot.emacs.d/init.el') diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index cc3bec5..55885f5 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -248,6 +248,9 @@ (auctex-latexmk-setup) (setq TeX-command-default "LatexMk")) +(use-package go-mode + :hook (go-mode . lsp)) + (use-package toml-mode) (use-package rust-mode -- cgit v1.2.3 From 243357d5ccff8659b586ebe4a4c801090e5ac8da Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Mon, 23 Dec 2019 21:09:42 +0100 Subject: Emacs: Set c-default-style to linux --- dot.emacs.d/init.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dot.emacs.d/init.el') diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index 55885f5..2f7f193 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -260,6 +260,8 @@ (use-package cargo :hook (rust-mode . cargo-minor-mode)) +(setq c-default-style "linux") + (setq tramp-default-method "ssh" tramp-terminal-type "tramp") -- cgit v1.2.3