1
0
Fork 0

Add diagnostics plugin and icons to Neovim configuration

This commit is contained in:
Avery 2025-03-11 13:53:51 +00:00
parent 1178b3ee53
commit 2d0d477a99
Signed by: Avery
GPG key ID: B684FD451B692E04
4 changed files with 193 additions and 139 deletions

View file

@ -7,6 +7,7 @@
./none-ls.nix
./treesitter.nix
./telescope.nix
./trouble.nix
];
programs.nixvim = {
enable = true;

View file

@ -1,7 +1,21 @@
{ pkgs, ... }: {
{ ... }: {
programs.nixvim.plugins = {
lsp = {
enable = true;
keymaps.lspBuf."<leader>ca" = "code_action";
luaConfig.post = ''
local signs = {
Error = "",
Warn = "",
Hint = "",
Info = ""
}
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, {text = icon, texthl = hl, numhl = hl})
end
'';
servers = {
cssls.enable = true;
dartls.enable = true;

View file

@ -1,11 +1,9 @@
{ ... }: {
programs.nixvim = {
keymaps = [
{
keymaps = [{
action = "<cmd>Neotree toggle<CR>";
key = "<leader>fi";
}
];
}];
plugins.neo-tree = {
enable = true;
closeIfLastWindow = true;
@ -15,14 +13,13 @@
winbar = true;
statusline = false;
tabsLayout = "equal";
sources = [
{ source = "filesystem"; displayName = " 󰉓 Archivos "; }
];
sources = [{
source = "filesystem";
displayName = " 󰉓 Archivos ";
}];
};
defaultComponentConfigs = {
container = {
enableCharacterFade = true;
};
container = { enableCharacterFade = true; };
indent = {
indentSize = 2;
padding = 1;
@ -56,11 +53,11 @@
added = "";
modified = "";
deleted = "";
renamed = "";
renamed = "";
untracked = "";
ignored = "";
unstaged = "U";
staged = "";
ignored = "";
unstaged = "";
staged = "";
conflict = "";
};
};
@ -68,7 +65,7 @@
symbols = {
error = "";
warn = "";
hint = "";
hint = "";
info = "";
};
highlights = {
@ -93,16 +90,12 @@
visible = false;
hideDotfiles = false;
hideGitignored = false;
hideByName = [
"nodeModules"
];
hideByName = [ "nodeModules" ];
};
groupEmptyDirs = false;
useLibuvFileWatcher = true;
};
buffers = {
groupEmptyDirs = true;
};
buffers = { groupEmptyDirs = true; };
renderers = {
directory = [
"indent"
@ -146,12 +139,33 @@
{
name = "container";
content = [
{ name = "name"; zindex = 10; }
{ name = "clipboard"; zindex = 10;}
{ name = "bufnr"; zindex = 10;}
{ name = "modified"; zindex = 20; align = "right";}
{ name = "diagnostics"; zindex = 20; align = "right";}
{ name = "git_status"; zindex = 15; align = "right";}
{
name = "name";
zindex = 10;
}
{
name = "clipboard";
zindex = 10;
}
{
name = "bufnr";
zindex = 10;
}
{
name = "modified";
zindex = 20;
align = "right";
}
{
name = "diagnostics";
zindex = 20;
align = "right";
}
{
name = "git_status";
zindex = 15;
align = "right";
}
];
}
];

View file

@ -0,0 +1,25 @@
{ ... }: {
programs.nixvim = {
plugins.trouble = {
enable = true;
settings = {
auto_refresh = true;
focus = true;
follow = false;
keys = {
"<cr>" = "jump_close";
"s" = "jump_vsplit";
"S" = "jump_split";
};
win = {
type = "float";
border = "rounded";
};
};
};
keymaps = [{
action = "<cmd>Trouble diagnostics toggle<cr>";
key = "<leader>dg";
}];
};
}