mirror of
https://github.com/Superredstone/nixvim.git
synced 2026-06-17 09:14:40 +02:00
feat: config rewrite (#1)
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 99 KiB |
+1
-8
@@ -1,22 +1,15 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./keybindings.nix
|
||||||
./opts.nix
|
./opts.nix
|
||||||
./lsp.nix
|
|
||||||
./cmp.nix
|
|
||||||
./keymaps.nix
|
|
||||||
./plugins
|
./plugins
|
||||||
];
|
];
|
||||||
|
|
||||||
colorschemes.catppuccin.enable = true;
|
colorschemes.catppuccin.enable = true;
|
||||||
extraPackages = with pkgs; [
|
|
||||||
wl-clipboard
|
|
||||||
];
|
|
||||||
clipboard = {
|
clipboard = {
|
||||||
register = "unnamedplus";
|
register = "unnamedplus";
|
||||||
providers.wl-copy.enable = true;
|
providers.wl-copy.enable = true;
|
||||||
providers.wl-copy.package = pkgs.wl-clipboard;
|
providers.wl-copy.package = pkgs.wl-clipboard;
|
||||||
providers.xclip.enable = true;
|
|
||||||
providers.xclip.package = pkgs.xclip;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
{ ... }:
|
||||||
|
let
|
||||||
|
defaultOptions = {
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
key = "<space>e";
|
||||||
|
action = ":Neotree toggle<CR>";
|
||||||
|
options = defaultOptions;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<C-s>";
|
||||||
|
action = ":w<CR>";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<S-q>";
|
||||||
|
action = ":bdelete<CR>";
|
||||||
|
options = defaultOptions;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<A-l>";
|
||||||
|
action = ":bnext<CR>";
|
||||||
|
options = defaultOptions;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<A-h>";
|
||||||
|
action = ":bprevious<CR>";
|
||||||
|
options = defaultOptions;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<C-f>";
|
||||||
|
action = ":lua vim.lsp.buf.format()<CR>";
|
||||||
|
options = defaultOptions;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
action = ":ToggleTerm direction=float<CR>";
|
||||||
|
key = "<Space>t";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
action = "<C-\\><C-n>";
|
||||||
|
key = "<Esc>";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Exit terminal insert mode";
|
||||||
|
};
|
||||||
|
mode = "t";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,174 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
keymaps = [
|
|
||||||
{
|
|
||||||
action = ":bnext<CR>";
|
|
||||||
key = "<A-l>";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Next tab";
|
|
||||||
};
|
|
||||||
mode = "n";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
action = ":bprevious<CR>";
|
|
||||||
key = "<A-h>";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Previous tab";
|
|
||||||
};
|
|
||||||
mode = "n";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
action = ":bdelete<CR>";
|
|
||||||
key = "<S-q>";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Next tab";
|
|
||||||
};
|
|
||||||
mode = "n";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
action = "<C-\\><C-n>";
|
|
||||||
key = "<Esc>";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Exit terminal insert mode";
|
|
||||||
};
|
|
||||||
mode = "t";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
action = ":w<CR>";
|
|
||||||
key = "<C-s>";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Save";
|
|
||||||
};
|
|
||||||
mode = "n";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
action = ":lua vim.lsp.buf.format()<CR>";
|
|
||||||
key = "<C-f>";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Format buffer";
|
|
||||||
};
|
|
||||||
mode = "n";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
action = ":q<CR>";
|
|
||||||
key = "<C-q>";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Quit";
|
|
||||||
};
|
|
||||||
mode = "n";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
action = ":wincmd l<CR>";
|
|
||||||
key = "<Space>wl";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Go to left panel";
|
|
||||||
};
|
|
||||||
mode = "n";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
action = ":wincmd k<CR>";
|
|
||||||
key = "<Space>wk";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Go to upper panel";
|
|
||||||
};
|
|
||||||
mode = "n";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
action = ":wincmd j<CR>";
|
|
||||||
key = "<Space>wj";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Go to down panel";
|
|
||||||
};
|
|
||||||
mode = "n";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
action = ":wincmd h<CR>";
|
|
||||||
key = "<Space>wh";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Go to left panel";
|
|
||||||
};
|
|
||||||
mode = "n";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
action = "$";
|
|
||||||
key = "gl";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Go to end line";
|
|
||||||
};
|
|
||||||
mode = [
|
|
||||||
"n"
|
|
||||||
"v"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
action = "^";
|
|
||||||
key = "gh";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Go to start line";
|
|
||||||
};
|
|
||||||
mode = [
|
|
||||||
"n"
|
|
||||||
"v"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
action = ":lua Snacks.explorer()<CR>";
|
|
||||||
key = "<Space>e";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Toggle file explorer";
|
|
||||||
};
|
|
||||||
mode = "n";
|
|
||||||
}
|
|
||||||
# ToggleTerm
|
|
||||||
{
|
|
||||||
action = ":ToggleTerm direction=float<CR>";
|
|
||||||
key = "<Space>t";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Toggle terminal";
|
|
||||||
};
|
|
||||||
mode = "n";
|
|
||||||
}
|
|
||||||
# Dap
|
|
||||||
{
|
|
||||||
action.__raw = ''
|
|
||||||
function()
|
|
||||||
require("dap").toggle_breakpoint()
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
key = "<Space>b";
|
|
||||||
mode = "n";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Toggle breakpoint";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
action.__raw = ''
|
|
||||||
function()
|
|
||||||
require("dapui").toggle()
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
key = "<Space>y";
|
|
||||||
mode = "n";
|
|
||||||
options = {
|
|
||||||
silent = true;
|
|
||||||
desc = "Toggle debugger";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
+8
-7
@@ -1,17 +1,18 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
opts = {
|
opts = {
|
||||||
|
cursorline = true;
|
||||||
number = true;
|
number = true;
|
||||||
relativenumber = true;
|
relativenumber = true;
|
||||||
signcolumn = "yes";
|
|
||||||
splitright = true;
|
|
||||||
splitbelow = true;
|
|
||||||
cursorline = true;
|
|
||||||
scrolloff = 5;
|
scrolloff = 5;
|
||||||
undofile = true;
|
shiftwidth = 4;
|
||||||
ignorecase = true;
|
signcolumn = "yes";
|
||||||
|
autoindent = true;
|
||||||
|
updatetime = 200;
|
||||||
smartcase = true;
|
smartcase = true;
|
||||||
gdefault = true;
|
ignorecase = true;
|
||||||
termguicolors = true;
|
termguicolors = true;
|
||||||
|
gdefault = true;
|
||||||
|
cursorlineopt = "both";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
plugins.guess-indent = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
underline.enable = true;
|
||||||
|
static.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -13,6 +13,8 @@
|
|||||||
{ name = "path"; }
|
{ name = "path"; }
|
||||||
{ name = "buffer"; }
|
{ name = "buffer"; }
|
||||||
{ name = "dap"; }
|
{ name = "dap"; }
|
||||||
|
{ name = "blink-emoji"; }
|
||||||
|
{ name = "blink-ripgrep"; }
|
||||||
];
|
];
|
||||||
mapping = {
|
mapping = {
|
||||||
"<Tab>" = "cmp.mapping.select_next_item()";
|
"<Tab>" = "cmp.mapping.select_next_item()";
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
plugins.cursorline = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
cursorline = {
|
||||||
|
enable = true;
|
||||||
|
timeout = 0;
|
||||||
|
number = false;
|
||||||
|
};
|
||||||
|
cursorword = {
|
||||||
|
enable = true;
|
||||||
|
minLength = 3;
|
||||||
|
hl = {
|
||||||
|
underline = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
plugins = {
|
|
||||||
dap = {
|
|
||||||
enable = true;
|
|
||||||
adapters = {
|
|
||||||
executables = {
|
|
||||||
gdb = {
|
|
||||||
command = "gdb";
|
|
||||||
args = [
|
|
||||||
"-i"
|
|
||||||
"dap"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
lldb = {
|
|
||||||
command = "lldb";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
servers = {
|
|
||||||
codelldb = {
|
|
||||||
port = 13000;
|
|
||||||
executable = {
|
|
||||||
command = "${pkgs.vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb";
|
|
||||||
args = [
|
|
||||||
"--port"
|
|
||||||
"13000"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
configurations = {
|
|
||||||
cpp = [
|
|
||||||
{
|
|
||||||
name = "Launch GDB";
|
|
||||||
type = "gdb";
|
|
||||||
request = "launch";
|
|
||||||
program.__raw = ''
|
|
||||||
function()
|
|
||||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
|
||||||
end'';
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Launch LLDB";
|
|
||||||
type = "lldb";
|
|
||||||
request = "launch";
|
|
||||||
program.__raw = ''
|
|
||||||
function()
|
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
|
||||||
end'';
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Launch CodeLLDB";
|
|
||||||
type = "codelldb";
|
|
||||||
request = "launch";
|
|
||||||
program.__raw = ''
|
|
||||||
function()
|
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
|
||||||
end'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
dap-ui.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
plugins.dashboard = {
|
|
||||||
enable = true;
|
|
||||||
settings.config = {
|
|
||||||
header = [
|
|
||||||
" ███▄ █ ▓█████ ▒█████ ██▒ █▓ ██▓ ███▄ ▄███▓"
|
|
||||||
" ██ ▀█ █ ▓█ ▀ ▒██▒ ██▒▓██░ █▒▓██▒▓██▒▀█▀ ██▒"
|
|
||||||
"▓██ ▀█ ██▒▒███ ▒██░ ██▒ ▓██ █▒░▒██▒▓██ ▓██░"
|
|
||||||
"▓██▒ ▐▌██▒▒▓█ ▄ ▒██ ██░ ▒██ █░░░██░▒██ ▒██ "
|
|
||||||
"▒██░ ▓██░░▒████▒░ ████▓▒░ ▒▀█░ ░██░▒██▒ ░██▒"
|
|
||||||
"░ ▒░ ▒ ▒ ░░ ▒░ ░░ ▒░▒░▒░ ░ ▐░ ░▓ ░ ▒░ ░ ░"
|
|
||||||
"░ ░░ ░ ▒░ ░ ░ ░ ░ ▒ ▒░ ░ ░░ ▒ ░░ ░ ░"
|
|
||||||
" ░ ░ ░ ░ ░ ░ ░ ▒ ░░ ▒ ░░ ░ "
|
|
||||||
" ░ ░ ░ ░ ░ ░ ░ ░ "
|
|
||||||
];
|
|
||||||
footer = [ "Made with ❤️" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
+16
-14
@@ -1,27 +1,29 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./blink-indent.nix
|
||||||
|
./cmp.nix
|
||||||
./comment.nix
|
./comment.nix
|
||||||
./dap.nix
|
./cursorline.nix
|
||||||
./dashboard.nix
|
./gitsigns.nix
|
||||||
./fidget.nix
|
./lsp.nix
|
||||||
./guess-indent.nix
|
|
||||||
./lualine.nix
|
./lualine.nix
|
||||||
./snacks.nix
|
|
||||||
./telescope.nix
|
./telescope.nix
|
||||||
./vimwiki.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
plugins = {
|
plugins = {
|
||||||
autoclose.enable = true;
|
neo-tree.enable = true;
|
||||||
bufferline.enable = true;
|
|
||||||
colorful-menu.enable = true;
|
|
||||||
gitsigns.enable = true;
|
|
||||||
lazygit.enable = true;
|
|
||||||
nix-develop.enable = true;
|
|
||||||
nvim-surround.enable = true;
|
|
||||||
toggleterm.enable = true;
|
|
||||||
web-devicons.enable = true;
|
web-devicons.enable = true;
|
||||||
|
bufferline.enable = true;
|
||||||
|
nvim-autopairs.enable = true;
|
||||||
which-key.enable = true;
|
which-key.enable = true;
|
||||||
|
notify.enable = true;
|
||||||
|
toggleterm.enable = true;
|
||||||
|
treesitter.enable = true;
|
||||||
|
todo-comments.enable = true;
|
||||||
|
fidget.enable = true;
|
||||||
|
blink-indent.enable = true;
|
||||||
|
blink-ripgrep.enable = true;
|
||||||
|
blink-pairs.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
plugins.fidget = {
|
|
||||||
enable = true;
|
|
||||||
settings.progress = {
|
|
||||||
suppress_on_insert = true;
|
|
||||||
ignore_done_already = true;
|
|
||||||
poll_rate = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
plugins.guess-indent = {
|
plugins.gitsigns = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -22,8 +22,6 @@
|
|||||||
docker_compose_language_service.enable = true;
|
docker_compose_language_service.enable = true;
|
||||||
jsonls.enable = true;
|
jsonls.enable = true;
|
||||||
phpactor.enable = true;
|
phpactor.enable = true;
|
||||||
gleam.enable = true;
|
|
||||||
elixirls.enable = true;
|
|
||||||
qmlls.enable = true;
|
qmlls.enable = true;
|
||||||
};
|
};
|
||||||
keymaps = {
|
keymaps = {
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
plugins.lualine = {
|
plugins.lualine.enable = true;
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
plugins.snacks = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
explorer = {
|
|
||||||
enabled = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
plugins.vimwiki = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
list = [
|
|
||||||
{
|
|
||||||
path = "$HOME/.vimwiki/";
|
|
||||||
template_path = "$HOME/.vimwiki/";
|
|
||||||
template_default = "default";
|
|
||||||
template_ext = "html";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user