emacs: Simplifying direnv creation.
see: - https://github.com/pappasam/jedi-language-server/issues/199 - https://github.com/emacs-lsp/lsp-mode/issues/3948
This commit is contained in:
parent
d136d2ff8f
commit
9f9d25d4ac
9
.bashrc
9
.bashrc
|
@ -215,14 +215,7 @@ venv()
|
|||
echo '`.envrc` file already exists!'
|
||||
return
|
||||
fi
|
||||
cat >.envrc <<EOF
|
||||
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
|
||||
echo "layout python3" > .envrc
|
||||
direnv allow .
|
||||
}
|
||||
|
||||
|
|
|
@ -39,10 +39,9 @@
|
|||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
|
||||
)
|
||||
|
||||
(use-package direnv
|
||||
(use-package envrc
|
||||
:ensure t
|
||||
:config
|
||||
(direnv-mode))
|
||||
:init (envrc-global-mode))
|
||||
|
||||
(use-package flycheck-grammalecte
|
||||
:ensure t
|
||||
|
@ -72,9 +71,9 @@
|
|||
(set-face-attribute 'lsp-face-highlight-textual nil
|
||||
:background "#666" :foreground "#ffffff"
|
||||
)
|
||||
:hook (((python-mode) . lsp)
|
||||
:hook (((python-mode) . lsp-deferred)
|
||||
(rust-mode) .lsp)
|
||||
:commands lsp-mode
|
||||
:commands (lsp lsp-deferred)
|
||||
)
|
||||
|
||||
(use-package python
|
||||
|
|
Loading…
Reference in New Issue