feat(home:nvim): move to external neovim flake
This commit is contained in:
parent
3fe90d2e5f
commit
5e2324a9d6
15 changed files with 187 additions and 414 deletions
|
|
@ -1,37 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
inherit (config.colorscheme) slug;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim = {
|
||||
colorschemes.base16 = {
|
||||
enable = true;
|
||||
colorscheme = "${slug}";
|
||||
# colorscheme = {
|
||||
# base00 = "#${palette.base00}";
|
||||
# base01 = "#${palette.base01}";
|
||||
# base02 = "#${palette.base02}";
|
||||
# base03 = "#${palette.base03}";
|
||||
# base04 = "#${palette.base04}";
|
||||
# base05 = "#${palette.base05}";
|
||||
# base06 = "#${palette.base06}";
|
||||
# base07 = "#${palette.base07}";
|
||||
# base08 = "#${palette.base08}";
|
||||
# base09 = "#${palette.base09}";
|
||||
# base0A = "#${palette.base0A}";
|
||||
# base0B = "#${palette.base0B}";
|
||||
# base0C = "#${palette.base0C}";
|
||||
# base0D = "#${palette.base0D}";
|
||||
# base0E = "#${palette.base0E}";
|
||||
# base0F = "#${palette.base0F}";
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,36 +1,16 @@
|
|||
{ config, lib, inputs, ... }:
|
||||
{ config, lib, inputs, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
|
||||
ookvim = inputs.ookvim.packages.${pkgs.system}.default;
|
||||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
./settings.nix
|
||||
./keymapping.nix
|
||||
./plugins
|
||||
./colorscheme.nix
|
||||
];
|
||||
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.neovim = {
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
plugins = {
|
||||
which-key = {
|
||||
enable = true;
|
||||
keyLabels = {
|
||||
" " = "<space>";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
home.packages = [ ookvim ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim = {
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
maplocalleader = " ";
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>f";
|
||||
action = "+find/file";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
imports = [
|
||||
./indent.nix
|
||||
./telescope.nix
|
||||
./lualine.nix
|
||||
./lsp.nix
|
||||
./noice.nix
|
||||
./nvim-autopairs.nix
|
||||
./vim-nix.nix
|
||||
./treesitter.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim.plugins.indent-blankline = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim.plugins = {
|
||||
lsp-lines.enable = true;
|
||||
lsp = {
|
||||
enable = true;
|
||||
capabilities = "offsetEncoding = 'utf-16'";
|
||||
servers = {
|
||||
|
||||
# nix
|
||||
nil-ls = {
|
||||
enable = true;
|
||||
};
|
||||
# markdown
|
||||
marksman = {
|
||||
enable = true;
|
||||
};
|
||||
# css
|
||||
cssls = {
|
||||
enable = true;
|
||||
};
|
||||
# c/c++
|
||||
clangd = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim.plugins.lualine = {
|
||||
enable = true;
|
||||
globalstatus = true;
|
||||
sections = {
|
||||
lualine_a = ["mode"];
|
||||
lualine_b = ["branch"];
|
||||
lualine_c = ["filename" "diff"];
|
||||
lualine_x = ["diagnostics"];
|
||||
lualine_y = ["fileformat"];
|
||||
lualine_z = ["filetype"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim.plugins.noice = {
|
||||
enable = true;
|
||||
presets = {
|
||||
bottom_search = true;
|
||||
command_palette = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim.plugins.nvim-autopairs = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim = {
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
extensions = {
|
||||
fzf-native.enable = true;
|
||||
frecency.enable = true;
|
||||
};
|
||||
|
||||
keymaps = {
|
||||
"<leader>ff" = "find_files";
|
||||
"<leader>fg" = "live_grep";
|
||||
"<leader>b" = "buffers";
|
||||
"<leader>fh" = "help_tags";
|
||||
"<leader>fd" = "diagnostics";
|
||||
|
||||
"<C-p>" = "git_files";
|
||||
"<leader>p" = "oldfiles";
|
||||
"<C-f>" = "live_grep";
|
||||
};
|
||||
|
||||
defaults = {
|
||||
file_ignore_patterns = [
|
||||
"^.git/"
|
||||
"^data/"
|
||||
];
|
||||
set_env.COLORTERM = "truecolor";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim.plugins.treesitter = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim.plugins.nix = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.ooknet.editor.nvim;
|
||||
console = config.ooknet.console;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
programs.nixvim = {
|
||||
opts = {
|
||||
|
||||
# line numbers
|
||||
relativenumber = true;
|
||||
number = true;
|
||||
|
||||
# command line height
|
||||
cmdheight = 2;
|
||||
|
||||
# popup menu height (0 == use all available space)
|
||||
pumheight = 0;
|
||||
|
||||
hidden = true;
|
||||
|
||||
# mouse mode
|
||||
mouse = "a";
|
||||
mousemodel = "extend";
|
||||
|
||||
# undo history
|
||||
undofile = true;
|
||||
swapfile = false;
|
||||
backup = false;
|
||||
|
||||
# tab size
|
||||
tabstop = 2;
|
||||
expandtab = true;
|
||||
showtabline = 2;
|
||||
softtabstop = 2;
|
||||
|
||||
# auto indenting
|
||||
smartindent = true;
|
||||
shiftwidth = 2;
|
||||
|
||||
# text wrapping
|
||||
wrap = true;
|
||||
|
||||
# fold settings
|
||||
foldcolumn = "0";
|
||||
foldlevel = 99;
|
||||
foldlevelstart = 99;
|
||||
foldenable = true;
|
||||
|
||||
# which-key timeout
|
||||
timeoutlen = 10;
|
||||
|
||||
# faster updatetime
|
||||
updatetime = 50;
|
||||
|
||||
# cursor position unless at start/end
|
||||
scrolloff = 8;
|
||||
|
||||
# 24 bit colors
|
||||
termguicolors = true;
|
||||
|
||||
# highlight cursor line
|
||||
cursorline = true;
|
||||
|
||||
# encoding
|
||||
encoding = "utf-8";
|
||||
fileencoding = "utf-8";
|
||||
|
||||
# chars list
|
||||
# list = true;
|
||||
# listchars = "eol:↲,tab:|->,lead:·,space: ,trail:•,extends:→,precedes:←,nbsp:␣";
|
||||
|
||||
# splitting
|
||||
splitbelow = true;
|
||||
splitright = true;
|
||||
|
||||
# better searching
|
||||
ignorecase = true;
|
||||
grepprg = "rg --vimgrep";
|
||||
grepformat = "%f:%l:%c:%m";
|
||||
smartcase = true;
|
||||
|
||||
# prevent screen jumping
|
||||
signcolumn = "yes";
|
||||
|
||||
incsearch = true;
|
||||
autoindent = true;
|
||||
};
|
||||
|
||||
clipboard = {
|
||||
register = "unnamedplus";
|
||||
providers.wl-copy.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue