initial commit
This commit is contained in:
commit
5bce8472bc
10 changed files with 1025 additions and 0 deletions
136
nixvim.nix
Normal file
136
nixvim.nix
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
{
|
||||
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>";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue