aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/cfg/helix.nix89
1 files changed, 83 insertions, 6 deletions
diff --git a/share/cfg/helix.nix b/share/cfg/helix.nix
index a847ad6..4a185ce 100644
--- a/share/cfg/helix.nix
+++ b/share/cfg/helix.nix
@@ -1,4 +1,16 @@
-{ pkgs, ... }: {
+{
+ # inputs,
+ pkgs
+, # config,
+ # lib,
+ ...
+}:
+# let
+# inherit (lib) mkIf;
+# cfg = config.programs.helix;
+# jsonFormat = pkgs.formats.json { };
+# in
+{
programs.helix = {
extraPackages = with pkgs; [
rust-analyzer
@@ -12,6 +24,9 @@
vscode-langservers-extracted
nodePackages.typescript-language-server
nodePackages."@astrojs/language-server"
+ cmake-language-server
+ cmake-format
+ # inputs.snippets-ls
];
settings = {
@@ -52,23 +67,85 @@
typescript.tsdk = "${pkgs.typescript}/lib/node_modules/typescript/lib";
environment = "node";
};
+ # language-server.snippets-html = {
+ # command = "snippets-ls";
+ # args = [
+ # "-config"
+ # config.xdg.configFile."helix/snippets/html.json".target
+ # ];
+ # };
};
language = [
{
name = "html";
- language-servers = [ "vscode-html-language-server" "emmet-ls" ];
+ language-servers = [
+ "vscode-html-language-server"
+ "emmet-ls"
+ # "snippets-html"
+ ];
}
{
name = "astro";
scope = "source.astro";
injection-regex = "astro";
file-types = [ "astro" ];
- roots = [ "package.json" "astro.config.mjs" ];
- language-servers = [ "astro-ls" "emmet-ls" ];
+ roots = [
+ "package.json"
+ "astro.config.mjs"
+ ];
+ language-servers = [
+ "astro-ls"
+ "emmet-ls"
+ ];
auto-format = true;
}
+ {
+ name = "nix";
+ auto-format = true;
+ formatter = {
+ command = "nixfmt";
+ args = [ "-" ];
+ };
+ }
+ {
+ name = "cpp";
+ auto-format = true;
+ formatter.command = "clang-format";
+ }
+ {
+ name = "cmake";
+ auto-format = true;
+ formatter = {
+ command = "cmake-format";
+ args = [ "-" ];
+ };
+ }
];
- };
- };
+ }; # end of languages
+ }; # end of programs.helix
+
+ # xdg.configFile = {
+ # "helix/snippets/html.json" = mkIf cfg.enable {
+ # source = jsonFormat.generate "html-snippets" {
+ # "html doc" = {
+ # isFileTemplate = true;
+ # prefix = [ "!" ];
+ # body = [
+ # "<!DOCTYPE html>"
+ # "<html>"
+ # "<head>"
+ # ''\t<meta charset=\"UTF-8\" />''
+ # ''\t<title>$\{1:title}</title>''
+ # "</head>"
+ # "<body>"
+ # ''\t$0''
+ # "</body>"
+ # "</html>"
+ # ];
+ # description = "HTML Document";
+ # };
+ # };
+ # };
+ # };
}