mirror of
https://github.com/fred-drake/neovim.git
synced 2026-06-05 14:59:28 -05:00
Initial CSharp support
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
plugins.dap = {
|
||||||
|
enable = true;
|
||||||
|
extensions = {
|
||||||
|
dap-ui.enable = true;
|
||||||
|
dap-virtual-text.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
plugins = {
|
||||||
|
conform-nvim = {
|
||||||
|
enable = true;
|
||||||
|
# settings = { formatters_by_ft.cs = [ "csharpier" ]; };
|
||||||
|
};
|
||||||
|
|
||||||
|
lsp.servers.csharp-ls = { enable = true; };
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@@ -34,12 +34,21 @@
|
|||||||
};
|
};
|
||||||
extraSpecialArgs = { };
|
extraSpecialArgs = { };
|
||||||
};
|
};
|
||||||
|
csharpNixvimModule = {
|
||||||
|
inherit pkgs;
|
||||||
|
module = { pkgs, ... }: {
|
||||||
|
imports = [ ./config ./config/csharp ];
|
||||||
|
extraPackages = with pkgs; [ sops dotnet-sdk_8 csharpier ];
|
||||||
|
};
|
||||||
|
extraSpecialArgs = { };
|
||||||
|
};
|
||||||
pkgs = import inputs.nixpkgs {
|
pkgs = import inputs.nixpkgs {
|
||||||
inherit system overlays;
|
inherit system overlays;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
baseNvim = nixvim'.makeNixvimWithModule baseNixvimModule;
|
baseNvim = nixvim'.makeNixvimWithModule baseNixvimModule;
|
||||||
rustNvim = nixvim'.makeNixvimWithModule rustNixvimModule;
|
rustNvim = nixvim'.makeNixvimWithModule rustNixvimModule;
|
||||||
|
csharpNvim = nixvim'.makeNixvimWithModule csharpNixvimModule;
|
||||||
in {
|
in {
|
||||||
checks = {
|
checks = {
|
||||||
# Run `nix flake check .` to verify that your config is not broken
|
# Run `nix flake check .` to verify that your config is not broken
|
||||||
@@ -51,6 +60,8 @@
|
|||||||
default = baseNvim;
|
default = baseNvim;
|
||||||
# Lets you run `nix run .#rust` to start nixvim with Rust configuration
|
# Lets you run `nix run .#rust` to start nixvim with Rust configuration
|
||||||
rust = rustNvim;
|
rust = rustNvim;
|
||||||
|
# Lets you run `nix run .#csharp` to start nixvim with C# configuration
|
||||||
|
csharp = csharpNvim;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user