136 lines
2.7 KiB
Nix
136 lines
2.7 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
programs.nixvim = {
|
|
enable = true;
|
|
extraConfigLuaPost = ''
|
|
local map = vim.keymap.set
|
|
for i = 1, 10 do
|
|
map('n', '<A-' .. i .. '>', '<cmd> LualineBuffersJump! ' .. i .. '<cr>')
|
|
end
|
|
'';
|
|
opts = {
|
|
relativenumber = true;
|
|
tabstop = 8;
|
|
shiftwidth = 8;
|
|
expandtab = true;
|
|
swapfile = false;
|
|
};
|
|
extraPackages = with pkgs; [
|
|
nixfmt
|
|
];
|
|
lsp = {
|
|
inlayHints.enable = true;
|
|
servers = {
|
|
clangd.enable = true;
|
|
qmlls.enable = true;
|
|
lua-language-server.enable = true;
|
|
rust_analyzer.enable = true;
|
|
nixd = {
|
|
enable = true;
|
|
config = {
|
|
formatting = {
|
|
command = "nixfmt";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
plugins = {
|
|
lspconfig.enable = true;
|
|
blink-cmp = {
|
|
enable = true;
|
|
};
|
|
blink-indent = {
|
|
enable = true;
|
|
};
|
|
cord = {
|
|
enable = true;
|
|
settings = {
|
|
display = {
|
|
theme = "atom";
|
|
};
|
|
editor = {
|
|
tooltip = "ur gay :3";
|
|
};
|
|
};
|
|
};
|
|
lualine = {
|
|
enable = true;
|
|
settings = {
|
|
options = {
|
|
section_separators = {
|
|
left = "";
|
|
right = "";
|
|
};
|
|
component_separators = {
|
|
left = "";
|
|
right = "";
|
|
};
|
|
};
|
|
sections = {
|
|
lualine_a = [
|
|
"mode"
|
|
];
|
|
lualine_b = [
|
|
"filename"
|
|
"filetype"
|
|
];
|
|
lualine_c = [
|
|
"diagnostics"
|
|
];
|
|
lualine_x = [
|
|
"lsp_status"
|
|
];
|
|
lualine_y = [ ];
|
|
lualine_z = [
|
|
"location"
|
|
];
|
|
};
|
|
tabline = {
|
|
lualine_a = [ "buffers" ];
|
|
lualine_b = [ "branch" ];
|
|
lualine_c = [ ];
|
|
lualine_x = [ ];
|
|
lualine_y = [ ];
|
|
lualine_z = [ "tabs" ];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
globals = {
|
|
mapleader = " ";
|
|
};
|
|
diagnostic = {
|
|
settings = {
|
|
virtual_text = {
|
|
spacing = 4;
|
|
source = true;
|
|
};
|
|
};
|
|
};
|
|
keymaps = [
|
|
{
|
|
key = "<C-f>";
|
|
action = "<cmd> lua vim.lsp.buf.format() <cr>";
|
|
}
|
|
{
|
|
key = "<leader>t";
|
|
action = "<cmd> terminal <cr>";
|
|
}
|
|
{
|
|
key = "<esc>";
|
|
action = "<c-\\><c-n>";
|
|
mode = "t";
|
|
}
|
|
{
|
|
key = "<leader-w>";
|
|
action = "<cmd> lua bdelete! <cr>";
|
|
}
|
|
];
|
|
};
|
|
}
|