treewide: format all files (#57)

Run `nix fmt` at the root of the repository to format all files. I've
done this on my fork and this will help me merge your changes later
without having to deal with un-formatted files.
This commit is contained in:
Wael Nasreddine 2024-11-26 00:47:49 -08:00 committed by GitHub
parent 70f8b2360f
commit 0f42b0eebb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 369 additions and 164 deletions

View file

@ -2,7 +2,10 @@
plugins.nvim-autopairs = {
enable = true;
settings = {
disable_filetype = ["TelescopePrompt" "vim"];
disable_filetype = [
"TelescopePrompt"
"vim"
];
};
};
}

View file

@ -4,8 +4,12 @@
};
plugins.copilot-lua = {
enable = true;
suggestion = {enabled = false;};
panel = {enabled = false;};
suggestion = {
enabled = false;
};
panel = {
enabled = false;
};
};
extraConfigLua = ''

View file

@ -1,28 +1,40 @@
{
plugins = {
cmp-emoji = {enable = true;};
cmp-emoji = {
enable = true;
};
cmp = {
enable = true;
settings = {
autoEnableSources = true;
experimental = {ghost_text = false;};
experimental = {
ghost_text = false;
};
performance = {
debounce = 60;
fetchingTimeout = 200;
maxViewEntries = 30;
};
snippet = {expand = "luasnip";};
formatting = {fields = ["kind" "abbr" "menu"];};
snippet = {
expand = "luasnip";
};
formatting = {
fields = [
"kind"
"abbr"
"menu"
];
};
sources = [
{name = "git";}
{name = "nvim_lsp";}
{name = "emoji";}
{ name = "git"; }
{ name = "nvim_lsp"; }
{ name = "emoji"; }
{
name = "buffer"; # text within current buffer
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
keywordLength = 3;
}
{name = "copilot";}
{ name = "copilot"; }
{
name = "path"; # file system paths
keywordLength = 3;
@ -34,8 +46,12 @@
];
window = {
completion = {border = "solid";};
documentation = {border = "solid";};
completion = {
border = "solid";
};
documentation = {
border = "solid";
};
};
mapping = {
@ -51,11 +67,21 @@
};
};
};
cmp-nvim-lsp = {enable = true;}; # lsp
cmp-buffer = {enable = true;};
cmp-path = {enable = true;}; # file system paths
cmp_luasnip = {enable = true;}; # snippets
cmp-cmdline = {enable = false;}; # autocomplete for cmdline
cmp-nvim-lsp = {
enable = true;
}; # lsp
cmp-buffer = {
enable = true;
};
cmp-path = {
enable = true;
}; # file system paths
cmp_luasnip = {
enable = true;
}; # snippets
cmp-cmdline = {
enable = false;
}; # autocomplete for cmdline
};
extraConfigLua = ''
luasnip = require("luasnip")

View file

@ -1,7 +1,7 @@
{
plugins = {
indent-blankline = {
enable = true;
};
enable = true;
};
};
}

View file

@ -1,7 +1,12 @@
{
plugins.neo-tree = {
enable = true;
sources = ["filesystem" "buffers" "git_status" "document_symbols"];
sources = [
"filesystem"
"buffers"
"git_status"
"document_symbols"
];
addBlankLineAtTop = false;
filesystem = {
@ -37,10 +42,12 @@
keymaps = [
{
mode = ["n"];
mode = [ "n" ];
key = "<leader>e";
action = "<cmd>Neotree toggle<cr>";
options = {desc = "Open/Close Neotree";};
options = {
desc = "Open/Close Neotree";
};
}
];
}

View file

@ -3,11 +3,28 @@ _: {
enable = true;
settings = {
colors = {
error = ["DiagnosticError" "ErrorMsg" "#ED8796"];
warning = ["DiagnosticWarn" "WarningMsg" "#EED49F"];
info = ["DiagnosticInfo" "#EED49F"];
default = ["Identifier" "#F5A97F"];
test = ["Identifier" "#8AADF4"];
error = [
"DiagnosticError"
"ErrorMsg"
"#ED8796"
];
warning = [
"DiagnosticWarn"
"WarningMsg"
"#EED49F"
];
info = [
"DiagnosticInfo"
"#EED49F"
];
default = [
"Identifier"
"#F5A97F"
];
test = [
"Identifier"
"#8AADF4"
];
};
};
};

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
plugins.treesitter = {
enable = true;
settings = {

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
extraPlugins = with pkgs.vimPlugins; [
lazygit-nvim
];

View file

@ -2,7 +2,8 @@
lib,
pkgs,
...
}: {
}:
{
config = {
extraConfigLuaPre =
# lua
@ -105,8 +106,8 @@
"black"
"isort"
];
lua = ["stylua"];
nix = ["nixfmt-rfc-style"];
lua = [ "stylua" ];
nix = [ "nixfmt-rfc-style" ];
markdown = [
[
"prettierd"
@ -119,15 +120,15 @@
"prettier"
]
];
terraform = ["terraform_fmt"];
bicep = ["bicep"];
terraform = [ "terraform_fmt" ];
bicep = [ "bicep" ];
bash = [
"shellcheck"
"shellharden"
"shfmt"
];
json = ["jq"];
"_" = ["trim_whitespace"];
json = [ "jq" ];
"_" = [ "trim_whitespace" ];
};
formatters = {

View file

@ -3,7 +3,7 @@
enable = true;
logger = {
level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
floatPrecision = 0.01; # Limit the number of decimals displayed for floats
floatPrecision = 1.0e-2; # Limit the number of decimals displayed for floats
};
progress = {
pollRate = 0; # How and when to poll for progress messages
@ -23,7 +23,7 @@
''
function(msg) return msg.lsp_client.name end
'';
ignore = []; # List of LSP servers to ignore
ignore = [ ]; # List of LSP servers to ignore
lsp = {
progressRingbufSize = 0; # Configure the nvim's LSP progress ring buffer size
};

View file

@ -1,22 +1,49 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
plugins = {
lsp-lines = {enable = true;};
lsp-format = {enable = true;};
helm = {enable = true;};
lsp-lines = {
enable = true;
};
lsp-format = {
enable = true;
};
helm = {
enable = true;
};
lsp = {
enable = true;
inlayHints = true;
servers = {
html = {enable = true;};
lua_ls = {enable = true;};
nil_ls = {enable = true;};
ts_ls = {enable = true;};
marksman = {enable = true;};
pyright = {enable = true;};
gopls = {enable = true;};
terraformls = {enable = true;};
ansiblels = {enable = true;};
jsonls = {enable = true;};
html = {
enable = true;
};
lua_ls = {
enable = true;
};
nil_ls = {
enable = true;
};
ts_ls = {
enable = true;
};
marksman = {
enable = true;
};
pyright = {
enable = true;
};
gopls = {
enable = true;
};
terraformls = {
enable = true;
};
ansiblels = {
enable = true;
};
jsonls = {
enable = true;
};
helm_ls = {
enable = true;
extraOptions = {

View file

@ -47,17 +47,17 @@
background = true;
};
virtual_text = {
errors = ["italic"];
hints = ["italic"];
information = ["italic"];
warnings = ["italic"];
ok = ["italic"];
errors = [ "italic" ];
hints = [ "italic" ];
information = [ "italic" ];
warnings = [ "italic" ];
ok = [ "italic" ];
};
underlines = {
errors = ["underline"];
hints = ["underline"];
information = ["underline"];
warnings = ["underline"];
errors = [ "underline" ];
hints = [ "underline" ];
information = [ "underline" ];
warnings = [ "underline" ];
};
};
};

View file

@ -9,7 +9,10 @@ _: {
"neo-tree"
];
disabledFiletypes = {
statusline = ["startup" "alpha"];
statusline = [
"startup"
"alpha"
];
};
theme = "catppuccin";
};
@ -37,7 +40,7 @@ _: {
lualine_c = [
{
__unkeyed-1 = "diagnostics";
sources = ["nvim_lsp"];
sources = [ "nvim_lsp" ];
symbols = {
error = " ";
warn = " ";

View file

@ -74,7 +74,10 @@
};
options = {
paddings = [1 3];
paddings = [
1
3
];
};
parts = [

View file

@ -1,4 +1,7 @@
{pkgs, ...}: {
extraPlugins = with pkgs.vimPlugins; [
];
{ pkgs, ... }:
{
extraPlugins =
with pkgs.vimPlugins;
[
];
}

View file

@ -9,7 +9,7 @@
try_as_border = true;
};
};
surround = {};
surround = { };
};
};
}

View file

@ -12,7 +12,7 @@
subdir = "templates";
dateFormat = "%Y-%m-%d";
timeFormat = "%H:%M";
substitutions = {};
substitutions = { };
};
dailyNotes = {