Reformatted to alejandra style

This commit is contained in:
Fred Drake
2024-10-03 21:33:17 -04:00
parent ced6c4d36e
commit 53e75b11ce
11 changed files with 405 additions and 382 deletions
+3 -6
View File
@@ -70,8 +70,7 @@
{
type = "button";
val = " Find File ";
on_press.__raw =
"function() require('telescope.builtin').find_files() end";
on_press.__raw = "function() require('telescope.builtin').find_files() end";
opts = {
shortcut = "f";
keymap = [
@@ -97,8 +96,7 @@
{
type = "button";
val = " Recent Files ";
on_press.__raw =
"function() require('telescope.builtin').oldfiles() end";
on_press.__raw = "function() require('telescope.builtin').oldfiles() end";
opts = {
shortcut = "r";
keymap = [
@@ -124,8 +122,7 @@
{
type = "button";
val = " Find Text ";
on_press.__raw =
"function() require('telescope.builtin').live_grep() end";
on_press.__raw = "function() require('telescope.builtin').live_grep() end";
opts = {
shortcut = "g";
keymap = [
+8 -10
View File
@@ -1,4 +1,4 @@
{ pkgs, ... }: {
{pkgs, ...}: {
plugins = {
cmp-dap.enable = true;
dap = {
@@ -6,9 +6,9 @@
extensions = {
dap-ui = {
enable = true;
floating.mappings = { close = [ "<ESC>" "q" ]; };
floating.mappings = {close = ["<ESC>" "q"];};
};
dap-virtual-text = { enable = true; };
dap-virtual-text = {enable = true;};
};
signs = {
dapBreakpoint = {
@@ -31,8 +31,7 @@
{
mode = "n";
key = "<leader>dB";
action =
"\n <cmd>lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<cr>\n ";
action = "\n <cmd>lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<cr>\n ";
options = {
silent = true;
desc = "Breakpoint Condition";
@@ -192,7 +191,7 @@
};
}
{
mode = [ "n" "v" ];
mode = ["n" "v"];
key = "<leader>de";
action = "<cmd>lua require('dapui').eval()<cr>";
options = {
@@ -203,9 +202,8 @@
{
mode = "n";
key = "<leader>df";
action =
"<CMD>lua require('dap.ext.vscode').load_launchjs()<CR><CMD>Telescope dap configurations<CR>";
options = { desc = "Debug Configurations"; };
action = "<CMD>lua require('dap.ext.vscode').load_launchjs()<CR><CMD>Telescope dap configurations<CR>";
options = {desc = "Debug Configurations";};
}
];
@@ -216,5 +214,5 @@
require('dap').listeners.before.event_exited['dapui_config'] = require('dapui').close
'';
extraPlugins = [ (pkgs.vimPlugins.telescope-dap-nvim) ];
extraPlugins = [(pkgs.vimPlugins.telescope-dap-nvim)];
}
+1 -2
View File
@@ -7,8 +7,7 @@ let
# Create a list of import statements
imports = map (name: ./. + "/${name}") nixFiles;
in
{
in {
# Import all configuration modules automatically
imports = imports;
}
+12 -14
View File
@@ -5,11 +5,11 @@
keymaps = {
"<leader>/" = {
action = "live_grep";
options = { desc = "Live Grep"; };
options = {desc = "Live Grep";};
};
"<leader>," = {
action = "buffers";
options = { desc = "Switch Buffer"; };
options = {desc = "Switch Buffer";};
settings = {
sort_mru = true;
sort_lastused = true;
@@ -17,39 +17,39 @@
};
"<leader>ff" = {
action = "files";
options = { desc = "Find Files"; };
options = {desc = "Find Files";};
};
"<leader>fr" = {
action = "oldfiles";
options = { desc = "Recent Files"; };
options = {desc = "Recent Files";};
};
"<leader>gc" = {
action = "git_commits";
options = { desc = "Git Commits"; };
options = {desc = "Git Commits";};
};
"<leader>gs" = {
action = "git_status";
options = { desc = "Git Status"; };
options = {desc = "Git Status";};
};
"<leader>s\"" = {
action = "registers";
options = { desc = "Registers"; };
options = {desc = "Registers";};
};
"<leader>sd" = {
action = "diagnostics_document";
options = { desc = "Document Diagnostics"; };
options = {desc = "Document Diagnostics";};
};
"<leader>sD" = {
action = "diagnostics_workspace";
options = { desc = "Workspace Diagnostics"; };
options = {desc = "Workspace Diagnostics";};
};
"<leader>sh" = {
action = "help_tags";
options = { desc = "Help Pages"; };
options = {desc = "Help Pages";};
};
"<leader>sk" = {
action = "keymaps";
options = { desc = "Key Maps"; };
options = {desc = "Key Maps";};
};
};
};
@@ -59,11 +59,9 @@
keymaps = {
todoTelescope = {
key = "<leader>st";
keywords = [ "TODO" ];
keywords = ["TODO"];
};
};
};
};
}
+49 -53
View File
@@ -64,19 +64,19 @@
mode = "i";
key = "jk";
action = "<CMD>noh<CR><ESC>";
options = { desc = "Normal mode and clear highlight"; };
options = {desc = "Normal mode and clear highlight";};
}
{
mode = "i";
key = "<ESC>";
action = "<CMD>noh<CR><ESC>";
options = { desc = "Normal mode and clear highlight"; };
options = {desc = "Normal mode and clear highlight";};
}
{
mode = "n";
key = "<ESC>";
action = "<CMD>noh<CR><ESC>";
options = { desc = "Normal mode and clear highlight"; };
options = {desc = "Normal mode and clear highlight";};
}
# Add undo breakpoints
@@ -84,26 +84,26 @@
mode = "i";
key = ",";
action = ",<C-g>u";
options = { desc = "Undo breakpoint"; };
options = {desc = "Undo breakpoint";};
}
{
mode = "i";
key = ".";
action = ".<C-g>u";
options = { desc = "Undo breakpoint"; };
options = {desc = "Undo breakpoint";};
}
{
mode = "i";
key = ";";
action = ";<C-g>u";
options = { desc = "Undo breakpoint"; };
options = {desc = "Undo breakpoint";};
}
{
mode = "n";
key = "<leader>e";
action = "<CMD>Neotree toggle<CR>";
options = { desc = "Toggle tree view"; };
options = {desc = "Toggle tree view";};
}
# Database
@@ -111,49 +111,45 @@
mode = "n";
key = "<leader>Du";
action = "<CMD>DBUI<CR>";
options = { desc = "Show Database UI"; };
options = {desc = "Show Database UI";};
}
# LSP Actions
{
mode = "n";
key = "gd";
action =
"<CMD>FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true<CR>";
options = { desc = "Goto Definition"; };
action = "<CMD>FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true<CR>";
options = {desc = "Goto Definition";};
}
{
mode = "n";
key = "gr";
action =
"<CMD>FzfLua lsp_references jump_to_single_result=true ignore_current_line=true<CR>";
options = { desc = "References"; };
action = "<CMD>FzfLua lsp_references jump_to_single_result=true ignore_current_line=true<CR>";
options = {desc = "References";};
}
{
mode = "n";
key = "gI";
action =
"<CMD>FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true<CR>";
options = { desc = "Goto Implementation"; };
action = "<CMD>FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true<CR>";
options = {desc = "Goto Implementation";};
}
{
mode = "n";
key = "gy";
action =
"<CMD>FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true<CR>";
options = { desc = "Goto T[y]pe Definition"; };
action = "<CMD>FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true<CR>";
options = {desc = "Goto T[y]pe Definition";};
}
{
mode = "n";
key = "<leader>cd";
action = "<CMD>lua vim.diagnostic.open_float()<CR>";
options = { desc = "Popup Diagnostics"; };
options = {desc = "Popup Diagnostics";};
}
{
mode = "n";
key = "<leader>cD";
action = "<CMD>Trouble diagnostics toggle<CR>";
options = { desc = "List All Diagnostics"; };
options = {desc = "List All Diagnostics";};
}
# SOPS
@@ -161,13 +157,13 @@
mode = "n";
key = "<leader>od";
action = "<CMD>!sops -d -i %<CR><CR>";
options = { desc = "Decrypt SOPS File"; };
options = {desc = "Decrypt SOPS File";};
}
{
mode = "n";
key = "<leader>oe";
action = "<CMD>!sops -e -i %<CR><CR>";
options = { desc = "Encrypt SOPS File"; };
options = {desc = "Encrypt SOPS File";};
}
# Git
@@ -175,53 +171,53 @@
mode = "n";
key = "<leader>gg";
action = "<CMD>LazyGit<CR>";
options = { desc = "LazyGit"; };
options = {desc = "LazyGit";};
}
# Windows
{
key = "<C-h>";
action = "<CMD>wincmd h<CR>";
options = { desc = "Navigate Window Left"; };
options = {desc = "Navigate Window Left";};
}
{
key = "<C-j>";
action = "<CMD>wincmd j<CR>";
options = { desc = "Navigate Window Down"; };
options = {desc = "Navigate Window Down";};
}
{
key = "<C-k>";
action = "<CMD>wincmd k<CR>";
options = { desc = "Navigate Window Up"; };
options = {desc = "Navigate Window Up";};
}
{
key = "<C-l>";
action = "<CMD>wincmd l<CR>";
options = { desc = "Navigate Window Right"; };
options = {desc = "Navigate Window Right";};
}
{
mode = "n";
key = "<leader>w";
action = "<c-w>";
options = { desc = "Windows"; };
options = {desc = "Windows";};
}
{
mode = "n";
key = "<leader>-";
action = "<C-W>s";
options = { desc = "Split Window Below"; };
options = {desc = "Split Window Below";};
}
{
mode = "n";
key = "<leader>|";
action = "<C-W>v";
options = { desc = "Split Window Right"; };
options = {desc = "Split Window Right";};
}
{
mode = "n";
key = "<leader>wd";
action = "<C-W>c";
options = { desc = "Delete Window"; };
options = {desc = "Delete Window";};
}
# Tabs
@@ -229,43 +225,43 @@
mode = "n";
key = "<leader><tab>l";
action = "<CMD>tablast<CR>";
options = { desc = "Last Tab"; };
options = {desc = "Last Tab";};
}
{
mode = "n";
key = "<leader><tab>o";
action = "<CMD>tabonly<CR>";
options = { desc = "Close Other Tabs"; };
options = {desc = "Close Other Tabs";};
}
{
mode = "n";
key = "<leader><tab>f";
action = "<CMD>tabfirst<CR>";
options = { desc = "First Tab"; };
options = {desc = "First Tab";};
}
{
mode = "n";
key = "<leader><tab><tab>";
action = "<CMD>tabnew<CR>";
options = { desc = "New Tab"; };
options = {desc = "New Tab";};
}
{
mode = "n";
key = "<leader><tab>]";
action = "<CMD>tabnext<CR>";
options = { desc = "Next Tab"; };
options = {desc = "Next Tab";};
}
{
mode = "n";
key = "<leader><tab>d";
action = "<CMD>tabclose<CR>";
options = { desc = "Close Tab"; };
options = {desc = "Close Tab";};
}
{
mode = "n";
key = "<leader><tab>[";
action = "<CMD>tabprevious<CR>";
options = { desc = "Previous Tab"; };
options = {desc = "Previous Tab";};
}
# Buffer
@@ -273,55 +269,55 @@
mode = "n";
key = "<S-h>";
action = "<CMD>bprevious<CR>";
options = { desc = "Previous Buffer"; };
options = {desc = "Previous Buffer";};
}
{
mode = "n";
key = "<S-l>";
action = "<CMD>bnext<CR>";
options = { desc = "Next Buffer"; };
options = {desc = "Next Buffer";};
}
{
mode = "n";
key = "<leader>bb";
action = "<CMD>e #<CR>";
options = { desc = "Switch To Other Buffer"; };
options = {desc = "Switch To Other Buffer";};
}
{
mode = "n";
key = "<leader>bd";
action = "<CMD>bd<CR>";
options = { desc = "Delete Buffer and Window"; };
options = {desc = "Delete Buffer and Window";};
}
{
mode = "n";
key = "<leader>bp";
action = "<CMD>BufferLineTogglePin<CR>";
options = { desc = "Toggle Pin"; };
options = {desc = "Toggle Pin";};
}
{
mode = "n";
key = "<leader>bP";
action = "<CMD>BufferLineGroupClose ungrouped<CR>";
options = { desc = "Delete Non-Pinned Buffers"; };
options = {desc = "Delete Non-Pinned Buffers";};
}
{
mode = "n";
key = "<leader>bo";
action = "<CMD>BufferLineCloseOthers<CR>";
options = { desc = "Delete Other Buffers"; };
options = {desc = "Delete Other Buffers";};
}
{
mode = "n";
key = "<leader>br";
action = "<CMD>BufferLineCloseRight<CR>";
options = { desc = "Delete Buffers to the Right"; };
options = {desc = "Delete Buffers to the Right";};
}
{
mode = "n";
key = "<leader>bl";
action = "<CMD>BufferLineCloseLeft<CR>";
options = { desc = "Delete Buffers to the Left"; };
options = {desc = "Delete Buffers to the Left";};
}
# DAP Telescope Actions
@@ -329,25 +325,25 @@
mode = "n";
key = "<leader>d/c";
action = "<CMD>Telescope dap commands<CR>";
options = { desc = "Search Commands"; };
options = {desc = "Search Commands";};
}
{
mode = "n";
key = "<leader>d/b";
action = "<CMD>Telescope dap list_breakpoints<CR>";
options = { desc = "Search Breakpoints"; };
options = {desc = "Search Breakpoints";};
}
{
mode = "n";
key = "<leader>d/v";
action = "<CMD>Telescope dap variables<CR>";
options = { desc = "Search Variables"; };
options = {desc = "Search Variables";};
}
{
mode = "n";
key = "<leader>d/f";
action = "<CMD>Telescope dap frames<CR>";
options = { desc = "Search Frames"; };
options = {desc = "Search Frames";};
}
];
}
+247 -248
View File
@@ -1,263 +1,262 @@
let
selectOpts = "{behavior = cmp.SelectBehavior.Select}";
in
{ pkgs, ... }:
{
plugins = {
cmp = {
enable = true;
settings = {
autoEnableSources = true;
performance = {
debounce = 150;
};
sources = [
{ name = "path"; }
{
name = "nvim_lsp";
keywordLength = 1;
}
{
name = "buffer";
keywordLength = 3;
}
{ name = "supermaven"; }
];
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
formatting = {
fields = [
"menu"
"abbr"
"kind"
{pkgs, ...}: {
plugins = {
cmp = {
enable = true;
settings = {
autoEnableSources = true;
performance = {
debounce = 150;
};
sources = [
{name = "path";}
{
name = "nvim_lsp";
keywordLength = 1;
}
{
name = "buffer";
keywordLength = 3;
}
{name = "supermaven";}
];
format = ''
function(entry, item)
local menu_icon = {
nvim_lsp = '[LSP]',
luasnip = '[SNIP]',
buffer = '[BUF]',
path = '[PATH]',
}
item.menu = menu_icon[entry.source.name]
return item
end
'';
};
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
formatting = {
fields = [
"menu"
"abbr"
"kind"
];
format = ''
function(entry, item)
local menu_icon = {
nvim_lsp = '[LSP]',
luasnip = '[SNIP]',
buffer = '[BUF]',
path = '[PATH]',
}
mapping = {
"<Up>" = "cmp.mapping.select_prev_item(${selectOpts})";
"<Down>" = "cmp.mapping.select_next_item(${selectOpts})";
"<C-p>" = "cmp.mapping.select_prev_item(${selectOpts})";
"<C-n>" = "cmp.mapping.select_next_item(${selectOpts})";
"<C-u>" = "cmp.mapping.scroll_docs(-4)";
"<C-d>" = "cmp.mapping.scroll_docs(4)";
"<C-e>" = "cmp.mapping.abort()";
"<C-y>" = "cmp.mapping.confirm({select = true})";
"<CR>" = "cmp.mapping.confirm({select = false})";
"<C-f>" = ''
cmp.mapping(
function(fallback)
if luasnip.jumpable(1) then
luasnip.jump(1)
else
fallback()
end
end,
{ "i", "s" }
)
'';
"<C-b>" = ''
cmp.mapping(
function(fallback)
if luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end,
{ "i", "s" }
)
'';
"<Tab>" = ''
cmp.mapping(
function(fallback)
local col = vim.fn.col('.') - 1
if cmp.visible() then
cmp.select_next_item(select_opts)
elseif col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then
fallback()
else
cmp.complete()
end
end,
{ "i", "s" }
)
'';
"<S-Tab>" = ''
cmp.mapping(
function(fallback)
if cmp.visible() then
cmp.select_prev_item(select_opts)
else
fallback()
end
end,
{ "i", "s" }
)
'';
};
window = {
completion = {
border = "rounded";
winhighlight = "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None";
zindex = 1001;
scrolloff = 0;
colOffset = 0;
sidePadding = 1;
scrollbar = true;
item.menu = menu_icon[entry.source.name]
return item
end
'';
};
documentation = {
border = "rounded";
winhighlight = "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None";
zindex = 1001;
maxHeight = 20;
mapping = {
"<Up>" = "cmp.mapping.select_prev_item(${selectOpts})";
"<Down>" = "cmp.mapping.select_next_item(${selectOpts})";
"<C-p>" = "cmp.mapping.select_prev_item(${selectOpts})";
"<C-n>" = "cmp.mapping.select_next_item(${selectOpts})";
"<C-u>" = "cmp.mapping.scroll_docs(-4)";
"<C-d>" = "cmp.mapping.scroll_docs(4)";
"<C-e>" = "cmp.mapping.abort()";
"<C-y>" = "cmp.mapping.confirm({select = true})";
"<CR>" = "cmp.mapping.confirm({select = false})";
"<C-f>" = ''
cmp.mapping(
function(fallback)
if luasnip.jumpable(1) then
luasnip.jump(1)
else
fallback()
end
end,
{ "i", "s" }
)
'';
"<C-b>" = ''
cmp.mapping(
function(fallback)
if luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end,
{ "i", "s" }
)
'';
"<Tab>" = ''
cmp.mapping(
function(fallback)
local col = vim.fn.col('.') - 1
if cmp.visible() then
cmp.select_next_item(select_opts)
elseif col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then
fallback()
else
cmp.complete()
end
end,
{ "i", "s" }
)
'';
"<S-Tab>" = ''
cmp.mapping(
function(fallback)
if cmp.visible() then
cmp.select_prev_item(select_opts)
else
fallback()
end
end,
{ "i", "s" }
)
'';
};
window = {
completion = {
border = "rounded";
winhighlight = "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None";
zindex = 1001;
scrolloff = 0;
colOffset = 0;
sidePadding = 1;
scrollbar = true;
};
documentation = {
border = "rounded";
winhighlight = "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None";
zindex = 1001;
maxHeight = 20;
};
};
};
};
};
cmp-nvim-lsp.enable = true;
cmp-buffer.enable = true;
cmp-path.enable = true;
cmp-treesitter.enable = true;
dap.enable = true;
none-ls = {
enable = true;
sources.formatting = {
alejandra.enable = true;
hclfmt.enable = true;
just.enable = true;
opentofu_fmt.enable = true;
prettier.enable = true;
# rubyfmt is broken on darwin-based systems
rubyfmt.enable = (
pkgs.stdenv.hostPlatform.system != "x86_64-darwin"
&& pkgs.stdenv.hostPlatform.system != "aarch64-darwin"
);
sqlformat.enable = true;
stylua.enable = true;
yamlfmt.enable = true;
};
sources.diagnostics = {
trivy.enable = true;
yamllint.enable = true;
};
};
conform-nvim = {
enable = true;
settings = {
format_on_save = {
lsp_fallback = "fallback";
timeout_ms = 500;
cmp-nvim-lsp.enable = true;
cmp-buffer.enable = true;
cmp-path.enable = true;
cmp-treesitter.enable = true;
dap.enable = true;
none-ls = {
enable = true;
sources.formatting = {
alejandra.enable = true;
hclfmt.enable = true;
just.enable = true;
opentofu_fmt.enable = true;
prettier.enable = true;
# rubyfmt is broken on darwin-based systems
rubyfmt.enable = (
pkgs.stdenv.hostPlatform.system
!= "x86_64-darwin"
&& pkgs.stdenv.hostPlatform.system != "aarch64-darwin"
);
sqlformat.enable = true;
stylua.enable = true;
yamlfmt.enable = true;
};
notify_on_error = true;
sources.diagnostics = {
trivy.enable = true;
yamllint.enable = true;
};
};
formatters_by_ft = {
css = [ "prettier" ];
html = [ "prettier" ];
javascript = [ "prettier" ];
javascriptreact = [ "prettier" ];
json = [ "prettier" ];
just = [ "just" ];
lua = [ "stylua" ];
markdown = [ "prettier" ];
nix = [ "alejandra" ];
ruby = [ "rubyfmt" ];
terraform = [ "tofu_fmt" ];
tf = [ "tofu_fmt" ];
typescript = [ "prettier" ];
typescriptreact = [ "prettier" ];
yaml = [ "yamlfmt" ];
conform-nvim = {
enable = true;
settings = {
format_on_save = {
lsp_fallback = "fallback";
timeout_ms = 500;
};
notify_on_error = true;
formatters_by_ft = {
css = ["prettier"];
html = ["prettier"];
javascript = ["prettier"];
javascriptreact = ["prettier"];
json = ["prettier"];
just = ["just"];
lua = ["stylua"];
markdown = ["prettier"];
nix = ["alejandra"];
ruby = ["rubyfmt"];
terraform = ["tofu_fmt"];
tf = ["tofu_fmt"];
typescript = ["prettier"];
typescriptreact = ["prettier"];
yaml = ["yamlfmt"];
};
};
};
lsp = {
enable = true;
inlayHints = true;
keymaps = {
diagnostic = {
"<leader>E" = "open_float";
"[" = "goto_prev";
"]" = "goto_next";
"<leader>do" = "setloclist";
};
lspBuf = {
"K" = "hover";
"gD" = "declaration";
"gd" = "definition";
"gr" = "references";
"gI" = "implementation";
"gy" = "type_definition";
"<leader>rn" = "rename";
"<leader>ca" = "code_action";
"<leader>wl" = "list_workspace_folders";
"<leader>wr" = "remove_workspace_folder";
"<leader>wa" = "add_workspace_folder";
};
};
preConfig = ''
vim.diagnostic.config({
virtual_text = false,
severity_sort = true,
float = {
border = 'rounded',
source = 'always',
},
})
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
vim.lsp.handlers.hover,
{border = 'rounded'}
)
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
vim.lsp.handlers.signature_help,
{border = 'rounded'}
)
'';
postConfig = ''
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 = "" })
end
'';
servers = {
jsonls.enable = true;
marksman.enable = true;
nil-ls.enable = true;
nixd.enable = true;
yamlls.enable = true;
};
};
trouble = {
enable = true;
settings = {
use_diagnostic_signs = true;
};
};
};
lsp = {
enable = true;
inlayHints = true;
keymaps = {
diagnostic = {
"<leader>E" = "open_float";
"[" = "goto_prev";
"]" = "goto_next";
"<leader>do" = "setloclist";
};
lspBuf = {
"K" = "hover";
"gD" = "declaration";
"gd" = "definition";
"gr" = "references";
"gI" = "implementation";
"gy" = "type_definition";
"<leader>rn" = "rename";
"<leader>ca" = "code_action";
"<leader>wl" = "list_workspace_folders";
"<leader>wr" = "remove_workspace_folder";
"<leader>wa" = "add_workspace_folder";
};
};
preConfig = ''
vim.diagnostic.config({
virtual_text = false,
severity_sort = true,
float = {
border = 'rounded',
source = 'always',
},
})
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
vim.lsp.handlers.hover,
{border = 'rounded'}
)
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
vim.lsp.handlers.signature_help,
{border = 'rounded'}
)
'';
postConfig = ''
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 = "" })
end
'';
servers = {
jsonls.enable = true;
marksman.enable = true;
nil-ls.enable = true;
nixd.enable = true;
yamlls.enable = true;
};
};
trouble = {
enable = true;
settings = {
use_diagnostic_signs = true;
};
};
};
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
{ pkgs, ... }: {
{pkgs, ...}: {
extraPlugins = with pkgs; [
vimPlugins.supermaven-nvim # AI code completion
vimPlugins.vim-dadbod # DB client
+17 -15
View File
@@ -6,12 +6,14 @@
options = {
always_show_bufferline = false;
buffer_close_icon = "";
offsets = [{
filetype = "neo-tree";
text = "Neo-tree";
highlight = "Directory";
text_align = "left";
}];
offsets = [
{
filetype = "neo-tree";
text = "Neo-tree";
highlight = "Directory";
text_align = "left";
}
];
diagnostics = "nvim_lsp";
};
};
@@ -27,14 +29,14 @@
};
signcolumn = true;
signs = {
add = { text = ""; };
change = { text = ""; };
changedelete = { text = "~"; };
delete = { text = "_"; };
topdelete = { text = ""; };
untracked = { text = ""; };
add = {text = "";};
change = {text = "";};
changedelete = {text = "~";};
delete = {text = "_";};
topdelete = {text = "";};
untracked = {text = "";};
};
watch_gitdir = { follow_files = true; };
watch_gitdir = {follow_files = true;};
};
};
@@ -50,10 +52,10 @@
mini = {
enable = true;
modules = {
surround = { };
surround = {};
indentscope = {
symbol = "";
options = { try_as_border = true; };
options = {try_as_border = true;};
};
};
};
+1 -1
View File
@@ -3,7 +3,7 @@
onedark = {
enable = true;
settings = {
colors = { yellow = "#d9a950"; };
colors = {yellow = "#d9a950";};
style = "dark";
transparent = true;
};
+3 -2
View File
@@ -1,5 +1,5 @@
let
status = [ "Alternate" "Current" "Inactive" "Visible" ];
status = ["Alternate" "Current" "Inactive" "Visible"];
part = [
"ADDED"
"CHANGED"
@@ -26,7 +26,8 @@ let
"FloatBorder"
];
# "Buffer" + status + part
buffer_status = builtins.foldl' (acc: elem: acc ++ elem) [ ]
buffer_status =
builtins.foldl' (acc: elem: acc ++ elem) []
(builtins.map (status: builtins.map (part: "Buffer" + status + part) part)
status);
in {