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!'
|
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 .
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue