Further nixvim configuration

This commit is contained in:
xqtc161 2024-01-29 11:04:52 +01:00
parent 9f583221db
commit b5032dcb8b
3 changed files with 89 additions and 21 deletions

View file

@ -0,0 +1,12 @@
-- Switch between splits
vim.keymap.set("n", "<C-Right>", "<c-w>l")
vim.keymap.set("n", "<C-Left>", "<c-w>h")
vim.keymap.set("n", "<C-Up>", "<c-w>k")
vim.keymap.set("n", "<C-Down>", "<c-w>j")
-- Escape for exiting terminal mode
vim.keymap.set('t', '<Esc>', '<C-\\><C-n>')
-- move selection linewise
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")

View file

@ -44,6 +44,16 @@
programs.nixvim = { programs.nixvim = {
enable = true; enable = true;
globals.mapleader = " ";
extraConfigLua = builtins.readFile ./config-files/nvim/keybinds.lua;
options = {
number = true; # Show line numbers
relativenumber = true; # Show relative line numbers
shiftwidth = 2; # Tab width should be 2
};
colorschemes.catppuccin.enable = true; colorschemes.catppuccin.enable = true;
plugins = { plugins = {
lsp = { lsp = {
@ -52,16 +62,65 @@
rust-analyzer = { rust-analyzer = {
enable = true; enable = true;
installLanguageServer = false; installLanguageServer = false;
installCargo = false;
installRustc = false;
}; };
nil_ls.enable = true; nil_ls.enable = true;
}; };
}; };
gitsigns.enable = true; gitsigns.enable = true;
fugitive.enable = true;
treesitter.enable = true; treesitter.enable = true;
nvim-cmp.enable = true; nvim-cmp.enable = true;
telescope.enable = true; telescope.enable = true;
cmp-nvim-lsp.enable = true; cmp-nvim-lsp.enable = true;
noice.enable = true;
neo-tree.enable = true;
presence-nvim.enable = true;
crates-nvim.enable = true;
alpha = {
enable = true;
}; };
bufferline.enable = true;
};
keymaps = [
{
mode = "n";
key = "<leader>ff";
options.silent = true;
action = "<cmd>Telescope find_files<CR>";
}
{
mode = "n";
key = "<leader>Gp";
action = "<cmd>Git pull<CR>";
}
{
mode = "n";
key = "<leader>GP";
action = "<cmd>Git push<CR>";
}
{
mode = "n";
key = "<leader>Gc";
action = "<cmd>Git commit<CR>";
}
{
mode = "n";
key = "<leader>Ga";
action = "<cmd>Git add .<CR>";
}
{
mode = "n";
key = "<leader>Gd";
action = "<cmd>Git diff<CR>";
}
{
mode = "n";
key = "<leader>nt";
action = "<cmd>Neotree toggle left<CR>";
}
];
}; };
#wayland.windowManager.hyprland = { #wayland.windowManager.hyprland = {
# enable = true; # enable = true;

View file

@ -1,3 +0,0 @@
self: super: {
nixneovim.overlays.default;
}