aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-04-07 04:51:09 +0000
committerBlaž Hrastnik2021-04-07 04:51:09 +0000
commitfb792c5bcacee115949fd9311e4155fc4fa999fa (patch)
treeee03d6d96c57d5d34611f02d4e8305a6374c5c4b
parent3bab640491be6c065e7cf11672f49a1b41c15e99 (diff)
Add a python language definition.
-rw-r--r--languages.toml12
-rw-r--r--theme.toml4
2 files changed, 14 insertions, 2 deletions
diff --git a/languages.toml b/languages.toml
index 981fca09..72f30ca4 100644
--- a/languages.toml
+++ b/languages.toml
@@ -59,3 +59,15 @@ roots = []
path = "../helix-syntax/languages/tree-sitter-html"
indent = { tab-width = 2, unit = " " }
+
+[[language]]
+name = "python"
+scope = "source.python"
+injection-regex = "python"
+file-types = ["py"]
+roots = []
+path = "../helix-syntax/languages/tree-sitter-python"
+
+language-server = { command = "pyls" }
+# TODO: pyls needs utf-8 offsets
+indent = { tab-width = 2, unit = " " }
diff --git a/theme.toml b/theme.toml
index 6577544d..871a28b5 100644
--- a/theme.toml
+++ b/theme.toml
@@ -5,6 +5,7 @@
"operator" = "#dbbfef" # lilac
# "property" = "#a4a0e8" # lavender
"property" = "#ffffff" # white
+"variable" = "#a4a0e8" # lavender
"variable.parameter" = "#a4a0e8" # lavender
# TODO distinguish type from type.builtin?
"type" = "#ffffff" # white
@@ -12,6 +13,7 @@
"constructor" = "#dbbfef" # lilac
"function" = "#ffffff" # white
"function.macro" = "#dbbfef" # lilac
+"function.builtin" = "#ffffff" # white
"comment" = "#697C81" # sirocco
"variable.builtin" = "#9ff28f" # mint
"constant" = "#ffffff" # white
@@ -32,8 +34,6 @@
# concat (ERROR) @syntax-error and "MISSING ;" selectors for errors
"module" = "#ff0000"
-"variable" = "#a4a0e8" # lavender
-"function.builtin" = "#ff0000"
"ui.background" = { bg = "#3b224c" } # midnight
"ui.linenr" = { fg = "#5a5977" } # comet