mirror of
https://github.com/fred-drake/neovim.git
synced 2026-06-05 14:59:28 -05:00
Added csharp format support, cleaned neo-tree's aesthetics a bit
This commit is contained in:
@@ -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 %"
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
{ pkgs, ... }: {
|
|
||||||
plugins = {
|
|
||||||
conform-nvim = {
|
|
||||||
enable = true;
|
|
||||||
# settings = { formatters_by_ft.cs = [ "csharpier" ]; };
|
|
||||||
};
|
|
||||||
|
|
||||||
lsp.servers.csharp-ls = { enable = true; };
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -39,6 +39,11 @@
|
|||||||
group = "Debug";
|
group = "Debug";
|
||||||
icon = "";
|
icon = "";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
__unkeyed-1 = "<leader>c";
|
||||||
|
group = "Code Actions";
|
||||||
|
icon = "";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -288,5 +293,19 @@
|
|||||||
action = "<CMD>BufferLineCloseLeft<CR>";
|
action = "<CMD>BufferLineCloseLeft<CR>";
|
||||||
options = { desc = "Delete Buffers to the Left"; };
|
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"; };
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,7 +138,6 @@ in { pkgs, ... }: {
|
|||||||
enable = true;
|
enable = true;
|
||||||
sources.formatting = {
|
sources.formatting = {
|
||||||
black.enable = true;
|
black.enable = true;
|
||||||
csharpier.enable = true;
|
|
||||||
hclfmt.enable = true;
|
hclfmt.enable = true;
|
||||||
just.enable = true;
|
just.enable = true;
|
||||||
nixfmt.enable = true;
|
nixfmt.enable = true;
|
||||||
@@ -242,5 +241,11 @@ in { pkgs, ... }: {
|
|||||||
omnisharp.enable = true;
|
omnisharp.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
trouble = {
|
||||||
|
enable = true;
|
||||||
|
settings = { use_diagnostic_signs = true; };
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,32 @@
|
|||||||
|
|
||||||
neo-tree = {
|
neo-tree = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
popupBorderStyle = "rounded";
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
|
default_component_configs = {
|
||||||
|
diagnostics = {
|
||||||
|
symbols = {
|
||||||
|
hint = "";
|
||||||
|
info = "";
|
||||||
|
warn = "";
|
||||||
|
error = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
git_status = {
|
||||||
|
symbols = {
|
||||||
|
added = "";
|
||||||
|
deleted = "";
|
||||||
|
modified = "";
|
||||||
|
renamed = "";
|
||||||
|
untracked = "";
|
||||||
|
ignored = "";
|
||||||
|
unstaged = " ";
|
||||||
|
staged = "";
|
||||||
|
unmerged = "";
|
||||||
|
conflict = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
filesystem = {
|
filesystem = {
|
||||||
follow_current_file.enabled = true;
|
follow_current_file.enabled = true;
|
||||||
filtered_items = {
|
filtered_items = {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
module = { pkgs, ... }: {
|
module = { pkgs, ... }: {
|
||||||
imports = [ ./config ./config/csharp ];
|
imports = [ ./config ./config/csharp ];
|
||||||
extraPackages = with pkgs; [ sops dotnet-sdk_8 csharpier ];
|
extraPackages = with pkgs; [ sops ];
|
||||||
};
|
};
|
||||||
extraSpecialArgs = { };
|
extraSpecialArgs = { };
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user