mirror of
https://github.com/Dichgrem/DCGOS.git
synced 2025-12-16 11:12:00 -05:00
fix:remove_nixvim
This commit is contained in:
17
flake.nix
17
flake.nix
@@ -20,21 +20,8 @@
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
"${hostname}" = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit hostname inputs username; };
|
||||
modules = [
|
||||
./hosts
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.${username} = {
|
||||
imports = [
|
||||
./home
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
modules = [./hosts];
|
||||
specialArgs = {inherit hostname inputs username;};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -11,8 +11,7 @@ in {
|
||||
ls ./cli
|
||||
++ ls ./gui
|
||||
++ ls ./tui
|
||||
++ ls ./wayland
|
||||
++ [ ./nixvim ];
|
||||
++ ls ./wayland;
|
||||
|
||||
home = {
|
||||
file = {
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
{
|
||||
autoGroups = {
|
||||
highlight_yank = {};
|
||||
vim_enter = {};
|
||||
indentscope = {};
|
||||
restore_cursor = {};
|
||||
};
|
||||
|
||||
autoCmd = [
|
||||
# highlight Text on Yank
|
||||
{
|
||||
group = "highlight_yank";
|
||||
event = "TextYankPost";
|
||||
pattern = "*";
|
||||
callback = {
|
||||
__raw = "
|
||||
function()
|
||||
vim.highlight.on_yank()
|
||||
end
|
||||
";
|
||||
};
|
||||
}
|
||||
{
|
||||
group = "indentscope";
|
||||
event = ["FileType"];
|
||||
pattern = [
|
||||
"help"
|
||||
"Startup"
|
||||
"startup"
|
||||
"neo-tree"
|
||||
"Trouble"
|
||||
"trouble"
|
||||
"notify"
|
||||
];
|
||||
callback = {
|
||||
__raw = ''
|
||||
function()
|
||||
vim.b.miniindentscope_disable = true
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
||||
## from NVChad https://nvchad.com/docs/recipes (this autocmd will restore the cursor position when opening a file)
|
||||
{
|
||||
group = "restore_cursor";
|
||||
event = ["BufReadPost"];
|
||||
pattern = "*";
|
||||
callback = {
|
||||
__raw = ''
|
||||
function()
|
||||
if
|
||||
vim.fn.line "'\"" > 1
|
||||
and vim.fn.line "'\"" <= vim.fn.line "$"
|
||||
and vim.bo.filetype ~= "commit"
|
||||
and vim.fn.index({ "xxd", "gitrebase" }, vim.bo.filetype) == -1
|
||||
then
|
||||
vim.cmd "normal! g`\""
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
enableMan = false;
|
||||
imports = [
|
||||
./autocmd.nix
|
||||
./keymaps.nix
|
||||
./settings.nix
|
||||
./lazy.nix
|
||||
./plugins
|
||||
];
|
||||
extraPackages = with pkgs; [
|
||||
wakatime-cli
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,273 +0,0 @@
|
||||
{
|
||||
globals.mapleader = " ";
|
||||
|
||||
keymaps = [
|
||||
# Windows
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-Up>";
|
||||
action = "<C-w>k";
|
||||
options.desc = "Move To Window Up";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-Down>";
|
||||
action = "<C-w>j";
|
||||
options.desc = "Move To Window Down";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-Left>";
|
||||
action = "<C-w>h";
|
||||
options.desc = "Move To Window Left";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-Right>";
|
||||
action = "<C-w>l";
|
||||
options.desc = "Move To Window Right";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>wd";
|
||||
action = "<C-W>c";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Delete window";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>-";
|
||||
action = "<C-W>s";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Split window below";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>|";
|
||||
action = "<C-W>v";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Split window right";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-s>";
|
||||
action = "<cmd>w<cr><esc>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Save file";
|
||||
};
|
||||
}
|
||||
|
||||
# Quit/Session
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>qq";
|
||||
action = "<cmd>quitall<cr><esc>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Quit all";
|
||||
};
|
||||
}
|
||||
|
||||
# Toggle options
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ul";
|
||||
action = ":lua ToggleLineNumber()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Toggle Line Numbers";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>uL";
|
||||
action = ":lua ToggleRelativeLineNumber()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Toggle Relative Line Numbers";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>uw";
|
||||
action = ":lua ToggleWrap()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Toggle Line Wrap";
|
||||
};
|
||||
}
|
||||
|
||||
# Move Lines
|
||||
{
|
||||
mode = "n";
|
||||
key = "<A-Up>";
|
||||
action = "<cmd>m .-2<cr>==";
|
||||
options.desc = "Move line up";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "v";
|
||||
key = "<A-Up>";
|
||||
action = ":m '<-2<cr>gv=gv";
|
||||
options.desc = "Move line up";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<A-Down>";
|
||||
action = "<cmd>m .+1<cr>==";
|
||||
options.desc = "Move line down";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "v";
|
||||
key = "<A-Down>";
|
||||
action = ":m '>+1<cr>gv=gv";
|
||||
options.desc = "Move line Down";
|
||||
}
|
||||
|
||||
# Better indenting
|
||||
{
|
||||
mode = "v";
|
||||
key = "<";
|
||||
action = "<gv";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "v";
|
||||
key = ">";
|
||||
action = ">gv";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "i";
|
||||
key = "<C-a>";
|
||||
action = "<cmd> norm! ggVG<cr>";
|
||||
options.desc = "Select all lines in buffer";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "J";
|
||||
action = "mzJ`z";
|
||||
options.desc = "Allow cursor to stay in the same place after appending to current line ";
|
||||
}
|
||||
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "<C-d>";
|
||||
# action = "<C-d>zz";
|
||||
# options.desc = "Allow C-d and C-u to keep the cursor in the middle";
|
||||
# }
|
||||
#
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "<C-u>";
|
||||
# action = "<C-u>zz";
|
||||
# options.desc = "Allow C-d and C-u to keep the cursor in the middle";
|
||||
# }
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "n";
|
||||
action = "nzzzv";
|
||||
options.desc = "Allow search terms to stay in the middle";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "N";
|
||||
action = "Nzzzv";
|
||||
options.desc = "Allow search terms to stay in the middle";
|
||||
}
|
||||
|
||||
# Clear search with ESC
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"i"
|
||||
];
|
||||
key = "<esc>";
|
||||
action = "<cmd>noh<cr><esc>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Escape and clear hlsearch";
|
||||
};
|
||||
}
|
||||
|
||||
# Paste stuff without saving the deleted word into the buffer
|
||||
{
|
||||
mode = "x";
|
||||
key = "p";
|
||||
action = "\"_dP";
|
||||
options.desc = "Deletes to void register and paste over";
|
||||
}
|
||||
|
||||
# Copy stuff to system clipboard with <leader> + y or just y to have it just in vim
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
key = "<leader>y";
|
||||
action = "\"+y";
|
||||
options.desc = "Copy to system clipboard";
|
||||
}
|
||||
|
||||
# Delete to void register
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
key = "<leader>D";
|
||||
action = "\"_d";
|
||||
options.desc = "Delete to void register";
|
||||
}
|
||||
];
|
||||
extraConfigLua = ''
|
||||
function ToggleLineNumber()
|
||||
if vim.wo.number then
|
||||
vim.wo.number = false
|
||||
else
|
||||
vim.wo.number = true
|
||||
vim.wo.relativenumber = false
|
||||
end
|
||||
end
|
||||
|
||||
function ToggleRelativeLineNumber()
|
||||
if vim.wo.relativenumber then
|
||||
vim.wo.relativenumber = false
|
||||
else
|
||||
vim.wo.relativenumber = true
|
||||
vim.wo.number = false
|
||||
end
|
||||
end
|
||||
|
||||
function ToggleWrap()
|
||||
vim.wo.wrap = not vim.wo.wrap
|
||||
end
|
||||
|
||||
if vim.lsp.inlay_hint then
|
||||
vim.keymap.set('n', '<leader>uh', function()
|
||||
vim.lsp.inlay_hint(0, nil)
|
||||
end, { desc = 'Toggle Inlay Hints' })
|
||||
end
|
||||
'';
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
plugins.lazy = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
plugins = {
|
||||
codeium-nvim = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
enable_chat = true;
|
||||
|
||||
tools = {
|
||||
curl = lib.getExe pkgs.curl;
|
||||
gzip = lib.getExe pkgs.gzip;
|
||||
uname = lib.getExe' pkgs.coreutils "uname";
|
||||
uuidgen = lib.getExe' pkgs.util-linux "uuidgen";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ac";
|
||||
action = "<cmd>Codeium Chat<CR>";
|
||||
options = {
|
||||
desc = "Codeium Chat";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
plugins = {
|
||||
copilot-chat.enable = true;
|
||||
copilot-lua = {
|
||||
enable = true;
|
||||
suggestion = {
|
||||
enabled = false;
|
||||
autoTrigger = true;
|
||||
keymap.accept = "<C-CR>";
|
||||
};
|
||||
panel.enabled = false;
|
||||
};
|
||||
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "<leader>a";
|
||||
mode = "n";
|
||||
icon = "";
|
||||
group = "+ai";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
action = "<cmd>CopilotChatToggle<CR>";
|
||||
key = "<leader>ac";
|
||||
options.desc = "Toggle Coilot chat";
|
||||
mode = "n";
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
{lib, ...}: {
|
||||
plugins = {
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
|
||||
cmdline = {
|
||||
"/" = {
|
||||
mapping.__raw = "cmp.mapping.preset.cmdline()";
|
||||
sources = [{name = "buffer";}];
|
||||
};
|
||||
":" = {
|
||||
mapping.__raw = "cmp.mapping.preset.cmdline()";
|
||||
sources = [
|
||||
{name = "path";}
|
||||
{
|
||||
name = "cmdline";
|
||||
option.ignore_cmds = [
|
||||
"Man"
|
||||
"!"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
filetype = {
|
||||
sql.sources = [
|
||||
{name = "buffer";}
|
||||
{name = "vim-dadbod-completion";}
|
||||
];
|
||||
};
|
||||
|
||||
settings = {
|
||||
# Preselect first entry
|
||||
completion.completeopt = "menu,menuone,noinsert";
|
||||
sources = [
|
||||
{
|
||||
name = "nvim_lsp";
|
||||
priority = 100;
|
||||
}
|
||||
{
|
||||
name = "nvim_lsp_signature_help";
|
||||
priority = 100;
|
||||
}
|
||||
{
|
||||
name = "nvim_lsp_document_symbol";
|
||||
priority = 100;
|
||||
}
|
||||
{
|
||||
name = "treesitter";
|
||||
priority = 80;
|
||||
}
|
||||
{
|
||||
name = "luasnip";
|
||||
priority = 70;
|
||||
}
|
||||
# {
|
||||
# name = "codeium";
|
||||
# priority = 60;
|
||||
# }
|
||||
{
|
||||
name = "buffer";
|
||||
priority = 50;
|
||||
# Words from other open buffers can also be suggested.
|
||||
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
||||
keywordLength = 3;
|
||||
}
|
||||
{
|
||||
name = "path";
|
||||
priority = 30;
|
||||
}
|
||||
{
|
||||
name = "git";
|
||||
priority = 20;
|
||||
}
|
||||
{
|
||||
name = "npm";
|
||||
priority = 20;
|
||||
}
|
||||
# {
|
||||
# name = "zsh";
|
||||
# priority = 20;
|
||||
# }
|
||||
{
|
||||
name = "calc";
|
||||
priority = 10;
|
||||
}
|
||||
{
|
||||
name = "emoji";
|
||||
priority = 5;
|
||||
}
|
||||
|
||||
# Disable this if running tests with nix flake check
|
||||
(lib.mkIf lib.nixvim.enableExceptInTests {name = "nixpkgs_maintainers";})
|
||||
];
|
||||
|
||||
window = {
|
||||
completion.border = "rounded";
|
||||
documentation.border = "rounded";
|
||||
};
|
||||
experimental.ghost_text = true;
|
||||
|
||||
mapping = {
|
||||
"<Tab>".__raw = ''
|
||||
cmp.mapping(function(fallback)
|
||||
local luasnip = require("luasnip")
|
||||
if luasnip.locally_jumpable(1) then
|
||||
luasnip.jump(1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" })
|
||||
'';
|
||||
|
||||
"<S-Tab>".__raw = ''
|
||||
cmp.mapping(function(fallback)
|
||||
local luasnip = require("luasnip")
|
||||
if luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" })
|
||||
'';
|
||||
|
||||
"<C-n>" =
|
||||
# lua
|
||||
"cmp.mapping(cmp.mapping.select_next_item())";
|
||||
"<C-p>" =
|
||||
# lua
|
||||
"cmp.mapping(cmp.mapping.select_prev_item())";
|
||||
"<C-e>" =
|
||||
# lua
|
||||
"cmp.mapping.abort()";
|
||||
"<C-d>" =
|
||||
# lua
|
||||
"cmp.mapping.scroll_docs(-4)";
|
||||
"<C-f>" =
|
||||
# lua
|
||||
"cmp.mapping.scroll_docs(4)";
|
||||
"<Up>" =
|
||||
# lua
|
||||
"cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
"<Down>" =
|
||||
# lua
|
||||
"cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<CR>" =
|
||||
# lua
|
||||
"cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })";
|
||||
"<C-Space>" =
|
||||
# lua
|
||||
"cmp.mapping.complete()";
|
||||
};
|
||||
|
||||
snippet.expand =
|
||||
# lua
|
||||
''
|
||||
function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
{
|
||||
plugins.lspkind = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
cmp.menu = {
|
||||
nvim_lsp = "";
|
||||
nvim_lua = "";
|
||||
neorg = "[neorg]";
|
||||
buffer = "";
|
||||
calc = "";
|
||||
git = "";
|
||||
luasnip = "";
|
||||
codeium = "";
|
||||
copilot = "";
|
||||
emoji = "";
|
||||
path = "";
|
||||
spell = "";
|
||||
};
|
||||
|
||||
symbol_map = {
|
||||
Namespace = "";
|
||||
Text = "";
|
||||
Method = "";
|
||||
Function = "";
|
||||
Constructor = "";
|
||||
Field = "";
|
||||
Variable = "";
|
||||
Class = "";
|
||||
Interface = "";
|
||||
Module = "";
|
||||
Property = "";
|
||||
Unit = "";
|
||||
Value = "";
|
||||
Enum = "";
|
||||
Keyword = "";
|
||||
Snippet = "";
|
||||
Color = "";
|
||||
File = "";
|
||||
Reference = "";
|
||||
Folder = "";
|
||||
EnumMember = "";
|
||||
Constant = "";
|
||||
Struct = "";
|
||||
Event = "";
|
||||
Operator = "";
|
||||
TypeParameter = "";
|
||||
Table = "";
|
||||
Object = "";
|
||||
Tag = "";
|
||||
Array = "[]";
|
||||
Boolean = "";
|
||||
Number = "";
|
||||
Null = "";
|
||||
String = "";
|
||||
Calendar = "";
|
||||
Watch = "";
|
||||
Package = "";
|
||||
Copilot = "";
|
||||
Codeium = "";
|
||||
TabNine = "";
|
||||
};
|
||||
maxwidth = 50;
|
||||
ellipsis_char = "...";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,198 +0,0 @@
|
||||
{
|
||||
plugins = {
|
||||
dap = {
|
||||
enable = true;
|
||||
signs = {
|
||||
dapBreakpoint = {
|
||||
text = " ";
|
||||
texthl = "DiagnosticInfo";
|
||||
};
|
||||
dapBreakpointCondition = {
|
||||
text = " ";
|
||||
texthl = "DiagnosticInfo";
|
||||
};
|
||||
dapBreakpointRejected = {
|
||||
text = " ";
|
||||
texthl = "DiagnosticError";
|
||||
};
|
||||
dapLogPoint = {
|
||||
text = " ";
|
||||
texthl = "DiagnosticInfo";
|
||||
};
|
||||
dapStopped = {
|
||||
text = " ";
|
||||
texthl = "DiagnosticWarn";
|
||||
linehl = "DapStoppedLine";
|
||||
numhl = "DapStoppedLine";
|
||||
};
|
||||
};
|
||||
};
|
||||
dap-ui = {
|
||||
enable = true;
|
||||
settings.layouts = [
|
||||
{
|
||||
elements = [
|
||||
{
|
||||
id = "scopes";
|
||||
size = 0.25;
|
||||
}
|
||||
{
|
||||
id = "breakpoints";
|
||||
size = 0.25;
|
||||
}
|
||||
{
|
||||
id = "stacks";
|
||||
size = 0.25;
|
||||
}
|
||||
{
|
||||
id = "watches";
|
||||
size = 0.25;
|
||||
}
|
||||
];
|
||||
position = "left";
|
||||
size = 40;
|
||||
}
|
||||
{
|
||||
elements = [
|
||||
{
|
||||
id = "repl";
|
||||
size = 0.5;
|
||||
}
|
||||
{
|
||||
id = "console";
|
||||
size = 0;
|
||||
}
|
||||
];
|
||||
position = "bottom";
|
||||
size = 10;
|
||||
}
|
||||
];
|
||||
};
|
||||
dap-virtual-text.enable = true;
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "<leader>d";
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
group = "+debug";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = ["n"];
|
||||
action = ":DapContinue<cr>";
|
||||
key = "<leader>dc";
|
||||
options = {
|
||||
desc = "Continue";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = ":DapStepOver<cr>";
|
||||
key = "<leader>dO";
|
||||
options = {
|
||||
desc = "Step over";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = ":DapStepInto<cr>";
|
||||
key = "<leader>di";
|
||||
options = {
|
||||
desc = "Step Into";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = ":DapStepOut<cr>";
|
||||
key = "<leader>do";
|
||||
options = {
|
||||
desc = "Step Out";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = "<cmd>lua require('dap').pause()<cr>";
|
||||
key = "<leader>dp";
|
||||
options = {
|
||||
desc = "Pause";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = ":DapToggleBreakpoint<cr>";
|
||||
key = "<leader>db";
|
||||
options = {
|
||||
desc = "Toggle Breakpoint";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = "<cmd>lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<cr>";
|
||||
key = "<leader>dB";
|
||||
options = {
|
||||
desc = "Breakpoint (conditional)";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = ":DapToggleRepl<cr>";
|
||||
key = "<leader>dR";
|
||||
options = {
|
||||
desc = "Toggle REPL";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = "<cmd>lua require('dap').run_last()<cr>";
|
||||
key = "<leader>dr";
|
||||
options = {
|
||||
desc = "Run Last";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = "<cmd>lua require('dap').session()<cr>";
|
||||
key = "<leader>ds";
|
||||
options = {
|
||||
desc = "Session";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = ":DapTerminate<cr>";
|
||||
key = "<leader>dt";
|
||||
options = {
|
||||
desc = "Terminate";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = "<cmd>lua require('dap.ui.widgets').hover()<cr>";
|
||||
key = "<leader>dw";
|
||||
options = {
|
||||
desc = "Hover Widget";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = "<cmd>lua require('dapui').toggle()<cr>";
|
||||
key = "<leader>du";
|
||||
options = {
|
||||
desc = "Toggle UI";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = ["n"];
|
||||
action = "<cmd>lua require('dapui').eval()<cr>";
|
||||
key = "<leader>de";
|
||||
options = {
|
||||
desc = "Eval";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
{
|
||||
imports = [
|
||||
# ./ai/codeium.nix
|
||||
|
||||
# ./completion/blink.nix
|
||||
./completion/cmp.nix
|
||||
./completion/lspkind.nix
|
||||
|
||||
./debug/dap.nix
|
||||
|
||||
./editor/neotree.nix
|
||||
./editor/undotree.nix
|
||||
./editor/whichkey.nix
|
||||
./editor/yazi.nix
|
||||
|
||||
./theme
|
||||
./luasnip
|
||||
./telescope
|
||||
|
||||
./git/gitsigns.nix
|
||||
|
||||
./lsp/conform.nix
|
||||
./lsp/fidget.nix
|
||||
./lsp/lsp.nix
|
||||
./lsp/lspsaga.nix
|
||||
./lsp/trouble.nix
|
||||
|
||||
./lang/cpp.nix
|
||||
./lang/css.nix
|
||||
./lang/docker.nix
|
||||
./lang/html.nix
|
||||
./lang/json.nix
|
||||
./lang/lua.nix
|
||||
./lang/markdown.nix
|
||||
./lang/nix.nix
|
||||
# ./lang/python.nix
|
||||
./lang/shell.nix
|
||||
./lang/typescript.nix
|
||||
./lang/yaml.nix
|
||||
|
||||
./treesitter/treesitter.nix
|
||||
./treesitter/treesitter-textobjects.nix
|
||||
|
||||
./ui/alpha.nix
|
||||
./ui/bufferline.nix
|
||||
./ui/general.nix
|
||||
./ui/flash.nix
|
||||
./ui/indent-blankline.nix
|
||||
./ui/lualine.nix
|
||||
./ui/noice.nix
|
||||
./ui/notify.nix
|
||||
./ui/precognition.nix
|
||||
./ui/toggleterm.nix
|
||||
./ui/ufo.nix
|
||||
|
||||
./util/colorizer.nix
|
||||
./util/debugprint.nix
|
||||
./util/harpoon.nix
|
||||
./util/kulala.nix
|
||||
./util/mini.nix
|
||||
./util/nvim-autopairs.nix
|
||||
./util/nvim-surround.nix
|
||||
./util/plenary.nix
|
||||
./util/persistence.nix
|
||||
./util/project-nvim.nix
|
||||
./util/snacks.nix
|
||||
./util/wakatime.nix
|
||||
];
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
{
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
closeIfLastWindow = true;
|
||||
sources = [
|
||||
"filesystem"
|
||||
"buffers"
|
||||
"git_status"
|
||||
"document_symbols"
|
||||
];
|
||||
popupBorderStyle = "rounded"; # “NC”, “double”, “none”, “rounded”, “shadow”, “single”, “solid” or raw lua code
|
||||
|
||||
filesystem = {
|
||||
bindToCwd = false;
|
||||
useLibuvFileWatcher = true;
|
||||
followCurrentFile.enabled = true;
|
||||
};
|
||||
|
||||
defaultComponentConfigs = {
|
||||
gitStatus = {
|
||||
symbols = {
|
||||
added = " ";
|
||||
conflict = " ";
|
||||
deleted = " ";
|
||||
ignored = " ";
|
||||
modified = " ";
|
||||
renamed = " ";
|
||||
staged = "✓ ";
|
||||
unstaged = " ";
|
||||
untracked = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
window.mappings = {
|
||||
"<space>" = "none";
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>e";
|
||||
action = "<cmd>Neotree toggle<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Explorer NeoTree (root dir)";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
{
|
||||
plugins.undotree = {
|
||||
enable = true;
|
||||
settings = {
|
||||
autoOpenDiff = true;
|
||||
focusOnToggle = true;
|
||||
CursorLine = true;
|
||||
DiffAutoOpen = true;
|
||||
DiffCommand = "diff";
|
||||
DiffpanelHeight = 10;
|
||||
HelpLine = true;
|
||||
HighlightChangedText = true;
|
||||
HighlightChangedWithSign = true;
|
||||
HighlightSyntaxAdd = "DiffAdd";
|
||||
HighlightSyntaxChange = "DiffChange";
|
||||
HighlightSyntaxDel = "DiffDelete";
|
||||
RelativeTimestamp = true;
|
||||
SetFocusWhenToggle = true;
|
||||
ShortIndicators = false;
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ut";
|
||||
action = "<cmd>UndotreeToggle<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Undotree";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
{
|
||||
plugins.which-key = {
|
||||
enable = true;
|
||||
settings = {
|
||||
icons = {
|
||||
breadcrumb = "»";
|
||||
group = "+";
|
||||
separator = ""; # ➜
|
||||
};
|
||||
win = {
|
||||
border = "rounded";
|
||||
padding = [
|
||||
1
|
||||
1
|
||||
];
|
||||
};
|
||||
spec = [
|
||||
# General Mappings
|
||||
{
|
||||
__unkeyed-1 = "<leader>c";
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
group = "+code";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>f";
|
||||
mode = "n";
|
||||
group = "+find/file";
|
||||
}
|
||||
|
||||
{
|
||||
__unkeyed-1 = "<leader>g";
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
group = "+git";
|
||||
}
|
||||
|
||||
{
|
||||
__unkeyed-1 = "<leader>q";
|
||||
mode = "n";
|
||||
group = "+quit/session";
|
||||
}
|
||||
|
||||
{
|
||||
__unkeyed-1 = "<leader>s";
|
||||
mode = "n";
|
||||
group = "+search";
|
||||
}
|
||||
|
||||
{
|
||||
__unkeyed-1 = "<leader>u";
|
||||
mode = "n";
|
||||
group = "+ui";
|
||||
}
|
||||
|
||||
{
|
||||
__unkeyed-1 = "<leader>w";
|
||||
mode = "n";
|
||||
group = "+windows";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
plugins.yazi.enable = true;
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>E";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('yazi').yazi()
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
desc = "Yazi toggle";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
{
|
||||
plugins.gitsigns = {
|
||||
enable = true;
|
||||
settings = {
|
||||
trouble = true;
|
||||
current_line_blame = false;
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
key = "<leader>gh";
|
||||
action = "gitsigns";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "+hunks";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghb";
|
||||
action = ":Gitsigns blame_line<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Blame line";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghd";
|
||||
action = ":Gitsigns diffthis<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Diff This";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghp";
|
||||
action = ":Gitsigns preview_hunk<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Preview hunk";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghR";
|
||||
action = ":Gitsigns reset_buffer<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Reset Buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
key = "<leader>ghr";
|
||||
action = ":Gitsigns reset_hunk<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Reset Hunk";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
key = "<leader>ghs";
|
||||
action = ":Gitsigns stage_hunk<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Stage Hunk";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghS";
|
||||
action = ":Gitsigns stage_buffer<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Stage Buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ghu";
|
||||
action = ":Gitsigns undo_stage_hunk<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Undo Stage Hunk";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
plugins = {
|
||||
conform-nvim.settings = {
|
||||
formatters_by_ft = {
|
||||
cpp = ["clang-format"];
|
||||
};
|
||||
|
||||
formatters = {
|
||||
clang-format = {
|
||||
command = "${pkgs.clang-tools}/bin/clang-format";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lsp.servers = {
|
||||
cmake.enable = true;
|
||||
clangd = {
|
||||
enable = true;
|
||||
cmd = [
|
||||
"clangd"
|
||||
"--offset-encoding=utf-16"
|
||||
"--header-insertion=iwyu"
|
||||
"--background-index"
|
||||
"--clang-tidy"
|
||||
"--all-scopes-completion"
|
||||
"--completion-style=detailed"
|
||||
"--function-arg-placeholders"
|
||||
"--fallback-style=llvm"
|
||||
"-j=6"
|
||||
];
|
||||
onAttach.function = ''
|
||||
vim.keymap.set('n', 'gh', "<cmd>ClangdSwitchSourceHeader<cr>", { desc = "Switch Source/Header (C/C++)", buffer = bufnr })
|
||||
|
||||
require("clangd_extensions.inlay_hints").setup_autocmd()
|
||||
require("clangd_extensions.inlay_hints").set_inlay_hints()
|
||||
'';
|
||||
extraOptions = {
|
||||
init_options = {
|
||||
usePlaceholders = true;
|
||||
completeUnimported = true;
|
||||
clangdFileStatus = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
clangd-extensions = {
|
||||
enable = true;
|
||||
settings = {
|
||||
inlay_hints.inline = false;
|
||||
codelens.enable = true;
|
||||
ast = {
|
||||
role_icons = {
|
||||
type = "";
|
||||
declaration = "";
|
||||
expression = "";
|
||||
specifier = "";
|
||||
statement = "";
|
||||
templateArgument = "";
|
||||
};
|
||||
kind_icons = {
|
||||
compound = "";
|
||||
recovery = "";
|
||||
translationUnit = "";
|
||||
packExpansion = "";
|
||||
templateTypeParm = "";
|
||||
templateTemplateParm = "";
|
||||
templateParamObject = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dap = {
|
||||
adapters.executables.lldb.command = "${pkgs.lldb}/bin/lldb-vscode";
|
||||
|
||||
configurations.cpp = [
|
||||
{
|
||||
name = "C++";
|
||||
type = "lldb";
|
||||
request = "launch";
|
||||
cwd = "\${workspaceFolder}";
|
||||
program.__raw = ''
|
||||
function()
|
||||
return vim.fn.input('Executable path: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
plugins = {
|
||||
conform-nvim.settings = {
|
||||
formatters_by_ft.css = [
|
||||
"prettierd"
|
||||
"prettier"
|
||||
];
|
||||
|
||||
formatters = {
|
||||
prettierd.command = "${pkgs.prettierd}/bin/prettierd";
|
||||
prettier.command = "${pkgs.nodePackages.prettier}/bin/prettier";
|
||||
};
|
||||
};
|
||||
|
||||
lsp.servers = {
|
||||
cssls = {
|
||||
enable = true;
|
||||
cmd = [
|
||||
"${pkgs.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
||||
"--stdio"
|
||||
];
|
||||
};
|
||||
|
||||
tailwindcss = {
|
||||
enable = true;
|
||||
cmd = [
|
||||
(lib.getExe pkgs.tailwindcss-language-server)
|
||||
"--stdio"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
plugins = {
|
||||
lsp.servers = {
|
||||
dockerls.enable = true;
|
||||
docker_compose_language_service.enable = true;
|
||||
};
|
||||
|
||||
lint = {
|
||||
lintersByFt = {
|
||||
docker = ["hadolint"];
|
||||
};
|
||||
|
||||
linters = {
|
||||
hadolint = {
|
||||
cmd = "${pkgs.hadolint}/bin/hadolint";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
plugins = {
|
||||
conform-nvim.settings = {
|
||||
formatters_by_ft.html = [
|
||||
"prettierd"
|
||||
"prettier"
|
||||
];
|
||||
|
||||
formatters = {
|
||||
prettierd.command = "${pkgs.prettierd}/bin/prettierd";
|
||||
prettier.command = "${pkgs.nodePackages.prettier}/bin/prettier";
|
||||
};
|
||||
};
|
||||
|
||||
lsp = {
|
||||
servers = {
|
||||
html = {
|
||||
enable = true;
|
||||
cmd = [
|
||||
"${pkgs.vscode-langservers-extracted}/bin/vscode-html-language-server"
|
||||
"--stdio"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
enabledServers = [
|
||||
{
|
||||
name = "emmet_language_server";
|
||||
extraOptions = {
|
||||
cmd = [
|
||||
(lib.getExe pkgs.emmet-language-server)
|
||||
"--stdio"
|
||||
];
|
||||
filetypes = ["html"];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
plugins = {
|
||||
conform-nvim.settings = {
|
||||
formatters_by_ft = {
|
||||
json = ["jq"];
|
||||
};
|
||||
|
||||
formatters = {
|
||||
jq = {
|
||||
command = "${pkgs.jq}/bin/jq";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lint = {
|
||||
lintersByFt = {
|
||||
json = ["jsonlint"];
|
||||
};
|
||||
|
||||
linters = {
|
||||
jsonlint = {
|
||||
cmd = "${pkgs.nodePackages_latest.jsonlint}/bin/jsonlint";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lsp.servers.jsonls = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
plugins = {
|
||||
lsp.servers.lua_ls.enable = true;
|
||||
|
||||
conform-nvim.settings = {
|
||||
formatters_by_ft = {
|
||||
lua = ["stylua"];
|
||||
};
|
||||
|
||||
formatters = {
|
||||
stylua = {
|
||||
command = "${pkgs.stylua}/bin/stylua";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lint = {
|
||||
lintersByFt.lua = ["luacheck"];
|
||||
linters.luacheck.cmd = "${pkgs.lua54Packages.luacheck}/bin/luacheck";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
extraPackages = with pkgs; [
|
||||
marksman
|
||||
];
|
||||
|
||||
plugins = {
|
||||
clipboard-image = {
|
||||
enable = true;
|
||||
clipboardPackage = pkgs.wl-clipboard;
|
||||
};
|
||||
|
||||
image = {
|
||||
enable = lib.nixvim.enableExceptInTests;
|
||||
settings.integrations.markdown = {
|
||||
clearInInsertMode = true;
|
||||
onlyRenderImageAtCursor = true;
|
||||
};
|
||||
};
|
||||
|
||||
markdown-preview = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
render-markdown = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
lsp.servers = {
|
||||
marksman.enable = true;
|
||||
|
||||
ltex = {
|
||||
enable = true;
|
||||
filetypes = [
|
||||
"markdown"
|
||||
"text"
|
||||
];
|
||||
|
||||
settings.completionEnabled = true;
|
||||
|
||||
extraOptions = {
|
||||
checkFrequency = "save";
|
||||
language = "en-GB";
|
||||
};
|
||||
};
|
||||
};
|
||||
# markdownlint-cli2 have problems in build.
|
||||
# need to try a newer version in future,
|
||||
# lint = {
|
||||
# lintersByFt.md = [ "markdownlint-cli2" ];
|
||||
# linters.markdownlint-cli2.cmd = "${pkgs.markdownlint-cli2}/bin/markdownlint-cli2";
|
||||
# };
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>m";
|
||||
action = "<cmd>MarkdownPreviewToggle<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Toggle markdown preview";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
{pkgs, ...}: let
|
||||
flake = "/home/atp/System/atpos/";
|
||||
in {
|
||||
plugins = {
|
||||
nix.enable = true;
|
||||
hmts.enable = true;
|
||||
nix-develop.enable = true;
|
||||
|
||||
conform-nvim.settings = {
|
||||
formatters_by_ft = {
|
||||
nix = ["alejandra"];
|
||||
};
|
||||
|
||||
formatters = {
|
||||
alejandra = {
|
||||
command = "${pkgs.alejandra}/bin/alejandra";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lint = {
|
||||
lintersByFt = {
|
||||
nix = ["statix"];
|
||||
};
|
||||
|
||||
linters = {
|
||||
statix = {
|
||||
cmd = "${pkgs.statix}/bin/statix";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lsp.servers.nixd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
nixpkgs.expr = ''import (builtins.getFlake "${flake}").inputs.nixpkgs { }'';
|
||||
options = {
|
||||
nixos.expr = ''(builtins.getFlake "${flake}").nixosConfigurations.alfhiem.options'';
|
||||
home_manager.expr = ''(builtins.getFlake "${flake}").nixosConfigurations.alfhiem.options'';
|
||||
};
|
||||
flake_parts.expr = ''let flake = builtins.getFlake ("${flake}"); in flake.debug.options // flake.currentSystem.options'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
extraConfigVim = ''
|
||||
au BufRead,BufNewFile flake.lock setf json
|
||||
'';
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
plugins = {
|
||||
dap.extensions.dap-python.enable = true;
|
||||
|
||||
conform-nvim.settings = {
|
||||
formatters_by_ft.python = [
|
||||
"ruff_format"
|
||||
"ruff_organize_imports"
|
||||
];
|
||||
};
|
||||
|
||||
lint = {
|
||||
lintersByFt.python = ["mypy"];
|
||||
linters.mypy = {
|
||||
cmd = "${pkgs.mypy}/bin/mypy";
|
||||
args = ["--ignore-missing-imports"];
|
||||
};
|
||||
};
|
||||
|
||||
lsp.servers = {
|
||||
pyright = {
|
||||
enable = true;
|
||||
extraOptions.settings = {
|
||||
# Using Ruff's import organizer
|
||||
pyright.disableOrganizeImports = true;
|
||||
python.analysis = {
|
||||
# Ignore all files for analysis to exclusively use Ruff for linting
|
||||
ignore.__raw = ''{ '*' }'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ruff = {
|
||||
enable = true;
|
||||
onAttach.function = ''
|
||||
if client.name == 'ruff' then
|
||||
-- Disable hover in favor of Pyright
|
||||
client.server_capabilities.hoverProvider = false
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
plugins = {
|
||||
conform-nvim.settings = {
|
||||
formatters_by_ft = {
|
||||
sh = ["shfmt"];
|
||||
};
|
||||
formatters = {
|
||||
shfmt = {
|
||||
command = "${pkgs.shfmt}/bin/shfmt";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lsp.servers.bashls.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
plugins = {
|
||||
conform-nvim.settings = {
|
||||
formatters_by_ft = {
|
||||
javascript = ["eslint_d"];
|
||||
javascriptreact = ["eslint_d"];
|
||||
typescript = ["eslint_d"];
|
||||
typescriptreact = ["eslint_d"];
|
||||
svelte = ["eslint_d"];
|
||||
};
|
||||
|
||||
formatters.eslint_d = {
|
||||
command = "${pkgs.eslint_d}/bin/eslint_d";
|
||||
};
|
||||
};
|
||||
|
||||
lsp.servers = {
|
||||
svelte.enable = true;
|
||||
|
||||
eslint = {
|
||||
enable = true;
|
||||
filetypes = [
|
||||
"javascript"
|
||||
"javascriptreact"
|
||||
"javascript.jsx"
|
||||
"typescript"
|
||||
"typescriptreact"
|
||||
"typescript.tsx"
|
||||
"vue"
|
||||
"html"
|
||||
"markdown"
|
||||
"json"
|
||||
"jsonc"
|
||||
"yaml"
|
||||
"toml"
|
||||
"xml"
|
||||
"gql"
|
||||
"graphql"
|
||||
"svelte"
|
||||
"css"
|
||||
"less"
|
||||
"scss"
|
||||
"pcss"
|
||||
"postcss"
|
||||
];
|
||||
};
|
||||
|
||||
ts_ls = {
|
||||
enable = true;
|
||||
filetypes = [
|
||||
"javascript"
|
||||
"javascriptreact"
|
||||
"typescript"
|
||||
"typescriptreact"
|
||||
"svelte"
|
||||
];
|
||||
|
||||
settings = {
|
||||
complete_function_calls = true;
|
||||
vtsls = {
|
||||
autoUseWorkspaceTsdk = true;
|
||||
experimental = {
|
||||
completion = {
|
||||
enableServerSideFuzzyMatch = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
typescript = {
|
||||
updateImportsOnFileMove.enabled = "always";
|
||||
suggest = {
|
||||
completeFunctionCalls = true;
|
||||
};
|
||||
|
||||
inlayHints = {
|
||||
enumMemberValues.enabled = true;
|
||||
functionLikeReturnTypes.enabled = true;
|
||||
parameterNames.enabled = "literals";
|
||||
parameterTypes.enabled = true;
|
||||
propertyDeclarationTypes.enabled = true;
|
||||
variableType.enabled = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ts-autotag.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
plugins.lsp.servers.yamlls = {
|
||||
enable = true;
|
||||
extraOptions = {
|
||||
capabilities = {
|
||||
textDocument = {
|
||||
foldingRange = {
|
||||
dynamicRegistration = false;
|
||||
lineFoldingOnly = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
plugins.conform-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
format_on_save = {
|
||||
lspFallback = true;
|
||||
timeoutMs = 500;
|
||||
};
|
||||
formatters_by_ft = {
|
||||
# Use the "_" filetype to run formatters on filetypes that don't have other formatters configured.
|
||||
"_" = [
|
||||
"squeeze_blanks"
|
||||
"trim_whitespace"
|
||||
"trim_newlines"
|
||||
];
|
||||
};
|
||||
formatters = {
|
||||
_ = {
|
||||
command = "${pkgs.gawk}/bin/gawk";
|
||||
};
|
||||
squeeze_blanks = {
|
||||
command = lib.getExe' pkgs.coreutils "cat";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
key = "<leader>cf";
|
||||
action = "<cmd>lua require('conform').format()<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Format";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
{lib, ...}: {
|
||||
plugins.fidget = {
|
||||
enable = true;
|
||||
settings = {
|
||||
logger = {
|
||||
level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
|
||||
float_precision = 0.01; # Limit the number of decimals displayed for floats
|
||||
};
|
||||
notification = {
|
||||
poll_rate = 10; # How frequently to update and render notifications
|
||||
filter = "info"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
|
||||
history_size = 128; # Number of removed messages to retain in history
|
||||
override_vim_notify = true;
|
||||
|
||||
window = {
|
||||
normal_hl = "Comment";
|
||||
winblend = 0;
|
||||
border = "none"; # none, single, double, rounded, solid, shadow
|
||||
zindex = 45;
|
||||
max_width = 0;
|
||||
max_height = 0;
|
||||
x_padding = 1;
|
||||
y_padding = 0;
|
||||
align = "bottom";
|
||||
relative = "editor";
|
||||
};
|
||||
view = {
|
||||
stack_upwards = true; # Display notification items from bottom to top
|
||||
icon_separator = " "; # Separator between group name and icon
|
||||
group_separator = "---"; # Separator between notification groups
|
||||
group_separator_hl =
|
||||
# Highlight group used for group separator
|
||||
"Comment";
|
||||
};
|
||||
};
|
||||
progress = {
|
||||
poll_rate = 0; # How and when to poll for progress messages
|
||||
suppress_on_insert = true; # Suppress new messages while in insert mode
|
||||
ignore_done_already = false; # Ignore new tasks that are already complete
|
||||
ignore_empty_message = false; # Ignore new tasks that don't contain a message
|
||||
clear_on_detach =
|
||||
# Clear notification group when LSP server detaches
|
||||
''
|
||||
function(client_id)
|
||||
local client = vim.lsp.get_client_by_id(client_id)
|
||||
return client and client.name or nil
|
||||
end
|
||||
'';
|
||||
notification_group =
|
||||
# How to get a progress message's notification group key
|
||||
''
|
||||
function(msg) return msg.lsp_client.name end
|
||||
'';
|
||||
ignore = []; # List of LSP servers to ignore
|
||||
lsp = {
|
||||
progress_ringbuf_size = 0; # Configure the nvim's LSP progress ring buffer size
|
||||
};
|
||||
display = {
|
||||
render_limit = 16; # How many LSP messages to show at once
|
||||
done_ttl = 3; # How long a message should persist after completion
|
||||
done_icon = "✔"; # Icon shown when all LSP progress tasks are complete
|
||||
done_style = "Constant"; # Highlight group for completed LSP tasks
|
||||
progress_ttl = lib.nixvim.mkRaw "math.huge"; # How long a message should persist when in progress
|
||||
progress_icon = {
|
||||
pattern = "dots";
|
||||
period = 1;
|
||||
}; # Icon shown when LSP progress tasks are in progress
|
||||
progress_style = "WarningMsg"; # Highlight group for in-progress LSP tasks
|
||||
group_style = "Title"; # Highlight group for group name (LSP server name)
|
||||
icon_style = "Question"; # Highlight group for group icons
|
||||
priority = 30; # Ordering priority for LSP notification group
|
||||
skip_history = true; # Whether progress notifications should be omitted from history
|
||||
format_message = ''
|
||||
require ("fidget.progress.display").default_format_message
|
||||
''; # How to format a progress message
|
||||
format_annote = ''
|
||||
function (msg) return msg.title end
|
||||
''; # How to format a progress annotation
|
||||
format_group_name = ''
|
||||
function (group) return tostring (group) end
|
||||
''; # How to format a progress notification group's name
|
||||
overrides = {
|
||||
rust_analyzer = {
|
||||
name = "rust-analyzer";
|
||||
};
|
||||
}; # Override options from the default notification config
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
plugins = {
|
||||
lsp-signature.enable = true;
|
||||
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers.typos_lsp.enable = true;
|
||||
keymaps.lspBuf = {
|
||||
"<c-k>" = "signature_help";
|
||||
"gi" = "implementation";
|
||||
};
|
||||
};
|
||||
lint.enable = true;
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>cl";
|
||||
action = "<cmd>LspInfo<cr>";
|
||||
options.desc = "Lsp Info";
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,184 +0,0 @@
|
||||
{
|
||||
plugins = {
|
||||
lspsaga = {
|
||||
enable = true;
|
||||
settings = {
|
||||
beacon.enable = true;
|
||||
outline = {
|
||||
close_after_jump = true;
|
||||
layout = "normal"; # normal or float
|
||||
win_position = "right"; # left or right
|
||||
keys = {
|
||||
jump = "e";
|
||||
quit = "q";
|
||||
toggle_or_jump = "o";
|
||||
};
|
||||
};
|
||||
symbol_in_winbar = {
|
||||
enable = true; # Breadcrumbs
|
||||
show_file = false;
|
||||
};
|
||||
rename.keys = {
|
||||
exec = "<CR>";
|
||||
quit = [
|
||||
"<C-k>"
|
||||
"<Esc>"
|
||||
];
|
||||
select = "x";
|
||||
};
|
||||
scroll_preview = {
|
||||
scroll_up = "<C-d>";
|
||||
scroll_down = "<C-u>";
|
||||
};
|
||||
lightbulb = {
|
||||
enable = true;
|
||||
sign = true;
|
||||
};
|
||||
code_action = {
|
||||
show_server_name = true;
|
||||
num_shortcut = false;
|
||||
only_in_cursor = false;
|
||||
keys = {
|
||||
exec = "<CR>";
|
||||
quit = [
|
||||
"<Esc>"
|
||||
"q"
|
||||
];
|
||||
};
|
||||
};
|
||||
ui.border = "rounded"; # One of none, single, double, rounded, solid, shadow
|
||||
hover = {
|
||||
openCmd = "!firfox";
|
||||
openLink = "gx";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
which-key.settings.spec = [
|
||||
{
|
||||
__unkeyed-1 = "gp";
|
||||
mode = "n";
|
||||
group = "+peek";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "K";
|
||||
# action = "<cmd>Lspsaga hover_doc<CR>";
|
||||
action.__raw = ''
|
||||
function()
|
||||
local winid = require("ufo").peekFoldedLinesUnderCursor()
|
||||
if not winid then
|
||||
vim.cmd("Lspsaga hover_doc")
|
||||
end
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
desc = "Hover";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>lo";
|
||||
action = "<cmd>Lspsaga outline<CR>";
|
||||
options = {
|
||||
desc = "Outline";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>lr";
|
||||
action = "<cmd>Lspsaga rename<CR>";
|
||||
options = {
|
||||
desc = "Rename";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ca";
|
||||
action = "<cmd>Lspsaga code_action<CR>";
|
||||
options = {
|
||||
desc = "Code Action";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>cd";
|
||||
action = "<cmd>Lspsaga show_buf_diagnostics<CR>";
|
||||
options = {
|
||||
desc = "Line Diagnostics";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "gd";
|
||||
action = "<cmd>Lspsaga goto_definition<CR>";
|
||||
options = {
|
||||
desc = "Goto Definition";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "gt";
|
||||
action = "<cmd>Lspsaga goto_type_definition<CR>";
|
||||
options = {
|
||||
desc = "Type Definitions";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "gpd";
|
||||
action = "<cmd>Lspsaga peek_definition<CR>";
|
||||
options = {
|
||||
desc = "Peek Definitions";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "gpt";
|
||||
action = "<cmd>Lspsaga peek_type_definition<CR>";
|
||||
options = {
|
||||
desc = "Peek Type Definitions";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "gl";
|
||||
action = "<cmd>Lspsaga show_line_diagnostics<CR>";
|
||||
options = {
|
||||
desc = "Line Diagnostics";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "[d";
|
||||
action = "<cmd>Lspsaga diagnostic_jump_next<CR>";
|
||||
options = {
|
||||
desc = "Next Diagnostic";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "]d";
|
||||
action = "<cmd>Lspsaga diagnostic_jump_prev<CR>";
|
||||
options = {
|
||||
desc = "Previous Diagnostic";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
{
|
||||
plugins.trouble = {
|
||||
enable = true;
|
||||
settings.auto_close = true;
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>x";
|
||||
action = "+diagnostics/quickfix";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>xx";
|
||||
action = "<cmd>TroubleToggle<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Document Diagnostics (Trouble)";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>xX";
|
||||
action = "<cmd>TroubleToggle workspace_diagnostics<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Workspace Diagnostics (Trouble)";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>xt";
|
||||
action = "<cmd>TroubleToggle todo<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Todo (Trouble)";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>xq";
|
||||
action = "<cmd>TodoQuickFix<cr>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Quickfix List (Trouble)";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
plugins.luasnip = {
|
||||
enable = true;
|
||||
settings = {
|
||||
enable_autosnippets = true;
|
||||
store_selection_keys = "<Tab>";
|
||||
};
|
||||
fromVscode = [
|
||||
{
|
||||
lazyLoad = true;
|
||||
paths = "${pkgs.vimPlugins.friendly-snippets}";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,144 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
plugins = {
|
||||
project-nvim.enableTelescope = true;
|
||||
telescope = {
|
||||
enable = true;
|
||||
extensions = {
|
||||
fzf-native.enable = true;
|
||||
undo.enable = true;
|
||||
ui-select = {
|
||||
settings = {
|
||||
specific_opts = {
|
||||
codeactions = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
settings.defaults = {
|
||||
prompt_prefix = " ";
|
||||
color_devicons = true;
|
||||
set_env.COLORTERM = "truecolor";
|
||||
|
||||
mappings = {
|
||||
i = {
|
||||
# Have Telescope not to enter a normal-like mode when hitting escape (and instead exiting), you can map <Esc> to do so via:
|
||||
"<esc>".__raw = ''
|
||||
function(...)
|
||||
return require("telescope.actions").close(...)
|
||||
end'';
|
||||
"<c-t>".__raw = ''
|
||||
function(...)
|
||||
require('trouble.providers.telescope').open_with_trouble(...);
|
||||
end
|
||||
'';
|
||||
};
|
||||
n = {
|
||||
"<c-t>".__raw = ''
|
||||
function(...)
|
||||
require('trouble.providers.telescope').open_with_trouble(...);
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
# trim leading whitespace from grep
|
||||
vimgrep_arguments = [
|
||||
"${pkgs.ripgrep}/bin/rg"
|
||||
"--color=never"
|
||||
"--no-heading"
|
||||
"--with-filename"
|
||||
"--line-number"
|
||||
"--column"
|
||||
"--smart-case"
|
||||
"--trim"
|
||||
];
|
||||
};
|
||||
keymaps = {
|
||||
"<leader>fp" = {
|
||||
action = "projects";
|
||||
options.desc = "Search Todo";
|
||||
};
|
||||
"<leader>st" = {
|
||||
action = "todo-comments";
|
||||
options.desc = "Search Todo";
|
||||
};
|
||||
"<leader>sn" = {
|
||||
action = "notify";
|
||||
options.desc = "Search Notifications";
|
||||
};
|
||||
"<leader>su" = {
|
||||
action = "undo";
|
||||
options.desc = "Search Undo";
|
||||
};
|
||||
"<leader><space>" = {
|
||||
action = "find_files";
|
||||
options.desc = "Find project files";
|
||||
};
|
||||
"<leader>ff" = {
|
||||
action = "find_files hidden=true";
|
||||
options.desc = "Find project files";
|
||||
};
|
||||
"<leader>/" = {
|
||||
action = "live_grep";
|
||||
options.desc = "Grep (root dir)";
|
||||
};
|
||||
"<leader>:" = {
|
||||
action = "command_history";
|
||||
options.desc = "Command History";
|
||||
};
|
||||
"<leader>fr" = {
|
||||
action = "oldfiles";
|
||||
options.desc = "Recent";
|
||||
};
|
||||
"<c-p>" = {
|
||||
mode = [
|
||||
"n"
|
||||
"i"
|
||||
];
|
||||
action = "registers";
|
||||
options.desc = "Select register to paste";
|
||||
};
|
||||
"<leader>gc" = {
|
||||
action = "git_commits";
|
||||
options.desc = "commits";
|
||||
};
|
||||
"<leader>sa" = {
|
||||
action = "autocommands";
|
||||
options.desc = "Auto Commands";
|
||||
};
|
||||
"<leader>sc" = {
|
||||
action = "commands";
|
||||
options.desc = "Commands";
|
||||
};
|
||||
"<leader>sd" = {
|
||||
action = "diagnostics bufnr=0";
|
||||
options.desc = "Workspace diagnostics";
|
||||
};
|
||||
"<leader>sh" = {
|
||||
action = "help_tags";
|
||||
options.desc = "Help pages";
|
||||
};
|
||||
"<leader>sk" = {
|
||||
action = "keymaps";
|
||||
options.desc = "Key maps";
|
||||
};
|
||||
"<leader>sM" = {
|
||||
action = "man_pages";
|
||||
options.desc = "Man pages";
|
||||
};
|
||||
"<leader>sm" = {
|
||||
action = "marks";
|
||||
options.desc = "Jump to Mark";
|
||||
};
|
||||
"<leader>so" = {
|
||||
action = "vim_options";
|
||||
options.desc = "Options";
|
||||
};
|
||||
"<leader>uC" = {
|
||||
action = "colorscheme";
|
||||
options.desc = "Colorscheme preview";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
{
|
||||
colorschemes = {
|
||||
catppuccin = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = {
|
||||
light = "macchiato";
|
||||
dark = "mocha";
|
||||
};
|
||||
flavour = "macchiato"; # “latte”, “mocha”, “frappe”, “macchiato”, “auto”
|
||||
transparent_background = true;
|
||||
integrations = {
|
||||
cmp = true;
|
||||
flash = true;
|
||||
fidget = true;
|
||||
gitsigns = true;
|
||||
indent_blankline.enabled = true;
|
||||
lsp_trouble = true;
|
||||
mini.enabled = true;
|
||||
neotree = true;
|
||||
noice = true;
|
||||
notify = true;
|
||||
telescope.enabled = true;
|
||||
treesitter = true;
|
||||
treesitter_context = true;
|
||||
which_key = true;
|
||||
native_lsp = {
|
||||
enabled = true;
|
||||
inlay_hints = {
|
||||
background = true;
|
||||
};
|
||||
virtual_text = {
|
||||
errors = ["italic"];
|
||||
hints = ["italic"];
|
||||
information = ["italic"];
|
||||
warnings = ["italic"];
|
||||
ok = ["italic"];
|
||||
};
|
||||
underlines = {
|
||||
errors = ["underline"];
|
||||
hints = ["underline"];
|
||||
information = ["underline"];
|
||||
warnings = ["underline"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
{
|
||||
plugins.treesitter-textobjects = {
|
||||
enable = true;
|
||||
select = {
|
||||
enable = true;
|
||||
lookahead = true;
|
||||
keymaps = {
|
||||
"aa" = "@parameter.outer";
|
||||
"ia" = "@parameter.inner";
|
||||
"af" = "@function.outer";
|
||||
"if" = "@function.inner";
|
||||
"ac" = "@class.outer";
|
||||
"ic" = "@class.inner";
|
||||
"ii" = "@conditional.inner";
|
||||
"ai" = "@conditional.outer";
|
||||
"il" = "@loop.inner";
|
||||
"al" = "@loop.outer";
|
||||
"at" = "@comment.outer";
|
||||
};
|
||||
};
|
||||
move = {
|
||||
enable = true;
|
||||
gotoNextStart = {
|
||||
"]m" = "@function.outer";
|
||||
"]]" = "@class.outer";
|
||||
};
|
||||
gotoNextEnd = {
|
||||
"]M" = "@function.outer";
|
||||
"][" = "@class.outer";
|
||||
};
|
||||
gotoPreviousStart = {
|
||||
"[m" = "@function.outer";
|
||||
"[[" = "@class.outer";
|
||||
};
|
||||
gotoPreviousEnd = {
|
||||
"[M" = "@function.outer";
|
||||
"[]" = "@class.outer";
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
enable = true;
|
||||
swapNext = {
|
||||
"<leader>a" = "@parameters.inner";
|
||||
};
|
||||
swapPrevious = {
|
||||
"<leader>A" = "@parameter.outer";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
settings = {
|
||||
highlight.enable = true;
|
||||
incremental_selection.enable = true;
|
||||
indent.enable = true;
|
||||
};
|
||||
nixvimInjections = true;
|
||||
};
|
||||
treesitter-context.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,178 +0,0 @@
|
||||
{
|
||||
plugins.alpha = {
|
||||
enable = true;
|
||||
layout = let
|
||||
padding = val: {
|
||||
type = "padding";
|
||||
inherit val;
|
||||
};
|
||||
in [
|
||||
(padding 4)
|
||||
{
|
||||
opts = {
|
||||
hl = "AlphaHeader";
|
||||
position = "center";
|
||||
};
|
||||
type = "text";
|
||||
val = [
|
||||
"███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗"
|
||||
"████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║"
|
||||
"██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║"
|
||||
"██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║"
|
||||
"██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║"
|
||||
"╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝"
|
||||
];
|
||||
}
|
||||
(padding 6)
|
||||
{
|
||||
type = "button";
|
||||
val = " Find File";
|
||||
on_press.raw = "require('telescope.builtin').find_files";
|
||||
opts = {
|
||||
keymap = [
|
||||
"n"
|
||||
"f"
|
||||
":Telescope find_files <CR>"
|
||||
{
|
||||
noremap = true;
|
||||
silent = true;
|
||||
nowait = true;
|
||||
}
|
||||
];
|
||||
shortcut = "f";
|
||||
|
||||
position = "center";
|
||||
cursor = 3;
|
||||
width = 40;
|
||||
align_shortcut = "right";
|
||||
hl_shortcut = "Keyword";
|
||||
};
|
||||
}
|
||||
(padding 1)
|
||||
{
|
||||
type = "button";
|
||||
val = " New File";
|
||||
on_press.__raw = "function() vim.cmd[[ene]] end";
|
||||
opts = {
|
||||
keymap = [
|
||||
"n"
|
||||
"n"
|
||||
":ene <BAR> startinsert <CR>"
|
||||
{
|
||||
noremap = true;
|
||||
silent = true;
|
||||
nowait = true;
|
||||
}
|
||||
];
|
||||
shortcut = "n";
|
||||
|
||||
position = "center";
|
||||
cursor = 3;
|
||||
width = 40;
|
||||
align_shortcut = "right";
|
||||
hl_shortcut = "Keyword";
|
||||
};
|
||||
}
|
||||
(padding 1)
|
||||
{
|
||||
type = "button";
|
||||
val = " Recent Files";
|
||||
on_press.raw = "require('telescope.builtin').oldfiles";
|
||||
opts = {
|
||||
keymap = [
|
||||
"n"
|
||||
"r"
|
||||
":Telescope oldfiles <CR>"
|
||||
{
|
||||
noremap = true;
|
||||
silent = true;
|
||||
nowait = true;
|
||||
}
|
||||
];
|
||||
shortcut = "r";
|
||||
|
||||
position = "center";
|
||||
cursor = 3;
|
||||
width = 40;
|
||||
align_shortcut = "right";
|
||||
hl_shortcut = "Keyword";
|
||||
};
|
||||
}
|
||||
(padding 1)
|
||||
{
|
||||
type = "button";
|
||||
val = " Find Word";
|
||||
on_press.raw = "require('telescope.builtin').live_grep";
|
||||
opts = {
|
||||
keymap = [
|
||||
"n"
|
||||
"g"
|
||||
":Telescope live_grep <CR>"
|
||||
{
|
||||
noremap = true;
|
||||
silent = true;
|
||||
nowait = true;
|
||||
}
|
||||
];
|
||||
shortcut = "g";
|
||||
|
||||
position = "center";
|
||||
cursor = 3;
|
||||
width = 40;
|
||||
align_shortcut = "right";
|
||||
hl_shortcut = "Keyword";
|
||||
};
|
||||
}
|
||||
(padding 1)
|
||||
{
|
||||
type = "button";
|
||||
val = " Restore Session";
|
||||
on_press.raw = "require('persistence').load()";
|
||||
opts = {
|
||||
keymap = [
|
||||
"n"
|
||||
"s"
|
||||
":lua require('persistence').load()<cr>"
|
||||
{
|
||||
noremap = true;
|
||||
silent = true;
|
||||
nowait = true;
|
||||
}
|
||||
];
|
||||
shortcut = "s";
|
||||
|
||||
position = "center";
|
||||
cursor = 3;
|
||||
width = 40;
|
||||
align_shortcut = "right";
|
||||
hl_shortcut = "Keyword";
|
||||
};
|
||||
}
|
||||
(padding 1)
|
||||
{
|
||||
type = "button";
|
||||
val = " Quit Neovim";
|
||||
on_press.__raw = "function() vim.cmd[[qa]] end";
|
||||
opts = {
|
||||
keymap = [
|
||||
"n"
|
||||
"q"
|
||||
":qa<CR>"
|
||||
{
|
||||
noremap = true;
|
||||
silent = true;
|
||||
nowait = true;
|
||||
}
|
||||
];
|
||||
shortcut = "q";
|
||||
|
||||
position = "center";
|
||||
cursor = 3;
|
||||
width = 40;
|
||||
align_shortcut = "right";
|
||||
hl_shortcut = "Keyword";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,172 +0,0 @@
|
||||
{
|
||||
plugins = {
|
||||
bufferline = {
|
||||
enable = true;
|
||||
settings = {
|
||||
highlights = {
|
||||
background = {
|
||||
bg = "#252434";
|
||||
fg = "#605f6f";
|
||||
};
|
||||
|
||||
buffer_selected = {
|
||||
bg = "#1E1D2D";
|
||||
fg = "#D9E0EE";
|
||||
};
|
||||
buffer_visible = {
|
||||
fg = "#605f6f";
|
||||
bg = "#252434";
|
||||
};
|
||||
|
||||
error = {
|
||||
fg = "#605f6f";
|
||||
bg = "#252434";
|
||||
};
|
||||
error_diagnostic = {
|
||||
fg = "#605f6f";
|
||||
bg = "#252434";
|
||||
};
|
||||
|
||||
close_button = {
|
||||
fg = "#605f6f";
|
||||
bg = "#252434";
|
||||
};
|
||||
close_button_visible = {
|
||||
fg = "#605f6f";
|
||||
bg = "#252434";
|
||||
};
|
||||
fill = {
|
||||
bg = "#1E1D2D";
|
||||
fg = "#605f6f";
|
||||
};
|
||||
indicator_selected = {
|
||||
bg = "#1E1D2D";
|
||||
fg = "#1E1D2D";
|
||||
};
|
||||
|
||||
modified = {
|
||||
fg = "#F38BA8";
|
||||
bg = "#252434";
|
||||
};
|
||||
modified_visible = {
|
||||
fg = "#F38BA8";
|
||||
bg = "#252434";
|
||||
};
|
||||
modified_selected = {
|
||||
fg = "#ABE9B3";
|
||||
bg = "#1E1D2D";
|
||||
};
|
||||
|
||||
separator = {
|
||||
bg = "#252434";
|
||||
fg = "#252434";
|
||||
};
|
||||
separator_visible = {
|
||||
bg = "#252434";
|
||||
fg = "#252434";
|
||||
};
|
||||
separator_selected = {
|
||||
bg = "#252434";
|
||||
fg = "#252434";
|
||||
};
|
||||
|
||||
duplicate = {
|
||||
fg = "NONE";
|
||||
bg = "#252434";
|
||||
};
|
||||
duplicate_selected = {
|
||||
fg = "#F38BA8";
|
||||
bg = "#1E1D2D";
|
||||
};
|
||||
duplicate_visible = {
|
||||
fg = "#89B4FA";
|
||||
bg = "#252434";
|
||||
};
|
||||
};
|
||||
|
||||
options.offsets = [
|
||||
{
|
||||
filetype = "neo-tree";
|
||||
text = "Neo-tree";
|
||||
highlight = "Directory";
|
||||
text_align = "left";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-Tab>";
|
||||
action = "<cmd>BufferLineCycleNext<cr>";
|
||||
options = {
|
||||
desc = "Cycle to next buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-S-Tab>";
|
||||
action = "<cmd>BufferLineCyclePrev<cr>";
|
||||
options = {
|
||||
desc = "Cycle to previous buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-x>";
|
||||
action = "<cmd>:bp | bd #<cr>";
|
||||
options = {
|
||||
desc = "Delete buffer";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>br";
|
||||
action = "<cmd>BufferLineCloseRight<cr>";
|
||||
options = {
|
||||
desc = "Delete buffers to the right";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bl";
|
||||
action = "<cmd>BufferLineCloseLeft<cr>";
|
||||
options = {
|
||||
desc = "Delete buffers to the left";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bo";
|
||||
action = "<cmd>BufferLineCloseOthers<cr>";
|
||||
options = {
|
||||
desc = "Delete other buffers";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bp";
|
||||
action = "<cmd>BufferLineTogglePin<cr>";
|
||||
options = {
|
||||
desc = "Toggle pin";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bP";
|
||||
action = "<Cmd>BufferLineGroupClose ungrouped<CR>";
|
||||
options = {
|
||||
desc = "Delete non-pinned buffers";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
{
|
||||
plugins.flash = {
|
||||
enable = true;
|
||||
settings.label.uppercase = false;
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = [
|
||||
"n"
|
||||
"x"
|
||||
"o"
|
||||
];
|
||||
key = "s";
|
||||
action = "<cmd>lua require('flash').jump()<cr>";
|
||||
options = {
|
||||
desc = "Flash";
|
||||
};
|
||||
}
|
||||
# {
|
||||
# mode = [ "n" "x" "o" ];
|
||||
# key = "S";
|
||||
# action = "<cmd>lua require('flash').treesitter()<cr>";
|
||||
# options = {
|
||||
# desc = "Flash Treesitter";
|
||||
# };
|
||||
# }
|
||||
{
|
||||
mode = [
|
||||
"x"
|
||||
"o"
|
||||
];
|
||||
key = "R";
|
||||
action = "<cmd>lua require('flash').treesitter_search()<cr>";
|
||||
options = {
|
||||
desc = "Treesitter Search";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
plugins = {
|
||||
trim.enable = true;
|
||||
neoscroll.enable = true;
|
||||
dressing.enable = true;
|
||||
todo-comments.enable = true;
|
||||
web-devicons.enable = true;
|
||||
nui.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
{
|
||||
plugins = {
|
||||
indent-blankline = {
|
||||
enable = true;
|
||||
settings = {
|
||||
indent = {
|
||||
char = "│"; # "│" or "▎"
|
||||
tab_char = "│";
|
||||
};
|
||||
scope.enabled = false;
|
||||
exclude = {
|
||||
buftypes = ["terminal" "nofile"];
|
||||
filetypes = [
|
||||
"help"
|
||||
"alpha"
|
||||
"dashboard"
|
||||
"neo-tree"
|
||||
"Trouble"
|
||||
"trouble"
|
||||
"lazy"
|
||||
"mason"
|
||||
"notify"
|
||||
"toggleterm"
|
||||
"lazyterm"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,129 +0,0 @@
|
||||
{
|
||||
plugins.lualine = {
|
||||
enable = true;
|
||||
settings = {
|
||||
options = {
|
||||
always_divide_middle = true;
|
||||
ignore_focus = ["neo-tree"];
|
||||
globalstatus = true; # have a single statusline at bottom of neovim instead of one for every window
|
||||
disabled_filetypes.statusline = [
|
||||
"dashboard"
|
||||
"alpha"
|
||||
];
|
||||
section_separators = {
|
||||
left = "";
|
||||
right = "";
|
||||
};
|
||||
};
|
||||
extensions = ["fzf"];
|
||||
sections = {
|
||||
lualine_a = ["mode"];
|
||||
lualine_b = ["branch"];
|
||||
lualine_y = [
|
||||
"progress"
|
||||
{
|
||||
separator = "";
|
||||
}
|
||||
"location"
|
||||
{
|
||||
padding = {
|
||||
left = 0;
|
||||
right = 1;
|
||||
};
|
||||
}
|
||||
];
|
||||
lualine_z = [''" " .. os.date("%R")''];
|
||||
};
|
||||
};
|
||||
};
|
||||
extraConfigLua = ''
|
||||
local ui = {}
|
||||
|
||||
function ui.fg(name)
|
||||
local hl = vim.api.nvim_get_hl and vim.api.nvim_get_hl(0, { name = name }) or vim.api.nvim_get_hl_by_name(name, true)
|
||||
local fg = hl and (hl.fg or hl.foreground)
|
||||
return fg and { fg = string.format("#%06x", fg) } or nil
|
||||
end
|
||||
|
||||
---@param opts? {relative: "cwd"|"root", modified_hl: string?}
|
||||
function ui.pretty_path(opts)
|
||||
opts = vim.tbl_extend("force", {
|
||||
relative = "cwd",
|
||||
modified_hl = "Constant",
|
||||
}, opts or {})
|
||||
|
||||
return function(self)
|
||||
local path = vim.fn.expand("%:p") --[[@as string]]
|
||||
|
||||
if path == "" then
|
||||
return ""
|
||||
end
|
||||
|
||||
local bufname = vim.fn.bufname(vim.fn.bufnr())
|
||||
local sep = package.config:sub(1, 1)
|
||||
|
||||
local root = (opts.relative == "root") and vim.fn.getcwd() or vim.fn.fnamemodify(bufname, ":h")
|
||||
local cwd = vim.fn.getcwd()
|
||||
|
||||
path = (opts.relative == "cwd" and path:find(cwd, 1, true) == 1) and path:sub(#cwd + 2) or path:sub(#root + 2)
|
||||
|
||||
local parts = vim.split(path, "[\\/]")
|
||||
if #parts > 3 then
|
||||
parts = { parts[1], "…", parts[#parts - 1], parts[#parts] }
|
||||
end
|
||||
|
||||
if opts.modified_hl and vim.bo.modified then
|
||||
local modified_hl_fg = ui.fg(opts.modified_hl)
|
||||
if modified_hl_fg then
|
||||
parts[#parts] = string.format("%%#%s#%s%%*", opts.modified_hl, parts[#parts])
|
||||
end
|
||||
end
|
||||
|
||||
return table.concat(parts, sep)
|
||||
end
|
||||
end
|
||||
|
||||
require("lualine").setup({
|
||||
sections = {
|
||||
lualine_c = {
|
||||
{
|
||||
"diagnostics",
|
||||
symbols = {
|
||||
error = " ",
|
||||
warn = " ",
|
||||
hint = " ",
|
||||
info = " ",
|
||||
},
|
||||
},
|
||||
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
|
||||
{ ui.pretty_path() },
|
||||
},
|
||||
lualine_x = {
|
||||
{
|
||||
function() return require("noice").api.status.command.get() end,
|
||||
cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end,
|
||||
color = ui.fg("Statement"),
|
||||
},
|
||||
{
|
||||
function() return require("noice").api.status.mode.get() end,
|
||||
cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end,
|
||||
color = ui.fg("Constant"),
|
||||
},
|
||||
{
|
||||
function() return " " .. require("dap").status() end,
|
||||
cond = function () return package.loaded["dap"] and require("dap").status() ~= "" end,
|
||||
color = ui.fg("Debug"),
|
||||
},
|
||||
{
|
||||
"diff",
|
||||
symbols = {
|
||||
added = " ",
|
||||
modified = " ",
|
||||
removed= " ",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
'';
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
{
|
||||
plugins.noice = {
|
||||
enable = true;
|
||||
settings = {
|
||||
lsp = {
|
||||
override = {
|
||||
"vim.lsp.util.convert_input_to_markdown_lines" = true;
|
||||
"vim.lsp.util.stylize_markdown" = true;
|
||||
"cmp.entry.get_documentation" = true;
|
||||
};
|
||||
progress.enabled = true;
|
||||
};
|
||||
|
||||
presets = {
|
||||
bottom_search = true;
|
||||
command_palette = true;
|
||||
long_message_to_split = true;
|
||||
inc_rename = true;
|
||||
lsp_doc_border = true;
|
||||
};
|
||||
notify.enabled = true;
|
||||
|
||||
routes = [
|
||||
{
|
||||
filter = {
|
||||
event = "msg_show";
|
||||
any = [
|
||||
{find = "%d+L, %d+B";}
|
||||
{find = "; after #%d+";}
|
||||
{find = "; before #%d+";}
|
||||
];
|
||||
};
|
||||
view = "mini";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
plugins.notify = {
|
||||
enable = true;
|
||||
# remove animations for preformance
|
||||
settings = {
|
||||
stages = "static";
|
||||
timeout = 4000;
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>un";
|
||||
action = ''
|
||||
<cmd>lua require("notify").dismiss({ silent = true, pending = true })<cr>
|
||||
'';
|
||||
options = {
|
||||
desc = "Dismiss All Notifications";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
extraConfigLua = ''
|
||||
local notify = require("notify")
|
||||
|
||||
local filtered_message = { "No information available" }
|
||||
|
||||
-- Override notify function to filter out messages
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
vim.notify = function(message, level, opts)
|
||||
local merged_opts = vim.tbl_extend("force", {
|
||||
on_open = function(win)
|
||||
local buf = vim.api.nvim_win_get_buf(win)
|
||||
vim.api.nvim_buf_set_option(buf, "filetype", "markdown")
|
||||
end,
|
||||
}, opts or {})
|
||||
|
||||
for _, msg in ipairs(filtered_message) do
|
||||
if message == msg then
|
||||
return
|
||||
end
|
||||
end
|
||||
return notify(message, level, merged_opts)
|
||||
end
|
||||
'';
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
plugins.precognition = {
|
||||
enable = true;
|
||||
settings = {
|
||||
startVisible = false;
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>up";
|
||||
action.__raw = ''
|
||||
function()
|
||||
if require("precognition").toggle() then
|
||||
vim.notify("Precognition on")
|
||||
else
|
||||
vim.notify("Precognition off")
|
||||
end
|
||||
end
|
||||
'';
|
||||
|
||||
options = {
|
||||
desc = "Precognition Toggle";
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
{
|
||||
plugins.toggleterm = {
|
||||
enable = true;
|
||||
settings = {
|
||||
size = ''
|
||||
function(term)
|
||||
if term.direction == "horizontal" then
|
||||
return 30
|
||||
elseif term.direction == "vertical" then
|
||||
return vim.o.columns * 0.4
|
||||
end
|
||||
end
|
||||
'';
|
||||
open_mapping = "[[<C-/>]]";
|
||||
hide_numbers = true;
|
||||
shade_terminals = true;
|
||||
start_in_insert = true;
|
||||
terminal_mappings = true;
|
||||
persist_mode = true;
|
||||
insert_mappings = true;
|
||||
close_on_exit = true;
|
||||
shell = "nu";
|
||||
direction = "horizontal"; # 'vertical' | 'horizontal' | 'tab' | 'float'
|
||||
float_opts = {
|
||||
border = "single"; # 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open
|
||||
width = 80;
|
||||
height = 20;
|
||||
winblend = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "t";
|
||||
key = "<C-g>";
|
||||
action = "<cmd>2ToggleTerm<cr>";
|
||||
options.desc = "Open/Close Terminal 2";
|
||||
}
|
||||
{
|
||||
mode = "t";
|
||||
key = "<C-Left>";
|
||||
action = "<cmd>wincmd h<cr>";
|
||||
options.desc = "Go to Left window";
|
||||
}
|
||||
{
|
||||
mode = "t";
|
||||
key = "<C-Right>";
|
||||
action = "<cmd>wincmd l<cr>";
|
||||
options.desc = "Go to Right window";
|
||||
}
|
||||
{
|
||||
mode = "t";
|
||||
key = "<C-Up>";
|
||||
action = "<cmd>wincmd k<cr>";
|
||||
options.desc = "Go to Up window";
|
||||
}
|
||||
{
|
||||
mode = "t";
|
||||
key = "<C-Down>";
|
||||
action = "<cmd>wincmd j<cr>";
|
||||
options.desc = "Go to Down window";
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
{lib, ...}: {
|
||||
autoCmd = [
|
||||
{
|
||||
event = [
|
||||
"BufEnter"
|
||||
"BufNew"
|
||||
];
|
||||
desc = "disable statuscolumn for neo-tree and dashboard";
|
||||
callback = lib.nixvim.mkRaw ''
|
||||
function()
|
||||
local ft_ignore = { "dashboard", "neo-tree" }
|
||||
if vim.tbl_contains(ft_ignore, vim.bo.filetype) then
|
||||
vim.cmd("setlocal foldcolumn=0")
|
||||
end
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
plugins = {
|
||||
statuscol = {
|
||||
enable = true;
|
||||
settings = {
|
||||
relculright = true;
|
||||
ft_ignore = [
|
||||
"dashboard"
|
||||
"neo-tree"
|
||||
];
|
||||
segments = [
|
||||
{
|
||||
click = "v:lua.ScFa";
|
||||
text = [(lib.nixvim.mkRaw "require('statuscol.builtin').foldfunc")];
|
||||
}
|
||||
{
|
||||
click = "v:lua.ScSa";
|
||||
text = [" %s"];
|
||||
}
|
||||
{
|
||||
click = "v:lua.ScLa";
|
||||
text = [
|
||||
(lib.nixvim.mkRaw "require('statuscol.builtin').lnumfunc")
|
||||
" "
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nvim-ufo = {
|
||||
enable = true;
|
||||
settings = {
|
||||
provider_selector =
|
||||
# lua
|
||||
''
|
||||
function()
|
||||
return { "lsp", "indent" }
|
||||
end
|
||||
'';
|
||||
preview.mappings = {
|
||||
close = "q";
|
||||
switch = "K";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
opts = {
|
||||
foldcolumn = "1";
|
||||
foldlevel = 99;
|
||||
foldlevelstart = 99;
|
||||
foldenable = true;
|
||||
fillchars = lib.nixvim.mkRaw "[[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]";
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "zR";
|
||||
action = lib.nixvim.mkRaw "function() require('ufo').openAllFolds() end";
|
||||
options.desc = "open all folds";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "zM";
|
||||
action = lib.nixvim.mkRaw "function() require('ufo').closeAllFolds() end";
|
||||
options.desc = "close all folds";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "zK";
|
||||
action = lib.nixvim.mkRaw "function() local winid = require('ufo').peekFoldedLinesUnderCursor() if not winid then vim.lsp.buf.hover() end end";
|
||||
options.desc = "Peek Folded Lines";
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
plugins.colorizer = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
{
|
||||
plugins.debugprint = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
commands = {
|
||||
toggle_comment_debug_prints = "ToggleCommentDebugPrints";
|
||||
delete_debug_prints = "DeleteDebugPrints";
|
||||
};
|
||||
|
||||
display_counter = true;
|
||||
display_snippet = true;
|
||||
|
||||
keymaps = {
|
||||
normal = {
|
||||
plain_below = "<leader>pb";
|
||||
plain_above = "<leader>pB";
|
||||
variable_below = "<leader>pv";
|
||||
variable_above = "<leader>pV";
|
||||
variable_below_alwaysprompt.__raw = "nil";
|
||||
variable_above_alwaysprompt.__raw = "nil";
|
||||
textobj_below = "<leader>po";
|
||||
textobj_above = "<leader>pO";
|
||||
toggle_comment_debug_prints.__raw = "nil";
|
||||
delete_debug_prints.__raw = "nil";
|
||||
};
|
||||
visual = {
|
||||
variable_below = "<leader>pv";
|
||||
variable_above = "<leader>pV";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
plugins.harpoon = {
|
||||
enable = true;
|
||||
enableTelescope = true;
|
||||
# keymapsSilent = true;
|
||||
# keymaps = {
|
||||
# addFile = "<leader>ha";
|
||||
# toggleQuickMenu = "<C-e>";
|
||||
# navFile = {
|
||||
# "1" = "<leader>hj";
|
||||
# "2" = "<leader>hk";
|
||||
# "3" = "<leader>hl";
|
||||
# "4" = "<leader>hm";
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
plugins.kulala = {
|
||||
enable = false;
|
||||
};
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{
|
||||
plugins = {
|
||||
mini = {
|
||||
enable = true;
|
||||
modules = {
|
||||
comment = {
|
||||
options = {
|
||||
customCommentString = ''
|
||||
<cmd>lua require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring<cr>
|
||||
'';
|
||||
};
|
||||
};
|
||||
# Highlight word under cursor
|
||||
cursorword = {
|
||||
delay = 0;
|
||||
};
|
||||
|
||||
# Show indent lines
|
||||
indentscope = {
|
||||
symbol = "│";
|
||||
draw.delay = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ts-context-commentstring.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
plugins.nvim-autopairs = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
plugins.nvim-surround = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
plugins.persistence = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
plenary-nvim
|
||||
];
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
plugins.project-nvim = {
|
||||
enable = true;
|
||||
enableTelescope = true;
|
||||
};
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
extraConfigLuaPre = lib.mkOrder 1 (
|
||||
lib.optionalString
|
||||
(config.plugins.snacks.enable && config.plugins.snacks.settings.profiler.enabled) # Lua
|
||||
|
||||
''
|
||||
if vim.env.PROF then
|
||||
local snacks = "${pkgs.vimPlugins.snacks-nvim}"
|
||||
vim.opt.rtp:append(snacks)
|
||||
require("snacks.profiler").startup({
|
||||
startup = {
|
||||
-- event = "VimEnter", -- stop profiler on this event. Defaults to `VimEnter`
|
||||
event = "UIEnter",
|
||||
-- event = "VeryLazy",
|
||||
},
|
||||
})
|
||||
end
|
||||
''
|
||||
);
|
||||
|
||||
plugins = {
|
||||
snacks = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
bigfile = {
|
||||
enabled = true;
|
||||
size = 1024 * 1024; # 1MB
|
||||
setup.__raw = ''
|
||||
function(ctx)
|
||||
${lib.optionalString config.plugins.indent-blankline.enable ''require("ibl").setup_buffer(0, { enabled = false })''}
|
||||
${lib.optionalString (lib.hasAttr "indentscope" config.plugins.mini.modules) ''vim.b.miniindentscope_disable = true''}
|
||||
${lib.optionalString config.plugins.illuminate.enable ''require("illuminate").pause_buf()''}
|
||||
|
||||
-- Disable line numbers and relative line numbers
|
||||
vim.cmd("setlocal nonumber norelativenumber")
|
||||
|
||||
-- Syntax highlighting
|
||||
vim.schedule(function()
|
||||
vim.bo[ctx.buf].syntax = ctx.ft
|
||||
end)
|
||||
|
||||
-- Disable matchparen
|
||||
vim.cmd("let g:loaded_matchparen = 1")
|
||||
|
||||
-- Disable cursor line and column
|
||||
vim.cmd("setlocal nocursorline nocursorcolumn")
|
||||
|
||||
-- Disable folding
|
||||
vim.cmd("setlocal nofoldenable")
|
||||
|
||||
-- Disable sign column
|
||||
vim.cmd("setlocal signcolumn=no")
|
||||
|
||||
-- Disable swap file and undo file
|
||||
vim.cmd("setlocal noswapfile noundofile")
|
||||
|
||||
-- Disable mini animate
|
||||
vim.b.minianimate_disable = true
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
gitbrowse.enabled = true;
|
||||
gitui.enabled = true;
|
||||
lazygit.enabled = true;
|
||||
profiler.enabled = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>go";
|
||||
action = "<cmd>lua Snacks.gitbrowse()<CR>";
|
||||
options = {
|
||||
desc = "Open file in browser";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>gg";
|
||||
action = "<cmd>lua Snacks.lazygit()<CR>";
|
||||
options = {
|
||||
desc = "Open lazygit";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>gG";
|
||||
action = "<cmd>lua Snacks.terminal({'gitui'})<CR>";
|
||||
options = {
|
||||
desc = "Open Gitui";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
plugins.wakatime = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
config = {
|
||||
extraConfigLuaPre = ''
|
||||
vim.fn.sign_define("diagnosticsignerror", { text = " ", texthl = "diagnosticerror", linehl = "", numhl = "" })
|
||||
vim.fn.sign_define("diagnosticsignwarn", { text = " ", texthl = "diagnosticwarn", linehl = "", numhl = "" })
|
||||
vim.fn.sign_define("diagnosticsignhint", { text = "", texthl = "diagnostichint", linehl = "", numhl = "" })
|
||||
vim.fn.sign_define("diagnosticsigninfo", { text = " ", texthl = "diagnosticinfo", linehl = "", numhl = "" })
|
||||
'';
|
||||
|
||||
# feature that enhances the way Neovim loads and executes Lua modules,
|
||||
# offering improved performance and flexibility.
|
||||
luaLoader.enable = true;
|
||||
clipboard = {
|
||||
register = "unnamedplus";
|
||||
providers.wl-copy = {
|
||||
enable = true;
|
||||
package = pkgs.wl-clipboard-rs;
|
||||
};
|
||||
};
|
||||
opts = {
|
||||
virtualedit = "block"; # Allow cursor to move where there is no text in visual block mode
|
||||
cursorline = true; # Highlight the line where the cursor is located
|
||||
cmdheight = 2; # more space in the neovim command line for displaying messages
|
||||
showmode = false; # Dont show the editor mode in status line
|
||||
|
||||
# Enable relative line numbers
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
|
||||
# Tab spacing 2 spaces
|
||||
tabstop = 2;
|
||||
softtabstop = 2;
|
||||
shiftwidth = 2;
|
||||
expandtab = true;
|
||||
|
||||
smartindent = true;
|
||||
wrap = true;
|
||||
|
||||
# Smart indent on word wrap
|
||||
breakindent = true;
|
||||
|
||||
# Undo stuff from days ago
|
||||
swapfile = false;
|
||||
backup = false;
|
||||
undofile = true;
|
||||
|
||||
# Incremental search
|
||||
hlsearch = true;
|
||||
incsearch = true;
|
||||
|
||||
# Better splitting
|
||||
splitbelow = true;
|
||||
splitright = true;
|
||||
|
||||
# Enable ignorecase + smartcase for better searching
|
||||
ignorecase = true;
|
||||
smartcase = true; # Don't ignore case with capitals
|
||||
grepprg = "rg --vimgrep";
|
||||
grepformat = "%f:%l:%c:%m";
|
||||
|
||||
# Better colors
|
||||
termguicolors = true;
|
||||
|
||||
# Decrease updatetime
|
||||
updatetime = 50; # faster completion (4000ms default)
|
||||
|
||||
# Enable the sign column to prevent the screen from jumping
|
||||
signcolumn = "yes";
|
||||
|
||||
# Reduce which-key timeout to 250s
|
||||
timeoutlen = 250;
|
||||
|
||||
scrolloff = 8; # Will never have less than 8 characters as you scroll down
|
||||
mouse = "a"; # Mouse
|
||||
|
||||
# Set encoding type
|
||||
encoding = "utf-8";
|
||||
fileencoding = "utf-8";
|
||||
|
||||
# Maximum number of items to show in the popup menu (0 means "use available screen space")
|
||||
pumheight = 0;
|
||||
};
|
||||
|
||||
extraConfigLua = ''
|
||||
local opt = vim.opt
|
||||
local g = vim.g
|
||||
local o = vim.o
|
||||
-- Neovide
|
||||
if g.neovide then
|
||||
-- Neovide options
|
||||
g.neovide_fullscreen = false
|
||||
g.neovide_hide_mouse_when_typing = false
|
||||
g.neovide_refresh_rate = 165
|
||||
g.neovide_cursor_vfx_mode = "ripple"
|
||||
g.neovide_cursor_animate_command_line = true
|
||||
g.neovide_cursor_animate_in_insert_mode = true
|
||||
g.neovide_cursor_vfx_particle_lifetime = 5.0
|
||||
g.neovide_cursor_vfx_particle_density = 14.0
|
||||
g.neovide_cursor_vfx_particle_speed = 12.0
|
||||
g.neovide_transparency = 0.8
|
||||
|
||||
-- Neovide Fonts
|
||||
o.guifont = "MonoLisa Trial:Medium:h15"
|
||||
-- o.guifont = "CommitMono:Medium:h15"
|
||||
-- o.guifont = "JetBrainsMono Nerd Font:h14:Medium:i"
|
||||
-- o.guifont = "FiraMono Nerd Font:Medium:h14"
|
||||
-- o.guifont = "CaskaydiaCove Nerd Font:h14:b:i"
|
||||
-- o.guifont = "BlexMono Nerd Font Mono:h14:Medium:i"
|
||||
-- o.guifont = "Liga SFMono Nerd Font:b:h15"
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user