mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 07:35:38 +00:00
use direnv instead of poetry
This commit is contained in:
parent
2177397947
commit
41eff7f1d8
13
direnvrc.symlink
Normal file
13
direnvrc.symlink
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
layout_poetry() {
|
||||||
|
if [[ ! -f pyproject.toml ]]; then
|
||||||
|
log_error 'No pyproject.toml found. Use `poetry new` or `poetry init` to create one first.'
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# create venv if it doesn't exist
|
||||||
|
poetry run true
|
||||||
|
|
||||||
|
export VIRTUAL_ENV=$(poetry env info --path)
|
||||||
|
export POETRY_ACTIVE=1
|
||||||
|
PATH_add "$VIRTUAL_ENV/bin"
|
||||||
|
}
|
@ -138,10 +138,7 @@ require("packer").startup(function(use)
|
|||||||
require("lspconfig").rust_analyzer.setup({ capabilities = capabilities })
|
require("lspconfig").rust_analyzer.setup({ capabilities = capabilities })
|
||||||
require("lspconfig").tflint.setup({ capabilities = capabilities })
|
require("lspconfig").tflint.setup({ capabilities = capabilities })
|
||||||
require("lspconfig").terraformls.setup({ capabilities = capabilities })
|
require("lspconfig").terraformls.setup({ capabilities = capabilities })
|
||||||
-- require("lspconfig").pyright.setup({
|
require("lspconfig").pyright.setup({ capabilities = capabilities })
|
||||||
-- cmd = { "poetry", "run", "pyright-langserver", "--stdio" },
|
|
||||||
-- capabilities = capabilities,
|
|
||||||
-- })
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -160,10 +157,7 @@ require("packer").startup(function(use)
|
|||||||
require("null-ls").setup({
|
require("null-ls").setup({
|
||||||
sources = {
|
sources = {
|
||||||
require("null-ls").builtins.formatting.stylua,
|
require("null-ls").builtins.formatting.stylua,
|
||||||
-- require("null-ls").builtins.formatting.black.with({
|
require("null-ls").builtins.formatting.black,
|
||||||
-- command = "poetry",
|
|
||||||
-- args = { "run", "black", "--quiet", "--fast", "-" },
|
|
||||||
-- }),
|
|
||||||
require("null-ls").builtins.formatting.fish_indent,
|
require("null-ls").builtins.formatting.fish_indent,
|
||||||
require("null-ls").builtins.formatting.nixfmt,
|
require("null-ls").builtins.formatting.nixfmt,
|
||||||
require("null-ls").builtins.formatting.rustfmt,
|
require("null-ls").builtins.formatting.rustfmt,
|
||||||
|
@ -5,6 +5,7 @@ format = """\
|
|||||||
$git_branch\
|
$git_branch\
|
||||||
$git_commit\
|
$git_commit\
|
||||||
$git_status\
|
$git_status\
|
||||||
|
$python\
|
||||||
$character\
|
$character\
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user