Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5bfba070d6 | |||
| 47401eb97f |
6 changed files with 92 additions and 68 deletions
|
|
@ -4,7 +4,7 @@
|
|||
./hardware-configuration.nix
|
||||
./easyroam.nix
|
||||
./stylix.nix
|
||||
./nixvim.nix
|
||||
./nixvim/nixvim.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
./configuration.nix
|
||||
./nixvim.nix
|
||||
./nixvim/nixvim.nix
|
||||
nix-easyroam.nixosModules.nix-easyroam
|
||||
stylix.nixosModules.stylix
|
||||
nixvim.nixosModules.nixvim
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
imports = [
|
||||
./stylix.nix
|
||||
inputs.nixcord.homeModules.nixcord
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
];
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
|
|
|
|||
29
nixvim/keymaps.nix
Normal file
29
nixvim/keymaps.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.nixvim = {
|
||||
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>";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
59
nixvim/nixvim.nix
Normal file
59
nixvim/nixvim.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./plugins.nix
|
||||
./keymaps.nix
|
||||
];
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
};
|
||||
diagnostic = {
|
||||
settings = {
|
||||
virtual_text = {
|
||||
spacing = 4;
|
||||
source = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,45 +1,11 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
config,
|
||||
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 = {
|
||||
|
|
@ -102,35 +68,6 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
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