@@ -1,7 +1,8 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
@@ -9,25 +10,55 @@
|
||||
in {
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
./autocommands.nix
|
||||
./completion.nix
|
||||
./keymappings.nix
|
||||
./options.nix
|
||||
./plugins
|
||||
./autocmd.nix
|
||||
./completion.nix
|
||||
./keymap.nix
|
||||
./options.nix
|
||||
./todo.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
modules.devtools.neovim.enable = mkEnableOption "Enables neovim";
|
||||
modules.devtools.neovim.enable = mkEnableOption "Enable Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
extraPlugins = [pkgs.vimPlugins.gruvbox-material];
|
||||
colorscheme = "gruvbox-material";
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
luaLoader.enable = true;
|
||||
plugins = {
|
||||
gitsigns = {
|
||||
enable = true;
|
||||
settings.signs = {
|
||||
add.text = "+";
|
||||
change.text = "~";
|
||||
};
|
||||
};
|
||||
nvim-autopairs.enable = true;
|
||||
nvim-colorizer = {
|
||||
enable = true;
|
||||
userDefaultOptions.names = false;
|
||||
};
|
||||
oil.enable = true;
|
||||
trim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
highlight = false;
|
||||
ft_blocklist = [
|
||||
"checkhealth"
|
||||
"floaterm"
|
||||
"lspinfo"
|
||||
"neo-tree"
|
||||
"TelescopePrompt"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
59
home/modules/devtools/neovim/plugins/ai.nix
Normal file
59
home/modules/devtools/neovim/plugins/ai.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.ai;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.ai.enable = mkEnableOption "Enables AI tools for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
chatgpt = {
|
||||
enable = true;
|
||||
settings = {
|
||||
api_key_cmd = "cat ${config.sops.secrets.openai_api_key.path}";
|
||||
};
|
||||
};
|
||||
copilot-chat.enable = true;
|
||||
|
||||
copilot-lua = {
|
||||
enable = true;
|
||||
suggestion = {
|
||||
enabled = true;
|
||||
autoTrigger = true;
|
||||
keymap.accept = "<C-CR>";
|
||||
};
|
||||
panel.enabled = false;
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
action = "<cmd>CopilotChatToggle<CR>";
|
||||
key = "<leader>ac";
|
||||
options = {
|
||||
desc = "Toggle Coilot chat";
|
||||
};
|
||||
mode = [
|
||||
"n"
|
||||
];
|
||||
}
|
||||
{
|
||||
action = "<cmd>ChatGPT<CR>";
|
||||
key = "<leader>ag";
|
||||
options = {
|
||||
desc = "Toggle ChatGPT";
|
||||
};
|
||||
mode = [
|
||||
"n"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,17 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.barbar;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.barbar.enable = mkEnableOption "Enables Barbar plugin for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins.barbar = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
@@ -7,4 +20,5 @@
|
||||
close.key = "<C-w>";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{config, ...}: {
|
||||
programs.nixvim.plugins.chatgpt = {
|
||||
enable = true;
|
||||
settings = {
|
||||
api_key_cmd = "cat ${config.sops.secrets.openai_api_key.path}";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,17 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.comment;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.comment.enable = mkEnableOption "Enables Comment plugin for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins.comment = {
|
||||
enable = true;
|
||||
|
||||
@@ -7,4 +20,5 @@
|
||||
toggler.line = "<C-b>";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.conform-nvim;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.conform-nvim.enable = mkEnableOption "Enables Conform plugin for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins.conform-nvim = {
|
||||
enable = true;
|
||||
formatOnSave = {
|
||||
@@ -21,4 +34,5 @@
|
||||
yaml = [ "yamllint" "yamlfmt" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,60 +1,22 @@
|
||||
{pkgs, ...}: {
|
||||
{ userModules, ... }: {
|
||||
imports = [
|
||||
./barbar.nix
|
||||
./comment.nix
|
||||
./efm.nix
|
||||
# ./floaterm.nix
|
||||
# ./harpoon.nix
|
||||
./lsp.nix
|
||||
./lualine.nix
|
||||
./markdown-preview.nix
|
||||
./neo-tree.nix
|
||||
./startify.nix
|
||||
./tagbar.nix
|
||||
./telescope.nix
|
||||
./treesitter.nix
|
||||
# ./chatgpt.nix
|
||||
# ./vimtex.nix
|
||||
./nonels.nix
|
||||
./conform.nix
|
||||
# ./yanky.nix
|
||||
"${userModules}/devtools/neovim/plugins/ai.nix"
|
||||
"${userModules}/devtools/neovim/plugins/barbar.nix"
|
||||
"${userModules}/devtools/neovim/plugins/comment.nix"
|
||||
"${userModules}/devtools/neovim/plugins/conform.nix"
|
||||
"${userModules}/devtools/neovim/plugins/efm.nix"
|
||||
"${userModules}/devtools/neovim/plugins/floaterm.nix"
|
||||
"${userModules}/devtools/neovim/plugins/harpoon.nix"
|
||||
"${userModules}/devtools/neovim/plugins/lsp.nix"
|
||||
"${userModules}/devtools/neovim/plugins/lualine.nix"
|
||||
"${userModules}/devtools/neovim/plugins/markdown-preview.nix"
|
||||
"${userModules}/devtools/neovim/plugins/neo-tree.nix"
|
||||
"${userModules}/devtools/neovim/plugins/nonels.nix"
|
||||
"${userModules}/devtools/neovim/plugins/startify.nix"
|
||||
"${userModules}/devtools/neovim/plugins/tagbar.nix"
|
||||
"${userModules}/devtools/neovim/plugins/telescope.nix"
|
||||
"${userModules}/devtools/neovim/plugins/treesitter.nix"
|
||||
"${userModules}/devtools/neovim/plugins/vimtex.nix"
|
||||
"${userModules}/devtools/neovim/plugins/yanky.nix"
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
extraPlugins = [pkgs.vimPlugins.gruvbox-material];
|
||||
colorscheme = "gruvbox-material";
|
||||
|
||||
plugins = {
|
||||
gitsigns = {
|
||||
enable = true;
|
||||
settings.signs = {
|
||||
add.text = "+";
|
||||
change.text = "~";
|
||||
};
|
||||
};
|
||||
|
||||
nvim-autopairs.enable = true;
|
||||
|
||||
nvim-colorizer = {
|
||||
enable = true;
|
||||
userDefaultOptions.names = false;
|
||||
};
|
||||
|
||||
oil.enable = true;
|
||||
|
||||
trim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
highlight = false;
|
||||
ft_blocklist = [
|
||||
"checkhealth"
|
||||
"floaterm"
|
||||
"lspinfo"
|
||||
"neo-tree"
|
||||
"TelescopePrompt"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.efm;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.efm.enable = mkEnableOption "Enables EFM LSP support for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins = {
|
||||
lsp.servers.efm = {
|
||||
enable = true;
|
||||
@@ -19,4 +32,5 @@
|
||||
|
||||
efmls-configs.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,12 +1,24 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.floaterm;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.floaterm.enable = mkEnableOption "Enables Floaterm plugin for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins.floaterm = {
|
||||
enable = true;
|
||||
|
||||
width = 0.8;
|
||||
height = 0.8;
|
||||
|
||||
title = "";
|
||||
|
||||
keymaps.toggle = "<leader>,";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.harpoon;
|
||||
in
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.harpoon = {
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.harpoon.enable = mkEnableOption "Enables Harpoon plugin for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins.harpoon = {
|
||||
enable = true;
|
||||
|
||||
keymapsSilent = true;
|
||||
|
||||
@@ -1,13 +1,44 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
lsp = {
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.lsp;
|
||||
in {
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.lsp = {
|
||||
enable = mkEnableOption "Enables LSP support for Neovim";
|
||||
servers = {
|
||||
cssls.enable = mkEnableOption "Enable CSS LSP";
|
||||
tailwindcss.enable = mkEnableOption "Enable TailwindCSS LSP";
|
||||
html.enable = mkEnableOption "Enable HTML LSP";
|
||||
astro.enable = mkEnableOption "Enable AstroJS LSP";
|
||||
phpactor.enable = mkEnableOption "Enable PHP LSP";
|
||||
svelte.enable = mkEnableOption "Enable Svelte LSP";
|
||||
vuels.enable = mkEnableOption "Enable Vue LSP";
|
||||
pyright.enable = mkEnableOption "Enable Python LSP";
|
||||
marksman.enable = mkEnableOption "Enable Markdown LSP";
|
||||
nixd.enable = mkEnableOption "Enable Nix LSP";
|
||||
dockerls.enable = mkEnableOption "Enable Docker LSP";
|
||||
bashls.enable = mkEnableOption "Enable Bash LSP";
|
||||
clangd.enable = mkEnableOption "Enable C/C++ LSP";
|
||||
csharp-ls.enable = mkEnableOption "Enable C# LSP";
|
||||
yamlls.enable = mkEnableOption "Enable YAML LSP";
|
||||
lua-ls.enable = mkEnableOption "Enable Lua LSP";
|
||||
tsserver.enable = mkEnableOption "Enable TypeScript/JavaScript LSP";
|
||||
rust-analyzer.enable = mkEnableOption "Enable Rust LSP";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins.lsp = {
|
||||
enable = true;
|
||||
|
||||
keymaps = {
|
||||
silent = true;
|
||||
diagnostic = {
|
||||
# Navigate in diagnostics
|
||||
"<leader>k" = "goto_prev";
|
||||
"<leader>j" = "goto_next";
|
||||
};
|
||||
@@ -22,63 +53,33 @@
|
||||
};
|
||||
};
|
||||
|
||||
# Language server
|
||||
servers = {
|
||||
# Average webdev LSPs
|
||||
cssls.enable = true; # CSS
|
||||
tailwindcss.enable = true; # TailwindCSS
|
||||
html.enable = true; # HTML
|
||||
astro.enable = false; # AstroJS
|
||||
phpactor.enable = true; # PHP
|
||||
svelte.enable = false; # Svelte
|
||||
vuels.enable = false; # Vue
|
||||
|
||||
# Python
|
||||
pyright.enable = true;
|
||||
|
||||
# Markdown
|
||||
marksman.enable = true;
|
||||
|
||||
# Nix
|
||||
nixd.enable = true;
|
||||
|
||||
# Docker
|
||||
dockerls.enable = true;
|
||||
|
||||
# Bash
|
||||
bashls.enable = true;
|
||||
|
||||
# C/C++
|
||||
clangd.enable = true;
|
||||
|
||||
# C#
|
||||
csharp-ls.enable = true;
|
||||
|
||||
# Yaml
|
||||
yamlls.enable = true;
|
||||
|
||||
# Lua
|
||||
lua-ls = {
|
||||
enable = true;
|
||||
cssls = mkIf cfg.servers.cssls.enable {};
|
||||
tailwindcss = mkIf cfg.servers.tailwindcss.enable {};
|
||||
html = mkIf cfg.servers.html.enable {};
|
||||
astro = mkIf cfg.servers.astro.enable {};
|
||||
phpactor = mkIf cfg.servers.phpactor.enable {};
|
||||
svelte = mkIf cfg.servers.svelte.enable {};
|
||||
vuels = mkIf cfg.servers.vuels.enable {};
|
||||
pyright = mkIf cfg.servers.pyright.enable {};
|
||||
marksman = mkIf cfg.servers.marksman.enable {};
|
||||
nixd = mkIf cfg.servers.nixd.enable {};
|
||||
dockerls = mkIf cfg.servers.dockerls.enable {};
|
||||
bashls = mkIf cfg.servers.bashls.enable {};
|
||||
clangd = mkIf cfg.servers.clangd.enable {};
|
||||
csharp-ls = mkIf cfg.servers.csharp-ls.enable {};
|
||||
yamlls = mkIf cfg.servers.yamlls.enable {};
|
||||
lua-ls = mkIf cfg.servers.lua-ls.enable {
|
||||
settings.telemetry.enable = false;
|
||||
settings.diagnostics = {
|
||||
globals = ["vim"];
|
||||
settings.diagnostics.globals = ["vim"];
|
||||
};
|
||||
};
|
||||
tsserver = {
|
||||
enable = false; # TS/JS
|
||||
};
|
||||
# Rust
|
||||
rust-analyzer = {
|
||||
enable = true;
|
||||
tsserver = mkIf cfg.servers.tsserver.enable {};
|
||||
rust-analyzer = mkIf cfg.servers.rust-analyzer.enable {
|
||||
installRustc = true;
|
||||
installCargo = true;
|
||||
settings = {
|
||||
checkOnSave = true;
|
||||
check = {
|
||||
command = "clippy";
|
||||
};
|
||||
};
|
||||
check.command = "clippy";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,13 +1,22 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.lualine;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.lualine.enable = mkEnableOption "Enables Lualine plugin for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins.lualine = {
|
||||
enable = true;
|
||||
theme = "gruvbox-material";
|
||||
|
||||
globalstatus = true;
|
||||
|
||||
# +-------------------------------------------------+
|
||||
# | A | B | C X | Y | Z |
|
||||
# +-------------------------------------------------+
|
||||
sections = {
|
||||
lualine_a = [ "mode" ];
|
||||
lualine_b = [ "branch" ];
|
||||
@@ -44,4 +53,5 @@
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.markdown-preview;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.markdown-preview.enable = mkEnableOption "Enables Markdown Preview plugin for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
plugins.markdown-preview = {
|
||||
enable = true;
|
||||
@@ -17,4 +30,5 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.neo-tree;
|
||||
in
|
||||
{
|
||||
programs.nixvim = {
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>n";
|
||||
action = ":Neotree action=focus reveal toggle<CR>";
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.neo-tree.enable = mkEnableOption "Enables Neo-tree plugin for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
|
||||
@@ -18,5 +22,15 @@
|
||||
autoExpandWidth = true;
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>n";
|
||||
action = ":Neotree action=focus reveal toggle<CR>";
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.none-ls;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.none-ls.enable = mkEnableOption "Enables None-LS plugin for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins.none-ls = {
|
||||
enable = true;
|
||||
settings = {
|
||||
@@ -30,7 +43,7 @@
|
||||
enable = true;
|
||||
settings = ''
|
||||
{
|
||||
extra_args = { "--fast" },
|
||||
extra_args = { "--fast" };
|
||||
}
|
||||
'';
|
||||
};
|
||||
@@ -41,4 +54,5 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.startify;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.startify.enable = mkEnableOption "Enables Startify plugin for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins.startify = {
|
||||
enable = true;
|
||||
|
||||
@@ -13,20 +26,12 @@
|
||||
" ╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝"
|
||||
];
|
||||
|
||||
# When opening a file or bookmark, change to its directory.
|
||||
change_to_dir = false;
|
||||
|
||||
# By default, the fortune header uses ASCII characters, because they work for everyone.
|
||||
# If you set this option to 1 and your 'encoding' is "utf-8", Unicode box-drawing characters will
|
||||
# be used instead.
|
||||
use_unicode = true;
|
||||
|
||||
lists = [{ type = "dir"; }];
|
||||
files_number = 30;
|
||||
|
||||
skiplist = [
|
||||
"flake.lock"
|
||||
];
|
||||
skiplist = [ "flake.lock" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.tagbar;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.tagbar.enable = mkEnableOption "Enables Tagbar plugin for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
plugins.tagbar = {
|
||||
enable = true;
|
||||
@@ -14,4 +27,5 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,17 +1,27 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.telescope;
|
||||
in
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.telescope = {
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.telescope.enable = mkEnableOption "Enables Telescope plugin for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins.telescope = {
|
||||
enable = true;
|
||||
|
||||
keymaps = {
|
||||
# Find files using Telescope command-line sugar.
|
||||
"<leader>ff" = "find_files";
|
||||
"<leader>fg" = "live_grep";
|
||||
"<leader>b" = "buffers";
|
||||
"<leader>fh" = "help_tags";
|
||||
"<leader>fd" = "diagnostics";
|
||||
|
||||
# FZF like bindings
|
||||
"<C-p>" = "git_files";
|
||||
"<leader>p" = "oldfiles";
|
||||
"<C-f>" = "live_grep";
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.treesitter;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.devtools.neovim.plugins = {
|
||||
treesitter.enable = mkEnableOption "Enables Treesitter plugin for Neovim";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
|
||||
nixvimInjections = true;
|
||||
|
||||
settings = {
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
@@ -12,15 +25,17 @@
|
||||
folding = true;
|
||||
};
|
||||
|
||||
treesitter-refactor = {
|
||||
treesitter-refactor = mkIf cfg.enable {
|
||||
enable = true;
|
||||
highlightDefinitions = {
|
||||
enable = true;
|
||||
# Set to false if you have an `updatetime` of ~100.
|
||||
clearOnCursorMove = false;
|
||||
};
|
||||
};
|
||||
|
||||
hmts.enable = true;
|
||||
hmts = mkIf cfg.enable {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,23 +1,30 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.vimtex;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.vimtex.enable = mkEnableOption "Enables VimTeX plugin for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
plugins.vimtex = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
view_method = "zathura";
|
||||
|
||||
quickfix_enabled = true;
|
||||
quickfix_open_on_warning = false;
|
||||
|
||||
# Ignore undesired errors and warnings
|
||||
quickfix_ignore_filters = [
|
||||
"Underfull"
|
||||
"Overfull"
|
||||
"specifier changed to"
|
||||
"Token not allowed in a PDF string"
|
||||
];
|
||||
|
||||
# TOC settings
|
||||
toc_config = {
|
||||
name = "TOC";
|
||||
layers = [ "content" "todo" ];
|
||||
@@ -45,12 +52,10 @@
|
||||
pattern = "*.tex";
|
||||
command = "set filetype=tex \"| VimtexTocOpen";
|
||||
}
|
||||
|
||||
# Folding
|
||||
{
|
||||
event = "FileType";
|
||||
pattern = [ "tex" "latex" ];
|
||||
callback.__raw = ''
|
||||
callback = ''
|
||||
function ()
|
||||
vim.o.foldmethod = 'expr'
|
||||
vim.o.foldexpr = 'vimtex#fold#level(v:lnum)'
|
||||
@@ -58,15 +63,11 @@
|
||||
end
|
||||
'';
|
||||
}
|
||||
|
||||
# Compile on initialization
|
||||
{
|
||||
event = "User";
|
||||
pattern = "VimtexEventInitPost";
|
||||
callback = "vimtex#compiler#compile";
|
||||
}
|
||||
|
||||
# Cleanup on exit
|
||||
{
|
||||
event = "User";
|
||||
pattern = "VimtexEventQuit";
|
||||
@@ -74,4 +75,5 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.neovim.plugins.yanky;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.devtools.neovim.plugins.yanky.enable = mkEnableOption "Enables Yanky plugin for Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins.yanky = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.wm.hyprland.toothpick.inputs;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.wm.hyprland.toothpick.inputs.enable = mkEnableOption "Enables input settings in Hyprland";
|
||||
};
|
||||
@@ -48,7 +49,7 @@ in {
|
||||
workspace_swipe_create_new = true;
|
||||
};
|
||||
misc = {
|
||||
vrr = 2;
|
||||
vrr = 0;
|
||||
mouse_move_enables_dpms = 1;
|
||||
key_press_enables_dpms = 0;
|
||||
force_default_wallpaper = 0;
|
||||
@@ -59,8 +60,8 @@ in {
|
||||
force_zero_scaling = false;
|
||||
};
|
||||
render = {
|
||||
explicit_sync = 2;
|
||||
explicit_sync_kms = 2;
|
||||
explicit_sync = 0;
|
||||
explicit_sync_kms = 0;
|
||||
direct_scanout = false;
|
||||
};
|
||||
cursor = {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
sessionVariables = {
|
||||
BROWSER = "firefox";
|
||||
EDITOR = "nvim";
|
||||
TERM = "foot";
|
||||
TERM = "xterm-256color";
|
||||
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
|
||||
@@ -8,7 +8,51 @@
|
||||
discord.enable = true;
|
||||
};
|
||||
devtools = {
|
||||
neovim.enable = true;
|
||||
neovim = {
|
||||
enable = true;
|
||||
plugins = {
|
||||
ai.enable = true;
|
||||
barbar.enable = true;
|
||||
comment.enable = true;
|
||||
conform-nvim.enable = true;
|
||||
efm.enable = true;
|
||||
lualine.enable = true;
|
||||
markdown-preview.enable = true;
|
||||
neo-tree.enable = true;
|
||||
none-ls.enable = true;
|
||||
startify.enable = true;
|
||||
telescope.enable = true;
|
||||
treesitter.enable = true;
|
||||
floaterm.enable = false;
|
||||
harpoon.enable = false;
|
||||
tagbar.enable = false;
|
||||
vimtex.enable = false;
|
||||
yanky.enable = false;
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
cssls.enable = true;
|
||||
tailwindcss.enable = true;
|
||||
html.enable = true;
|
||||
astro.enable = false;
|
||||
phpactor.enable = true;
|
||||
svelte.enable = false;
|
||||
vuels.enable = false;
|
||||
pyright.enable = true;
|
||||
marksman.enable = true;
|
||||
nixd.enable = true;
|
||||
dockerls.enable = true;
|
||||
bashls.enable = true;
|
||||
clangd.enable = true;
|
||||
csharp-ls.enable = true;
|
||||
yamlls.enable = true;
|
||||
lua-ls.enable = true;
|
||||
tsserver.enable = false;
|
||||
rust-analyzer.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
vscode.enable = false;
|
||||
};
|
||||
gaming = {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
sessionVariables = {
|
||||
BROWSER = "firefox";
|
||||
EDITOR = "nvim";
|
||||
TERM = "kitty";
|
||||
TERM = "xterm-256color";
|
||||
|
||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/cnst/.steam/root/compatibilitytools.d"; # proton and steam compat
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
|
||||
@@ -8,7 +8,51 @@
|
||||
discord.enable = true;
|
||||
};
|
||||
devtools = {
|
||||
neovim.enable = true;
|
||||
neovim = {
|
||||
enable = true;
|
||||
plugins = {
|
||||
ai.enable = true;
|
||||
barbar.enable = true;
|
||||
comment.enable = true;
|
||||
conform-nvim.enable = true;
|
||||
efm.enable = true;
|
||||
lualine.enable = true;
|
||||
markdown-preview.enable = true;
|
||||
neo-tree.enable = true;
|
||||
none-ls.enable = true;
|
||||
startify.enable = true;
|
||||
telescope.enable = true;
|
||||
treesitter.enable = true;
|
||||
floaterm.enable = false;
|
||||
harpoon.enable = false;
|
||||
tagbar.enable = false;
|
||||
vimtex.enable = false;
|
||||
yanky.enable = false;
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
cssls.enable = true;
|
||||
tailwindcss.enable = true;
|
||||
html.enable = true;
|
||||
astro.enable = false;
|
||||
phpactor.enable = true;
|
||||
svelte.enable = false;
|
||||
vuels.enable = false;
|
||||
pyright.enable = true;
|
||||
marksman.enable = true;
|
||||
nixd.enable = true;
|
||||
dockerls.enable = true;
|
||||
bashls.enable = true;
|
||||
clangd.enable = true;
|
||||
csharp-ls.enable = true;
|
||||
yamlls.enable = true;
|
||||
lua-ls.enable = true;
|
||||
tsserver.enable = false;
|
||||
rust-analyzer.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
vscode.enable = false;
|
||||
};
|
||||
gaming = {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
sessionVariables = {
|
||||
BROWSER = "firefox";
|
||||
EDITOR = "nvim";
|
||||
TERM = "foot";
|
||||
TERM = "xterm-256color";
|
||||
|
||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/toothpick/.steam/root/compatibilitytools.d"; # proton and steam compat
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
|
||||
@@ -8,7 +8,51 @@
|
||||
discord.enable = true;
|
||||
};
|
||||
devtools = {
|
||||
neovim.enable = true;
|
||||
neovim = {
|
||||
enable = true;
|
||||
plugins = {
|
||||
ai.enable = false;
|
||||
barbar.enable = true;
|
||||
comment.enable = true;
|
||||
conform-nvim.enable = true;
|
||||
efm.enable = true;
|
||||
lualine.enable = true;
|
||||
markdown-preview.enable = true;
|
||||
neo-tree.enable = true;
|
||||
none-ls.enable = true;
|
||||
startify.enable = true;
|
||||
telescope.enable = true;
|
||||
treesitter.enable = true;
|
||||
floaterm.enable = false;
|
||||
harpoon.enable = false;
|
||||
tagbar.enable = false;
|
||||
vimtex.enable = false;
|
||||
yanky.enable = false;
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
cssls.enable = true;
|
||||
tailwindcss.enable = true;
|
||||
html.enable = true;
|
||||
astro.enable = false;
|
||||
phpactor.enable = true;
|
||||
svelte.enable = false;
|
||||
vuels.enable = false;
|
||||
pyright.enable = true;
|
||||
marksman.enable = true;
|
||||
nixd.enable = true;
|
||||
dockerls.enable = true;
|
||||
bashls.enable = true;
|
||||
clangd.enable = true;
|
||||
csharp-ls.enable = true;
|
||||
yamlls.enable = true;
|
||||
lua-ls.enable = true;
|
||||
tsserver.enable = false;
|
||||
rust-analyzer.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
vscode.enable = true;
|
||||
};
|
||||
gaming = {
|
||||
|
||||
@@ -64,6 +64,8 @@
|
||||
corectrl.enable = true;
|
||||
microfetch.enable = true;
|
||||
nix-ld.enable = false;
|
||||
misc.enable = true;
|
||||
npm.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -36,5 +36,7 @@
|
||||
"${systemModules}/utils/corectrl"
|
||||
"${systemModules}/utils/microfetch"
|
||||
"${systemModules}/utils/nix-ld"
|
||||
"${systemModules}/utils/misc"
|
||||
"${systemModules}/utils/npm"
|
||||
];
|
||||
}
|
||||
|
||||
20
system/modules/utils/misc/default.nix
Normal file
20
system/modules/utils/misc/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.utils.misc;
|
||||
in {
|
||||
options = {
|
||||
modules.utils.misc.enable = mkEnableOption "Enables miscellaneous pacakges";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
nodejs_22
|
||||
ripgrep
|
||||
fd
|
||||
];
|
||||
};
|
||||
}
|
||||
17
system/modules/utils/npm/default.nix
Normal file
17
system/modules/utils/npm/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.utils.npm;
|
||||
in {
|
||||
options = {
|
||||
modules.utils.npm.enable = mkEnableOption "Enables npm";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.npm = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user