Fixes venv file

This commit is contained in:
2022-11-30 13:18:05 +01:00
parent 6284a07ce6
commit 93fcbe8c45

5
.emacs
View File

@@ -258,8 +258,8 @@
(defun atu/get-dotvenv () (defun atu/get-dotvenv ()
"Gets .venv from project root if any" "Gets .venv from project root if any"
(when-let* ((root-dir (projectile-project-root)) (when-let* ((root-dir (projectile-project-root))
(venv (concat (file-name-as-directory root-dir) ".venv")) (venv-file (concat (file-name-as-directory root-dir) ".venv"))
(venv-exists (file-exists-p venv)) (venv-exists (file-exists-p venv-file))
(venv-name (with-temp-buffer (venv-name (with-temp-buffer
(insert-file-contents venv-file) (insert-file-contents venv-file)
(nth 0 (split-string (buffer-string)))))) (nth 0 (split-string (buffer-string))))))
@@ -349,6 +349,7 @@
(add-hook 'before-save-hook 'py-isort-before-save))) (add-hook 'before-save-hook 'py-isort-before-save)))
) )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; C/C++ ;; C/C++
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;