fix kitty, restructure nvf
This commit is contained in:
parent
0e0f29d425
commit
5493ef8a57
11 changed files with 101 additions and 70 deletions
3
modules/nixos/cli/neovim/cmp/default.nix
Normal file
3
modules/nixos/cli/neovim/cmp/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.nvf.settings.vim.autocomplete.nvim-cmp.enable = true;
|
||||
}
|
|
@ -1,5 +1,53 @@
|
|||
{
|
||||
imports = [
|
||||
./vim-config.nix
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.${namespace};
|
||||
let
|
||||
cfg = config.${namespace}.cli.neovim;
|
||||
in
|
||||
{
|
||||
options.${namespace}.cli.neovim = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable neovim.";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
vim = {
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
lineNumberMode = "relNumber";
|
||||
|
||||
options = {
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
cursorlineopt = "screenline";
|
||||
};
|
||||
|
||||
undoFile.enable = true;
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "<C-n>";
|
||||
mode = [ "n" ];
|
||||
action = "<CMD>Neotree toggle<CR>";
|
||||
desc = "Toggles neo-tree";
|
||||
}
|
||||
{
|
||||
key = "g=";
|
||||
mode = [ "n" ];
|
||||
action = "m'ggVG=''";
|
||||
desc = "Reindent code";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
17
modules/nixos/cli/neovim/lsp/default.nix
Normal file
17
modules/nixos/cli/neovim/lsp/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
programs.nvf.settings.vim = {
|
||||
lsp.enable = true;
|
||||
languages = {
|
||||
enableLSP = true;
|
||||
enableTreesitter = true;
|
||||
nix.enable = true;
|
||||
nix.format.type = "nixfmt";
|
||||
bash.enable = true;
|
||||
go.enable = true;
|
||||
rust.enable = true;
|
||||
python.enable = true;
|
||||
enableFormat = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
3
modules/nixos/cli/neovim/lualine/default.nix
Normal file
3
modules/nixos/cli/neovim/lualine/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.nvf.settings.vim.statusline.lualine.enable = true;
|
||||
}
|
7
modules/nixos/cli/neovim/neo-tree/default.nix
Normal file
7
modules/nixos/cli/neovim/neo-tree/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
programs.nvf.settings.vim.filetree.neo-tree = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
};
|
||||
};
|
||||
}
|
3
modules/nixos/cli/neovim/rainbow-delimiters/default.nix
Normal file
3
modules/nixos/cli/neovim/rainbow-delimiters/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.nvf.settings.vim.visuals.rainbow-delimiters.enable = true;
|
||||
}
|
3
modules/nixos/cli/neovim/surround/default.nix
Normal file
3
modules/nixos/cli/neovim/surround/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.nvf.settings.vim.mini.surround.enable = true;
|
||||
}
|
3
modules/nixos/cli/neovim/telescope/default.nix
Normal file
3
modules/nixos/cli/neovim/telescope/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.nvf.settings.vim.telescope.enable = true;
|
||||
}
|
8
modules/nixos/cli/neovim/theme/default.nix
Normal file
8
modules/nixos/cli/neovim/theme/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
programs.nvf.settings.vim.theme = {
|
||||
enable = true;
|
||||
name = "tokyonight";
|
||||
style = "night";
|
||||
};
|
||||
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.${namespace};
|
||||
let
|
||||
cfg = config.${namespace}.cli.neovim;
|
||||
in
|
||||
{
|
||||
options.${namespace}.cli.neovim = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable neovim.";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
vim = {
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
options = {
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
};
|
||||
|
||||
undoFile.enable = true;
|
||||
|
||||
theme = {
|
||||
enable = true;
|
||||
name = "tokyonight";
|
||||
style = "night";
|
||||
};
|
||||
|
||||
lsp.enable = true;
|
||||
statusline.lualine.enable = true;
|
||||
telescope.enable = true;
|
||||
autocomplete.nvim-cmp.enable = true;
|
||||
languages = {
|
||||
enableLSP = true;
|
||||
enableTreesitter = true;
|
||||
nix.enable = true;
|
||||
};
|
||||
filetree.neo-tree = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
key = "<C-n>";
|
||||
mode = [ "n" ];
|
||||
action = "<CMD>Neotree toggle<CR>";
|
||||
desc = "Toggles neo-tree";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue