-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String comments and function variables in Zed Python #63
Comments
(aka doc comments and variable parameters) |
It should be mentioned that differences in the appearance of code syntax highlighting can also be due to editor differences, and not the theme. Specifically I believe some of these issues are due to differences in Zed's Tree-sitter queries, if you are familiar with those. Could you share the code snippet in this screenshot so I can reference it in testing? |
@uncenter Yeah I get what you are saying. I could probably also adjust the doc comments and variable parameters syntax highlighting somewhere in my config, but this is of course not ideal for other users. def regression(
data: pd.DataFrame,
regression: str = "bias_detected ~ C(scenario)",
reg_type: str = "ols",
) -> None:
"Regression to find out impact of scenarios on bias detections"
# Regression
if reg_type == "ols":
model = smf.ols(regression, data=data)
elif reg_type == "mixedlm":
# Create column with bias + model
data["biasmodel"] = data["bias"] + data["model"]
model = smf.mixedlm(regression, data, groups=data["biasmodel"])
else:
raise ValueError("Invalid regression type")
# Fit the model
results = model.fit()
# Print the formula bold
print(
"\n#----------------------------------------------------------------------------#"
)
print("####### Regression formula: #######")
print(f"\033[1m{regression}\033[0m")
print("\n####### Regression results: #######")
print(results.summary()) |
The second issue you mention with function variables is a query issue in Zed and not fixable by us. Neovim queries: Zed doesn't have these, trying to get the Zed team to start adopting query captures like |
Still many differences compared to the neovim version (Catppuccin Frappé).
Neovim:
Zed:
Especially:
The text was updated successfully, but these errors were encountered: