Julien Palard 2023-12-02 00:02:04 +01:00
parent d136d2ff8f
commit 9f9d25d4ac
Signed by: mdk
GPG Key ID: 0EFC1AC1006886F8
2 changed files with 5 additions and 13 deletions

View File

@ -215,14 +215,7 @@ venv()
echo '`.envrc` file already exists!' echo '`.envrc` file already exists!'
return return
fi fi
cat >.envrc <<EOF echo "layout python3" > .envrc
if ! [[ -d .venv ]]; then
echo "Creating venv..."
# --system-site-packages so from inside venv I access global pylint/flake8/...
python$1 -m venv --system-site-packages .venv
fi
PATH=$(pwd)/.venv/bin/:\$PATH
EOF
direnv allow . direnv allow .
} }

View File

@ -39,10 +39,9 @@
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))) ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
) )
(use-package direnv (use-package envrc
:ensure t :ensure t
:config :init (envrc-global-mode))
(direnv-mode))
(use-package flycheck-grammalecte (use-package flycheck-grammalecte
:ensure t :ensure t
@ -72,9 +71,9 @@
(set-face-attribute 'lsp-face-highlight-textual nil (set-face-attribute 'lsp-face-highlight-textual nil
:background "#666" :foreground "#ffffff" :background "#666" :foreground "#ffffff"
) )
:hook (((python-mode) . lsp) :hook (((python-mode) . lsp-deferred)
(rust-mode) .lsp) (rust-mode) .lsp)
:commands lsp-mode :commands (lsp lsp-deferred)
) )
(use-package python (use-package python