Added Golang support

This commit is contained in:
Fred Drake
2024-10-02 21:30:59 -04:00
parent d8dc1cbd83
commit 50675505f7
5 changed files with 44 additions and 2 deletions
+6
View File
@@ -0,0 +1,6 @@
{ pkgs, ... }: {
plugins.dap.extensions.dap-go = {
enable = true;
delve.path = "${pkgs.delve}/bin/dlv";
};
}
+16
View File
@@ -0,0 +1,16 @@
let
# Read all files in the current directory
files = builtins.readDir ./.;
# Filter out default.nix and non-.nix files
nixFiles = builtins.filter
(name: name != "default.nix" && builtins.match ".*\\.nix" name != null)
(builtins.attrNames files);
# Create a list of import statements
imports = map (name: ./. + "/${name}") nixFiles;
in {
# Import all configuration modules automatically
imports = imports;
}
+10
View File
@@ -0,0 +1,10 @@
{
plugins = {
conform-nvim = {
enable = true;
settings = { formatters_by_ft.go = [ "golines" ]; };
};
lsp.servers.gopls.enable = true;
none-ls.sources.formatting.golines.enable = true;
};
}