1776604546
This commit is contained in:
@@ -9,14 +9,6 @@ in {
|
||||
programs.helix.enable = true;
|
||||
programs.helix = {
|
||||
# defaultEditor = true;
|
||||
package = pkgs.helix.overrideAttrs (previousAttrs: {
|
||||
patches =
|
||||
(previousAttrs.patches or [])
|
||||
++ [
|
||||
./loader.patch
|
||||
./term.patch
|
||||
];
|
||||
});
|
||||
|
||||
settings = {
|
||||
editor = {
|
||||
@@ -120,7 +112,7 @@ in {
|
||||
name = "typst";
|
||||
auto-format = true;
|
||||
formatter.command = getExe pkgs.typstyle;
|
||||
formatter.args = ["-l" "100"];
|
||||
formatter.args = ["-l" "120"];
|
||||
language-servers = ["tinymist"];
|
||||
}
|
||||
{
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/helix-loader/src/config.rs
|
||||
+++ b/helix-loader/src/config.rs
|
||||
@@ -11,7 +11,6 @@ pub fn default_lang_config() -> toml::Value {
|
||||
pub fn user_lang_config() -> Result<toml::Value, toml::de::Error> {
|
||||
let config = [
|
||||
crate::config_dir(),
|
||||
- crate::find_workspace().0.join(".helix"),
|
||||
]
|
||||
.into_iter()
|
||||
.map(|path| path.join("languages.toml"))
|
||||
@@ -1,17 +0,0 @@
|
||||
--- a/helix-term/src/config.rs
|
||||
+++ b/helix-term/src/config.rs
|
||||
@@ -58,12 +58,11 @@ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
impl Config {
|
||||
pub fn load(
|
||||
global: Result<String, ConfigLoadError>,
|
||||
- local: Result<String, ConfigLoadError>,
|
||||
+ _local: Result<String, ConfigLoadError>,
|
||||
) -> Result<Config, ConfigLoadError> {
|
||||
let global_config: Result<ConfigRaw, ConfigLoadError> =
|
||||
global.and_then(|file| toml::from_str(&file).map_err(ConfigLoadError::BadConfig));
|
||||
- let local_config: Result<ConfigRaw, ConfigLoadError> =
|
||||
- local.and_then(|file| toml::from_str(&file).map_err(ConfigLoadError::BadConfig));
|
||||
+ let local_config: Result<ConfigRaw, ConfigLoadError> = Err(ConfigLoadError::default());
|
||||
let res = match (global_config, local_config) {
|
||||
(Ok(global), Ok(local)) => {
|
||||
let mut keys = keymap::default();
|
||||
@@ -47,12 +47,12 @@ in {
|
||||
"Typst" = {
|
||||
language_servers = ["tinymist"];
|
||||
format_on_save = "on";
|
||||
# formatter = {
|
||||
# external = {
|
||||
# command = getExe pkgs.typstyle;
|
||||
# arguments = ["-i" "{buffer_path}"];
|
||||
# };
|
||||
# };
|
||||
formatter = {
|
||||
external = {
|
||||
command = getExe pkgs.typstyle;
|
||||
arguments = ["-l" "120"];
|
||||
};
|
||||
};
|
||||
};
|
||||
"Python" = {
|
||||
format_on_save = "on";
|
||||
@@ -63,7 +63,7 @@ in {
|
||||
};
|
||||
}
|
||||
];
|
||||
language_servers = ["ruff"];
|
||||
language_servers = ["ruff" "pylsp"];
|
||||
};
|
||||
};
|
||||
lsp = {
|
||||
@@ -100,9 +100,15 @@ in {
|
||||
# path = getExe pkgs.rust-analyzer;
|
||||
# };
|
||||
# };
|
||||
pylsp = {
|
||||
binary = {
|
||||
# arguments = ["server"];
|
||||
path = getExe pkgs.python313Packages.python-lsp-server;
|
||||
};
|
||||
};
|
||||
ruff = {
|
||||
binary = {
|
||||
arguments = [];
|
||||
arguments = ["server"];
|
||||
path = getExe pkgs.ruff;
|
||||
};
|
||||
};
|
||||
@@ -133,6 +139,7 @@ in {
|
||||
};
|
||||
yaml-language-server = {
|
||||
binary = {
|
||||
arguments = ["--stdio"];
|
||||
path = getExe pkgs.yaml-language-server;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user