diff --git a/.config/helix/languages.toml b/.config/helix/languages.toml new file mode 100644 index 0000000..84afbd3 --- /dev/null +++ b/.config/helix/languages.toml @@ -0,0 +1,12 @@ +[[language]] +name = "python" +roots = ["pyproject.toml"] +language-servers = ["pyright", "ruff"] +auto-format = true + +[language-server.pyright] +command = "pyright-langserver" +args = ["--stdio"] + +[language-server.ruff] +command = "ruff-lsp" diff --git a/.config/helix/themes/base16_qvp.toml b/.config/helix/themes/base16_qvp.toml index 0c6a9b4..0aae6bd 100644 --- a/.config/helix/themes/base16_qvp.toml +++ b/.config/helix/themes/base16_qvp.toml @@ -18,7 +18,7 @@ "ui.text" = "base05" "operator" = "base05" "ui.text.focus" = "base05" -"variable" = "base08" +"variable" = "base09" "constant.numeric" = "base09" "constant" = "base09" "attribute" = "base09" @@ -26,12 +26,12 @@ "ui.cursor.match" = { fg = "base0A", modifiers = ["underlined"] } "string" = "base0B" "variable.other.member" = "base08" -"constant.character.escape" = "base0C" +"constant.character.escape" = "base08" "function" = "base0D" "constructor" = "base0D" "special" = "base0D" "keyword" = "base0E" -"label" = "base0E" +"label" = "base0A" "namespace" = "base0E" "ui.help" = { fg = "base06", bg = "base01" } diff --git a/.config/ruff/pyproject.toml b/.config/ruff/pyproject.toml new file mode 100644 index 0000000..76013d0 --- /dev/null +++ b/.config/ruff/pyproject.toml @@ -0,0 +1,50 @@ +[tool.ruff] +line-length = 120 +indent-width = 4 + +# Dismissed selections: +# - CPY: Copyright notice screamer; I don't care +# - TD: Overly opinionated on FIXME/TODO format. FIX covers better +select = [ + "ANN", # enforce type annotations + "A", # prevent using keywords that clobber python builtins + "ARG", # argument usage checking + "B", # bugbear: security warnings + "C4", # generator usage + "C90", # mccabe code complexity + "COM", # comma usage + "D", # pydocstyle + "DTZ", # datetimez sanity + "E", # pycodestyle errors + "EM", # error message handling + "F", # pyflakes - should be enabled but make explicit + "ERA", # commented code screamer + "FBT", # boolean traps + "FIX", # fixme screamer + "F", # pyflakes + "G", # logging handling + "I", # isort + "ISC", # implicit string concatenation + "PIE", # pie stuff + "PL", # pylint rules + "PTH", # pathlib usage + "Q", # quote handling + "RET", # return handling + "RUF", # the ruff developer's own rules + "SIM", # simplification options + "UP", # alert you when better syntax is available in your python version + "W", # pycodestyle warnings +] + +ignore = [ + "ANN101", # No type hint for "self" - not necessary and makes noisy code + "D211", # No line before class, incompatible with D203 - one line before class + "D212", # Summary on first line; incompatible with D213 - summary on second line + "D400" # Summary should end with period - duplicates D415 - summary ends with punctuation +] + +[tool.ruff.format] +quote-style = "double" +indent-style = "space" +skip-magic-trailing-comma = false +