feat: load helix files from files

This commit is contained in:
Giulio De Pasquale 2024-11-17 14:15:29 +00:00
parent 71f4de2804
commit d9e6d1acd4
3 changed files with 51 additions and 53 deletions

View File

@ -2,7 +2,8 @@
let let
actualPkgs = pkgs.unstablePkgs; actualPkgs = pkgs.unstablePkgs;
lib = actualPkgs.lib;
nodePkgs = with actualPkgs.nodePackages; [ nodePkgs = with actualPkgs.nodePackages; [
vscode-langservers-extracted vscode-langservers-extracted
typescript typescript
@ -48,58 +49,8 @@ in
}; };
file = { file = {
".config/helix/config.toml".text = '' ".config/helix/config.toml".text = lib.readFile ./helix/config.toml;
theme = "monokai_pro_spectrum" ".config/helix/languages.toml".text = lib.readFile ./helix/languages.toml;
[editor]
cursorline = true
true-color = true
gutters = ["diff", "diagnostics", "line-numbers", "spacer"]
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.lsp]
display-messages = true
[editor.indent-guides]
render = true
[editor.statusline]
left = ["mode", "spinner"]
center = ["file-name"]
'';
".config/helix/languages.toml".text = ''
[[language]]
name = "nix"
formatter = { command = "nixpkgs-fmt" }
language-servers = ["nixd"]
[language-server.nixd]
command = "nixd"
[language-server.pylsp.config.pylsp.plugins]
ruff = {enabled = true}
rope = {enabled = true}
mypy = {enabled = true}
[[language]]
name = "bash"
formatter = { command = "shfmt", args = ["-s", "-ci", "-sr"] }
[[language]]
name = "go"
language-servers = ["gopls", "golangci-lint-langserver"]
[language-server.golangci-lint-langserver]
command = "golangci-lint-langserver"
[language-server.golangci-lint-langserver.config]
command = ["golangci-lint", "run", "--out-format", "json", "--issues-exit-code=1"]
'';
}; };
}; };
} }

View File

@ -0,0 +1,21 @@
theme = "monokai_pro_spectrum"
[editor]
cursorline = true
true-color = true
gutters = ["diff", "diagnostics", "line-numbers", "spacer"]
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.lsp]
display-messages = true
[editor.indent-guides]
render = true
[editor.statusline]
left = ["mode", "spinner"]
center = ["file-name"]

View File

@ -0,0 +1,26 @@
[[language]]
name = "nix"
formatter = { command = "nixpkgs-fmt" }
language-servers = ["nixd"]
[language-server.nixd]
command = "nixd"
[language-server.pylsp.config.pylsp.plugins]
ruff = {enabled = true}
rope = {enabled = true}
mypy = {enabled = true}
[[language]]
name = "bash"
formatter = { command = "shfmt", args = ["-s", "-ci", "-sr"] }
[[language]]
name = "go"
language-servers = ["gopls", "golangci-lint-langserver"]
[language-server.golangci-lint-langserver]
command = "golangci-lint-langserver"
[language-server.golangci-lint-langserver.config]
command = ["golangci-lint", "run", "--out-format", "json", "--issues-exit-code=1"]