mirror of
https://git.gay/xqtc/nixos-config
synced 2024-11-22 01:40:34 +01:00
Further nixvim configuration
This commit is contained in:
parent
9f583221db
commit
b5032dcb8b
12
home/lambda/config-files/nvim/keybinds.lua
Normal file
12
home/lambda/config-files/nvim/keybinds.lua
Normal 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")
|
|
@ -43,25 +43,84 @@
|
|||
};
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
colorschemes.catppuccin.enable = true;
|
||||
plugins = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
rust-analyzer = {
|
||||
enable = true;
|
||||
installLanguageServer = false;
|
||||
};
|
||||
nil_ls.enable = true;
|
||||
};
|
||||
};
|
||||
gitsigns.enable = true;
|
||||
treesitter.enable = true;
|
||||
nvim-cmp.enable = true;
|
||||
telescope.enable = true;
|
||||
cmp-nvim-lsp.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;
|
||||
plugins = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
rust-analyzer = {
|
||||
enable = true;
|
||||
installLanguageServer = false;
|
||||
installCargo = false;
|
||||
installRustc = false;
|
||||
};
|
||||
nil_ls.enable = true;
|
||||
};
|
||||
};
|
||||
gitsigns.enable = true;
|
||||
fugitive.enable = true;
|
||||
treesitter.enable = true;
|
||||
nvim-cmp.enable = true;
|
||||
telescope.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 = {
|
||||
# enable = true;
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
self: super: {
|
||||
nixneovim.overlays.default;
|
||||
}
|
Loading…
Reference in a new issue