This commit is contained in:
meml0rz
2024-11-12 22:38:50 +01:00
parent 60e894ac4c
commit 7033122dd3
3 changed files with 32 additions and 2 deletions

View File

@ -5,6 +5,7 @@
./cmp.nix
./lsp.nix
./neotree.nix
./opts.nix
];
programs.nixvim = {
enable = true;

View File

@ -1,4 +1,4 @@
{}:
{ config, pkgs, nixvim, ... }:
{
programs.nixvim = {
plugins = {
@ -8,7 +8,7 @@
enableGitStatus = true;
window = {
position = "right";
width = "45"
width = 40;
};
};
};

29
modules/nix/nvim/opts.nix Normal file
View File

@ -0,0 +1,29 @@
{ config, pkgs, nixvim, ... }:
{
programs.nixvim = {
extraConfig = ''
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
vim.g.mapleader = " "
map('n', '<c-t>', ":ToggleTerm size=40 direction=float<CR>", opts)
map('n', '<c-n>', ":Neotree filesystem reveal right<CR>", opts)
map('n', '<Leader>c', ":ClangdMemoryUsage<CR>", opts)
map('v', '<Tab>', '>gv', opts)
map('v', '<S-Tab>', '<gv', opts)
vim.opt.shiftwidth = 4
vim.opt.tabstop = 4
vim.opt.cursorline = true
vim.opt.expandtab = true
vim.opt.autoindent = true
vim.opt.smartindent = true
vim.opt.softtabstop = 4
'';
option = {
};
};
}