Added csharp format support, cleaned neo-tree's aesthetics a bit

This commit is contained in:
Fred Drake
2024-10-02 00:01:44 -04:00
parent 4972eb4147
commit 1b8b135353
7 changed files with 65 additions and 13 deletions
+14
View File
@@ -0,0 +1,14 @@
{
# Couldn't get csharpier to work with nixvim -- package requires Dotnet SDK v6
# but LSP requires v8. Workaround for now is to add csharpier as a tool in
# the solution itself, and add a hook here to reformat on save.
# TODO: Look at how to get rid of this hack
extraConfigLua = ''
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = "*.cs",
command = "silent !dotnet dotnet-csharpier %"
})
'';
}
-11
View File
@@ -1,11 +0,0 @@
{ pkgs, ... }: {
plugins = {
conform-nvim = {
enable = true;
# settings = { formatters_by_ft.cs = [ "csharpier" ]; };
};
lsp.servers.csharp-ls = { enable = true; };
};
}
+19
View File
@@ -39,6 +39,11 @@
group = "Debug";
icon = "";
}
{
__unkeyed-1 = "<leader>c";
group = "Code Actions";
icon = "";
}
];
};
};
@@ -288,5 +293,19 @@
action = "<CMD>BufferLineCloseLeft<CR>";
options = { desc = "Delete Buffers to the Left"; };
}
# Code Actions
{
mode = "n";
key = "H";
action = "<CMD>lua vim.diagnostic.open_float()<CR>";
options = { desc = "Popup Diagnostics"; };
}
{
mode = "n";
key = "<leader>cd";
action = "<CMD>Trouble diagnostics toggle<CR>";
options = { desc = "List All Diagnostics"; };
}
];
}
+6 -1
View File
@@ -138,7 +138,6 @@ in { pkgs, ... }: {
enable = true;
sources.formatting = {
black.enable = true;
csharpier.enable = true;
hclfmt.enable = true;
just.enable = true;
nixfmt.enable = true;
@@ -242,5 +241,11 @@ in { pkgs, ... }: {
omnisharp.enable = true;
};
};
trouble = {
enable = true;
settings = { use_diagnostic_signs = true; };
};
};
}
+25
View File
@@ -60,7 +60,32 @@
neo-tree = {
enable = true;
popupBorderStyle = "rounded";
extraOptions = {
default_component_configs = {
diagnostics = {
symbols = {
hint = "";
info = "";
warn = "";
error = "";
};
};
git_status = {
symbols = {
added = "";
deleted = "󰗨";
modified = "";
renamed = "";
untracked = "";
ignored = "";
unstaged = " ";
staged = "";
unmerged = "";
conflict = "";
};
};
};
filesystem = {
follow_current_file.enabled = true;
filtered_items = {
+1 -1
View File
@@ -38,7 +38,7 @@
inherit pkgs;
module = { pkgs, ... }: {
imports = [ ./config ./config/csharp ];
extraPackages = with pkgs; [ sops dotnet-sdk_8 csharpier ];
extraPackages = with pkgs; [ sops ];
};
extraSpecialArgs = { };
};