diff options
Diffstat (limited to 'emacs')
| -rw-r--r-- | emacs/inits/20-programming.el | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/emacs/inits/20-programming.el b/emacs/inits/20-programming.el index 634eb15..b1b4c38 100644 --- a/emacs/inits/20-programming.el +++ b/emacs/inits/20-programming.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2021-09-27 08h48 EDT (hobbies)> +;; Time-stamp: <2021-12-06 12h56 EST (hobbies)> ;; ----------------------------------------------------------------------------- ;; General setup @@ -102,34 +102,30 @@ :config (c-add-style "gnu-mod" '("gnu" - (c-basic-offset . 2) ; Guessed value + (c-basic-offset . 2) ; Guessed value (c-offsets-alist - (block-close . 0) ; Guessed value - (case-label . +) ; Guessed value - (defun-block-intro . +) ; Guessed value - (defun-close . 0) ; Guessed value - (defun-open . 0) ; Guessed value - (else-clause . 0) ; Guessed value - (statement . 0) ; Guessed value + (block-close . 0) ; Guessed value + (case-label . +) ; Guessed value + (defun-block-intro . +) ; Guessed value + (defun-close . 0) ; Guessed value + (statement . 0) ; Guessed value (statement-block-intro . +) ; Guessed value - (statement-case-intro . +) ; Guessed value - (statement-cont . +) ; Guessed value - (substatement . +) ; Guessed value - (topmost-intro . 0) ; Guessed value - (topmost-intro-cont . 0) ; Guessed value + (statement-case-intro . 0) ; Guessed value + (substatement . +) ; Guessed value + (topmost-intro . 0) ; Guessed value (access-label . -) (annotation-top-cont . 0) (annotation-var-cont . +) (arglist-close . c-lineup-close-paren) (arglist-cont c-lineup-gcc-asm-reg 0) (arglist-cont-nonempty . c-lineup-arglist) - (arglist-intro . c-lineup-arglist-intro-after-paren) + (arglist-intro . +) (block-open . 0) (brace-entry-open . 0) (brace-list-close . 0) (brace-list-entry . 0) - (brace-list-intro first c-lineup-2nd-brace-entry-in-arglist c-lineup-class-decl-init-+ +) - (brace-list-open . +) + (brace-list-intro . +) + (brace-list-open . 0) (c . c-lineup-C-comments) (catch-clause . 0) (class-close . 0) @@ -140,7 +136,9 @@ (cpp-define-intro c-lineup-cpp-define +) (cpp-macro . -1000) (cpp-macro-cont . +) + (defun-open . 0) (do-while-closure . 0) + (else-clause . 0) (extern-lang-close . 0) (extern-lang-open . 0) (friend . 0) @@ -154,12 +152,12 @@ (inher-intro . +) (inlambda . 0) (inline-close . 0) - (inline-open . 0) + (inline-open . +) (inmodule . +) (innamespace . +) (knr-argdecl . 0) - (knr-argdecl-intro . 5) - (label . 0) + (knr-argdecl-intro . +) + (label . 2) (lambda-intro-cont . +) (member-init-cont . c-lineup-multi-inher) (member-init-intro . +) @@ -170,12 +168,15 @@ (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call +) (objc-method-intro . [0]) - (statement-case-open . +) + (statement-case-open . 0) + (statement-cont . +) (stream-op . c-lineup-streamop) (string . -1000) - (substatement-label . 0) + (substatement-label . 2) (substatement-open . +) - (template-args-cont c-lineup-template-args +)))) + (template-args-cont c-lineup-template-args +) + (topmost-intro-cont . c-lineup-topmost-intro-cont)))) + (setq c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "gnu-mod")))) @@ -220,18 +221,18 @@ ;; ----------------------------------------------------------------------------- ;; Python -;;; TODO: need to find a LSP implementation for Python, currently elpy -;;; drags in company and i don't want that. - -;; (use-package elpy -;; :ensure t -;; :defer t -;; :init -;; (advice-add 'python-mode :before 'elpy-enable) -;; :config -;; (setq python-shell-interpreter "python3") -;; (setq-default python-indent-offset 4)) +(use-package yapfify + :ensure t + :defer t) +(use-package python + :hook (python-mode . (lambda () + (lsp) + (yapf-mode))) + :config + (setq lsp-pylsp-plugins-pycodestyle-enabled nil + lsp-pylsp-plugins-pydocstyle-enabled nil + python-shell-interpreter "python3")) ;; ----------------------------------------------------------------------------- ;; Zig |
