mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-06-28 16:01:48 +02:00
Making big improvements to neovim and moving into home as that makes more sense
This commit is contained in:
parent
82eba09c32
commit
5b423ab74a
@ -13,7 +13,7 @@ in lib.mkIf (alacritty == true) {
|
|||||||
decorations = "none";
|
decorations = "none";
|
||||||
startup_mode = "Windowed";
|
startup_mode = "Windowed";
|
||||||
dynamic_title = true;
|
dynamic_title = true;
|
||||||
opacity = 0.85;
|
opacity = 0.6;
|
||||||
};
|
};
|
||||||
cursor = {
|
cursor = {
|
||||||
style = {
|
style = {
|
||||||
@ -23,10 +23,10 @@ in lib.mkIf (alacritty == true) {
|
|||||||
};
|
};
|
||||||
live_config_reload = true;
|
live_config_reload = true;
|
||||||
font = {
|
font = {
|
||||||
normal.family = "JetBrainsMono Nerd Font";
|
normal.family = "JetBrainsMono NFM";
|
||||||
bold.family = "JetBrainsMono Nerd Font";
|
bold.family = "JetBrainsMono NFM";
|
||||||
italic.family = "JetBrainsMono Nerd Font";
|
italic.family = "JetBrainsMono NFM";
|
||||||
bold_italic.family = "JetBrainsMono Nerd Font";
|
bold_italic.family = "JetBrainsMono NFM";
|
||||||
size = 14;
|
size = 14;
|
||||||
};
|
};
|
||||||
colors = {
|
colors = {
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
./kdenlive.nix
|
./kdenlive.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
./neofetch.nix
|
./neofetch.nix
|
||||||
|
./neovim.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
./rofi.nix
|
./rofi.nix
|
||||||
./starship.nix
|
./starship.nix
|
||||||
|
189
config/home/neovim.nix
Normal file
189
config/home/neovim.nix
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
plugins = pkgs.vimPlugins;
|
||||||
|
theme = config.colorScheme.palette;
|
||||||
|
in {
|
||||||
|
programs.nixvim = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
globals.mapleader = " "; # Sets the leader key to space
|
||||||
|
|
||||||
|
options = {
|
||||||
|
clipboard="unnamedplus";
|
||||||
|
number = true; # Show line numbers
|
||||||
|
relativenumber = true; # Show relative line numbers
|
||||||
|
shiftwidth = 2; # Tab width should be 2
|
||||||
|
softtabstop = 2;
|
||||||
|
smartindent = true;
|
||||||
|
wrap = false;
|
||||||
|
swapfile = false;
|
||||||
|
backup = false;
|
||||||
|
hlsearch = false;
|
||||||
|
incsearch = true;
|
||||||
|
termguicolors = true;
|
||||||
|
scrolloff = 8;
|
||||||
|
updatetime = 50;
|
||||||
|
};
|
||||||
|
|
||||||
|
colorschemes.base16.enable = true;
|
||||||
|
colorschemes.base16.customColorScheme = {
|
||||||
|
base00 = "#${theme.base00}";
|
||||||
|
base01 = "#${theme.base01}";
|
||||||
|
base02 = "#${theme.base02}";
|
||||||
|
base03 = "#${theme.base03}";
|
||||||
|
base04 = "#${theme.base04}";
|
||||||
|
base05 = "#${theme.base05}";
|
||||||
|
base06 = "#${theme.base06}";
|
||||||
|
base07 = "#${theme.base07}";
|
||||||
|
base08 = "#${theme.base08}";
|
||||||
|
base09 = "#${theme.base09}";
|
||||||
|
base0A = "#${theme.base0A}";
|
||||||
|
base0B = "#${theme.base0B}";
|
||||||
|
base0C = "#${theme.base0C}";
|
||||||
|
base0D = "#${theme.base0D}";
|
||||||
|
base0E = "#${theme.base0E}";
|
||||||
|
base0F = "#${theme.base0F}";
|
||||||
|
};
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
barbecue.enable = true;
|
||||||
|
telescope = {
|
||||||
|
enable = true;
|
||||||
|
keymaps = {
|
||||||
|
"<leader>ff" = "find_files";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
neo-tree.enable = true;
|
||||||
|
indent-blankline.enable = true;
|
||||||
|
nvim-colorizer.enable = true;
|
||||||
|
nvim-autopairs.enable = true;
|
||||||
|
nix.enable = true;
|
||||||
|
comment-nvim.enable = true;
|
||||||
|
lualine = {
|
||||||
|
enable = true;
|
||||||
|
componentSeparators = {
|
||||||
|
left = "|";
|
||||||
|
right = "|";
|
||||||
|
};
|
||||||
|
sectionSeparators = {
|
||||||
|
left = "";
|
||||||
|
right = "";
|
||||||
|
};
|
||||||
|
inactiveSections = {
|
||||||
|
lualine_a = [ "filename" ];
|
||||||
|
lualine_b = null;
|
||||||
|
lualine_c = null;
|
||||||
|
lualine_x = null;
|
||||||
|
lualine_y = null;
|
||||||
|
lualine_z = [ "location" ];
|
||||||
|
};
|
||||||
|
sections = {
|
||||||
|
lualine_a = ["mode" "separator = { left = '' }" "right_padding = 2" ];
|
||||||
|
lualine_b = [ "filename" "branch" ];
|
||||||
|
lualine_c = [ "fileformat" ];
|
||||||
|
lualine_x = [ ];
|
||||||
|
lualine_y = [ "filetype" "progress" ];
|
||||||
|
lualine_z = [ "location" "separator = { right = '' }" "left_padding = 2" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
startup = {
|
||||||
|
enable = true;
|
||||||
|
theme = "dashboard";
|
||||||
|
};
|
||||||
|
lint = {
|
||||||
|
enable = true;
|
||||||
|
lintersByFt = {
|
||||||
|
text = ["vale"];
|
||||||
|
json = ["jsonlint"];
|
||||||
|
markdown = ["vale"];
|
||||||
|
rst = ["vale"];
|
||||||
|
ruby = ["ruby"];
|
||||||
|
janet = ["janet"];
|
||||||
|
inko = ["inko"];
|
||||||
|
clojure = ["clj-kondo"];
|
||||||
|
dockerfile = ["hadolint"];
|
||||||
|
terraform = ["tflint"];
|
||||||
|
typscriptreact = ["prettier_eslint"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lsp = {
|
||||||
|
enable = true;
|
||||||
|
servers = {
|
||||||
|
tsserver.enable = true;
|
||||||
|
lua-ls.enable = true;
|
||||||
|
bashls.enable = true;
|
||||||
|
rust-analyzer = {
|
||||||
|
enable = true;
|
||||||
|
installRustc = true;
|
||||||
|
installCargo = true;
|
||||||
|
};
|
||||||
|
nixd.enable = true;
|
||||||
|
html.enable = true;
|
||||||
|
ccls.enable = true;
|
||||||
|
cmake.enable = true;
|
||||||
|
csharp-ls.enable = true;
|
||||||
|
cssls.enable = true;
|
||||||
|
gopls.enable = true;
|
||||||
|
jsonls.enable = true;
|
||||||
|
pyright.enable = true;
|
||||||
|
tailwindcss.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lsp-lines.enable = true;
|
||||||
|
treesitter = {
|
||||||
|
enable = true;
|
||||||
|
nixGrammars = true;
|
||||||
|
};
|
||||||
|
nvim-cmp = {
|
||||||
|
enable = true;
|
||||||
|
autoEnableSources = true;
|
||||||
|
sources = [
|
||||||
|
{ name = "nvim_lsp"; }
|
||||||
|
{ name = "path"; }
|
||||||
|
{ name = "buffer"; }
|
||||||
|
];
|
||||||
|
mapping = {
|
||||||
|
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||||
|
"<Tab>" = {
|
||||||
|
action = ''cmp.mapping.select_next_item()'';
|
||||||
|
modes = [ "i" "s" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# FOR NEOVIDE
|
||||||
|
extraConfigLua = ''
|
||||||
|
vim.opt.guifont = "JetBrainsMono\\ NFM,Noto_Color_Emoji:h14"
|
||||||
|
vim.g.neovide_cursor_animation_length = 0.05
|
||||||
|
'';
|
||||||
|
|
||||||
|
extraConfigVim = ''
|
||||||
|
set noshowmode
|
||||||
|
inoremap jj <ESC>
|
||||||
|
'';
|
||||||
|
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>fb";
|
||||||
|
action = "<cmd>Neotree reveal right<CR>";
|
||||||
|
options.silent = false;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<Tab>";
|
||||||
|
action = ":bnext<CR>";
|
||||||
|
options.silent = false;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<S-Tab>";
|
||||||
|
action = ":bprev<CR>";
|
||||||
|
options.silent = false;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
@ -15,7 +15,6 @@
|
|||||||
./intel-nvidia.nix
|
./intel-nvidia.nix
|
||||||
./kernel.nix
|
./kernel.nix
|
||||||
./logitech.nix
|
./logitech.nix
|
||||||
./neovim.nix
|
|
||||||
./nfs.nix
|
./nfs.nix
|
||||||
./ntp.nix
|
./ntp.nix
|
||||||
./nvidia.nix
|
./nvidia.nix
|
||||||
|
@ -1,136 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
plugins = pkgs.vimPlugins;
|
|
||||||
inherit (import ../../options.nix) theme;
|
|
||||||
in {
|
|
||||||
programs.nixvim = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
plugins = {
|
|
||||||
telescope.enable = true;
|
|
||||||
neo-tree.enable = true;
|
|
||||||
indent-blankline.enable = true;
|
|
||||||
lualine = {
|
|
||||||
enable = true;
|
|
||||||
theme = "auto";
|
|
||||||
};
|
|
||||||
startup = {
|
|
||||||
enable = true;
|
|
||||||
theme = "dashboard";
|
|
||||||
userMappings = {
|
|
||||||
"<leader>ff" = "<cmd>Telescope find_files<CR>";
|
|
||||||
"<leader>s" = "<cmd>Telescope live_grep<CR>";
|
|
||||||
"<leader>fb" = "<cmd>Neotree reveal right<CR>";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
comment-nvim.enable = true;
|
|
||||||
lsp = {
|
|
||||||
enable = true;
|
|
||||||
servers = {
|
|
||||||
tsserver.enable = true;
|
|
||||||
lua-ls.enable = true;
|
|
||||||
bashls.enable = true;
|
|
||||||
rust-analyzer = {
|
|
||||||
enable = true;
|
|
||||||
installRustc = true;
|
|
||||||
installCargo = true;
|
|
||||||
};
|
|
||||||
nixd.enable = true;
|
|
||||||
html.enable = true;
|
|
||||||
ccls.enable = true;
|
|
||||||
cmake.enable = true;
|
|
||||||
csharp-ls.enable = true;
|
|
||||||
cssls.enable = true;
|
|
||||||
gopls.enable = true;
|
|
||||||
jsonls.enable = true;
|
|
||||||
pyright.enable = true;
|
|
||||||
tailwindcss.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
treesitter.enable = true;
|
|
||||||
nvim-cmp = {
|
|
||||||
enable = true;
|
|
||||||
autoEnableSources = true;
|
|
||||||
sources = [
|
|
||||||
{ name = "nvim_lsp"; }
|
|
||||||
{ name = "path"; }
|
|
||||||
{ name = "buffer"; }
|
|
||||||
];
|
|
||||||
mapping = {
|
|
||||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
|
||||||
"<Tab>" = {
|
|
||||||
action = ''cmp.mapping.select_next_item()'';
|
|
||||||
modes = [ "i" "s" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
extraPlugins = [
|
|
||||||
plugins.nvim-base16
|
|
||||||
];
|
|
||||||
|
|
||||||
globals.mapleader = " "; # Sets the leader key to space
|
|
||||||
|
|
||||||
extraConfigLua = ''
|
|
||||||
local builtin = require('telescope.builtin')
|
|
||||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
|
||||||
vim.keymap.set('n', '<leader>s', function()
|
|
||||||
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
|
||||||
end)
|
|
||||||
vim.api.nvim_set_option("clipboard","unnamed")
|
|
||||||
'';
|
|
||||||
|
|
||||||
extraConfigVim = ''
|
|
||||||
set noshowmode
|
|
||||||
colorscheme base16-${theme}
|
|
||||||
inoremap jj <ESC>
|
|
||||||
let s:guifontsize = 16
|
|
||||||
let s:guifont = "JetBrainsMono\\ Nerd\\ Font"
|
|
||||||
" " Copy to clipboard
|
|
||||||
vnoremap <leader>y "+y
|
|
||||||
nnoremap <leader>Y "+yg_
|
|
||||||
nnoremap <leader>y "+y
|
|
||||||
nnoremap <leader>yy "+yy
|
|
||||||
|
|
||||||
" " Paste from clipboard
|
|
||||||
nnoremap <leader>p "+p
|
|
||||||
nnoremap <leader>P "+P
|
|
||||||
vnoremap <leader>p "+p
|
|
||||||
vnoremap <leader>P "+P
|
|
||||||
'';
|
|
||||||
|
|
||||||
keymaps = [
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>tf";
|
|
||||||
options.silent = false;
|
|
||||||
action = "<cmd>Ex<CR>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>fb";
|
|
||||||
options.silent = false;
|
|
||||||
action = "<cmd>Neotree reveal right<CR>";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
options = {
|
|
||||||
number = true; # Show line numbers
|
|
||||||
relativenumber = true; # Show relative line numbers
|
|
||||||
shiftwidth = 2; # Tab width should be 2
|
|
||||||
softtabstop = 2;
|
|
||||||
smartindent = true;
|
|
||||||
wrap = false;
|
|
||||||
swapfile = false;
|
|
||||||
backup = false;
|
|
||||||
hlsearch = false;
|
|
||||||
incsearch = true;
|
|
||||||
termguicolors = true;
|
|
||||||
scrolloff = 8;
|
|
||||||
updatetime = 50;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
@ -15,7 +15,7 @@ in {
|
|||||||
hostname = "${hostname}";
|
hostname = "${hostname}";
|
||||||
gitUsername = "Tyler Kelley";
|
gitUsername = "Tyler Kelley";
|
||||||
gitEmail = "tylerzanekelley@gmail.com";
|
gitEmail = "tylerzanekelley@gmail.com";
|
||||||
theme = "tomorrow-night";
|
theme = "catppuccin-mocha";
|
||||||
slickbar = if waybarStyle == "slickbar" then true else false;
|
slickbar = if waybarStyle == "slickbar" then true else false;
|
||||||
slickbar-num = if waybarStyle == "slickbar-num" then true else false;
|
slickbar-num = if waybarStyle == "slickbar-num" then true else false;
|
||||||
simplebar = if waybarStyle == "simplebar" then true else false;
|
simplebar = if waybarStyle == "simplebar" then true else false;
|
||||||
|
@ -5,11 +5,13 @@ let
|
|||||||
inherit (import ./options.nix)
|
inherit (import ./options.nix)
|
||||||
theLocale theTimezone gitUsername
|
theLocale theTimezone gitUsername
|
||||||
theShell wallpaperDir wallpaperGit
|
theShell wallpaperDir wallpaperGit
|
||||||
theLCVariables theKBDLayout flakeDir;
|
theLCVariables theKBDLayout flakeDir
|
||||||
|
theme;
|
||||||
in {
|
in {
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
inputs.nixvim.nixosModules.nixvim
|
inputs.nixvim.nixosModules.nixvim
|
||||||
|
inputs.nix-colors.homeManagerModules.default
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./config/system
|
./config/system
|
||||||
];
|
];
|
||||||
@ -18,6 +20,8 @@ in {
|
|||||||
networking.hostName = "${hostname}"; # Define your hostname
|
networking.hostName = "${hostname}"; # Define your hostname
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
colorScheme = inputs.nix-colors.colorSchemes."${theme}";
|
||||||
|
|
||||||
# Set your time zone
|
# Set your time zone
|
||||||
time.timeZone = "${theTimezone}";
|
time.timeZone = "${theTimezone}";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user