From f233bb9794a4e225d6012ef5647b8bfd0388f74c Mon Sep 17 00:00:00 2001 From: Marc Date: Sat, 24 Apr 2021 14:56:04 +0200 Subject: [PATCH] fix for elisp company bug, minor other stuff --- config.org | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/config.org b/config.org index b5c312e..ff5d211 100644 --- a/config.org +++ b/config.org @@ -641,10 +641,10 @@ Exclude some dirs from spamming recentf (defun my/company-elisp () (message "set up company for elisp") (set (make-local-variable 'company-backends) - '(company-yasnippet - company-capf - company-dabbrev-code - company-files))) + '(company-capf ;; capf needs to be before yasnippet, or lsp fucks up completion for elisp + company-yasnippet + company-dabbrev-code + company-files))) (defun my/company-org () (set (make-local-variable 'company-backends) '(company-capf company-files)) @@ -1013,7 +1013,7 @@ TODO Unterverzeichnisse wurden noch nicht getestet (lsp-prefer-flymake nil) ; use flycheck instead (lsp-prefer-capf t) (lsp-file-watch-threshold 5000) - (lsb-print-performance t) + (lsp-print-performance t) (lsp-log-io nil) ; enable log only for debug (lsp-enable-folding t) ; default, maybe evil-matchit instead for performance? (lsp-diagnostics-modeline-scope :project) @@ -1025,13 +1025,14 @@ TODO Unterverzeichnisse wurden noch nicht getestet js2-mode typescript-mode web-mode - ) . lsp) + ) . lsp-deferred) (lsp-mode . lsp-enable-which-key-integration) (lsp-mode . lsp-diagnostics-modeline-mode) (web-mode . #'lsp-flycheck-enable)) ;; enable flycheck-lsp for web-mode locally :config (setq lsp-diagnostics-package :none)) ; disable flycheck-lsp for most modes -;; (add-hook 'web-mode-hook #'lsp-flycheck-enable)) ; enable flycheck-lsp for web-mode locally +) + ;; (add-hook 'web-mode-hook #'lsp-flycheck-enable)) ; enable flycheck-lsp for web-mode locally (use-package lsp-ui :after lsp-mode @@ -1129,25 +1130,18 @@ With hippie expand I am able to use yasnippet and emmet at the same time with th :END: Manage projects and jump quickly between its files #+BEGIN_SRC emacs-lisp - (defun set-workon_home() - (setenv "WORKON_HOME" (projectile-project-root)) - (message "set workon_home")) (use-package projectile :ensure t ; :defer 1.0 :diminish -; :hook (projectile-after-switch-project . (lambda () -; (set-workon_home) -; (message "set workon_home"))) ;; for pyvenv to auto activate environment -; :hook (projectile-after-switch-project #'set-workon_home) - :bind-keymap - ("C-c p" . projectile-command-map) + :bind + (("C-c p" . projectile-command-map)) ;:preface :init (setq-default projectile-cache-file (concat MY--PATH_USER_LOCAL ".projectile-cache") projectile-known-projects-file (concat MY--PATH_USER_LOCAL ".projectile-bookmarks")) :config - (projectile-mode t) + (projectile-mode) ; (add-hook 'projectile-after-switch-project-hook #'set-workon_home) (setq-default projectile-completion-system 'ivy projectile-enable-caching t