Rearrange things, add Trouble
This commit is contained in:
parent
38ad6b83b6
commit
7eaf833957
2 changed files with 22 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, pkgs, config, lib, theme, ... }: {
|
{ inputs, pkgs, lib, theme, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
] ++ lib.optional (builtins.isString theme) ../../../../stylix/${theme}/home-manager/nixvim.nix;
|
] ++ lib.optional (builtins.isString theme) ../../../../stylix/${theme}/home-manager/nixvim.nix;
|
||||||
|
@ -15,6 +15,15 @@
|
||||||
globals.mapleader = " ";
|
globals.mapleader = " ";
|
||||||
globals.maplocalleader = " ";
|
globals.maplocalleader = " ";
|
||||||
|
|
||||||
|
options = {
|
||||||
|
number = true;
|
||||||
|
shiftwidth = 2;
|
||||||
|
breakindent = true;
|
||||||
|
colorcolumn = "100";
|
||||||
|
showmode = false;
|
||||||
|
termguicolors = true;
|
||||||
|
};
|
||||||
|
|
||||||
keymaps = let
|
keymaps = let
|
||||||
map = mode: key: action: { mode = mode; key = key; action = action; };
|
map = mode: key: action: { mode = mode; key = key; action = action; };
|
||||||
nmap = key: action: map [ "n" ] key action;
|
nmap = key: action: map [ "n" ] key action;
|
||||||
|
@ -53,12 +62,15 @@
|
||||||
(nmap "<leader>ns" ":NvimTreeFindFile<CR>" // desc "[S]earch NvimTree")
|
(nmap "<leader>ns" ":NvimTreeFindFile<CR>" // desc "[S]earch NvimTree")
|
||||||
(nmap "<leader>nc" ":NvimTreeClose<CR>" // desc "[C]lose NvimTree")
|
(nmap "<leader>nc" ":NvimTreeClose<CR>" // desc "[C]lose NvimTree")
|
||||||
# ToggleTerm
|
# ToggleTerm
|
||||||
(nmap "<leader>t" "<Nop>" // desc "[T]oggleTerm")
|
(nmap "<leader>TT" ":ToggleTerm<CR>" // desc "[T]oggle Terminal")
|
||||||
(nmap "<leader>tt" ":ToggleTerm<CR>" // desc "[T]oggle Terminal")
|
|
||||||
# Fugitive
|
# Fugitive
|
||||||
(nmap "<leader>gc" ":Git commit -a<CR>" // desc "[C]ommit" )
|
(nmap "<leader>gc" ":Git commit -a<CR>" // desc "[C]ommit" )
|
||||||
(nmap "<leader>gp" ":Git push<CR>" // desc "Git [p]ush")
|
(nmap "<leader>gp" ":Git push<CR>" // desc "Git [p]ush")
|
||||||
(nmap "<leader>gP" ":Git pull<CR>" // desc "[P]ull")
|
(nmap "<leader>gP" ":Git pull<CR>" // desc "[P]ull")
|
||||||
|
# Trouble
|
||||||
|
(nmap "<leader>tt" ":TroubleToggle<CR>" // desc "[T]oggle")
|
||||||
|
(nmap "<leader>tc" ":TroubleClose<CR>" // desc "[C]lose")
|
||||||
|
|
||||||
# Window Management
|
# Window Management
|
||||||
(nmap "<leader>wh" ":wincmd h<CR>" // desc "Move left")
|
(nmap "<leader>wh" ":wincmd h<CR>" // desc "Move left")
|
||||||
(nmap "<leader>wl" ":wincmd l<CR>" // desc "Move right")
|
(nmap "<leader>wl" ":wincmd l<CR>" // desc "Move right")
|
||||||
|
@ -72,20 +84,12 @@
|
||||||
# resize window
|
# resize window
|
||||||
(nmap "<leader>wrh" ":resize " // desc "Resize Horizontal")
|
(nmap "<leader>wrh" ":resize " // desc "Resize Horizontal")
|
||||||
(nmap "<leader>wrv" ":vertical resize " // desc "Resize Vertical")
|
(nmap "<leader>wrv" ":vertical resize " // desc "Resize Vertical")
|
||||||
|
|
||||||
# Buffer Management
|
# Buffer Management
|
||||||
(nmap "<leader>bn" ":bnext<CR>" // desc "Next buffer")
|
(nmap "<leader>bn" ":bnext<CR>" // desc "Next buffer")
|
||||||
(nmap "<leader>bN" ":bNext<CR>" // desc "Previous buffer")
|
(nmap "<leader>bN" ":bNext<CR>" // desc "Previous buffer")
|
||||||
(nmap "<leader>bc" ":bdelete<CR>" // desc "[c]lose buffer")
|
(nmap "<leader>bc" ":bdelete<CR>" // desc "[c]lose buffer")
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
|
||||||
number = true;
|
|
||||||
shiftwidth = 2;
|
|
||||||
breakindent = true;
|
|
||||||
colorcolumn = "100";
|
|
||||||
showmode = false;
|
|
||||||
};
|
|
||||||
plugins = {
|
plugins = {
|
||||||
# Parser generator tool
|
# Parser generator tool
|
||||||
treesitter.enable = true;
|
treesitter.enable = true;
|
||||||
|
@ -115,6 +119,8 @@
|
||||||
nvim-colorizer.enable = true;
|
nvim-colorizer.enable = true;
|
||||||
# git plugin for vim
|
# git plugin for vim
|
||||||
fugitive.enable = true;
|
fugitive.enable = true;
|
||||||
|
# Alerts / CodActions
|
||||||
|
trouble.enable = true;
|
||||||
|
|
||||||
# Popup to show shortcuts
|
# Popup to show shortcuts
|
||||||
which-key = {
|
which-key = {
|
||||||
|
@ -125,7 +131,8 @@
|
||||||
"<leader>g" = "Git Options...";
|
"<leader>g" = "Git Options...";
|
||||||
"<leader>l" = "LSP Options...";
|
"<leader>l" = "LSP Options...";
|
||||||
"<leader>n" = "NvimTree...";
|
"<leader>n" = "NvimTree...";
|
||||||
"<leader>t" = "ToggleTerm...";
|
"<leader>t" = "Trouble...";
|
||||||
|
"<leader>T" = "ToggleTerm...";
|
||||||
"<leader>w" = "Manage Windows...";
|
"<leader>w" = "Manage Windows...";
|
||||||
"<leader>wo" = "Open New...";
|
"<leader>wo" = "Open New...";
|
||||||
"<leader>wr" = "Resize...";
|
"<leader>wr" = "Resize...";
|
||||||
|
@ -136,8 +143,8 @@
|
||||||
lualine = {
|
lualine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
componentSeparators = {
|
componentSeparators = {
|
||||||
left = "|";
|
left = "«";
|
||||||
right = "|";
|
right = "»";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, pkgs, config, lib, theme, ... }: {
|
{ ... }: {
|
||||||
imports = [ ./nixvim-base.nix ];
|
imports = [ ./nixvim-base.nix ];
|
||||||
|
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
|
|
Loading…
Reference in a new issue