This commit is contained in:
2025-08-29 15:25:40 +02:00
parent 26440bfeee
commit f3821f0dfa
201 changed files with 2461 additions and 1546 deletions

View File

@@ -3,10 +3,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.neovim;
in {
in
{
imports = [
./plugins
./lsp.nix
@@ -22,9 +24,7 @@ in {
programs.neovim = {
enable = true;
extraLuaConfig =
/*
lua
*/
# lua
''
-- Use system clipboard
vim.opt.clipboard = "unnamedplus"

View File

@@ -2,9 +2,7 @@
config = {
programs.neovim = {
extraLuaConfig =
/*
lua
*/
# lua
''
-- Key mappings for various commands and navigation
vim.api.nvim_set_keymap("n", "<C-j>", "<C-e>", { noremap = true })

View File

@@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
# LSP and completions for injected langs
otter-nvim
@@ -8,9 +9,7 @@
plugin = nvim-lspconfig;
type = "lua";
config =
/*
lua
*/
# lua
''
local lspconfig = require("lspconfig")
@@ -56,9 +55,7 @@
plugin = ltex_extra-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
local ltex_extra = require("ltex_extra")
add_lsp(lspconfig.ltex, {
@@ -84,9 +81,7 @@
plugin = cmp-git;
type = "lua";
config =
/*
lua
*/
# lua
''
require("cmp_git").setup({})
'';
@@ -97,9 +92,7 @@
plugin = nvim-cmp;
type = "lua";
config =
/*
lua
*/
# lua
''
local cmp = require("cmp")

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = alpha-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
local alpha = require("alpha")
local dashboard = require("alpha.themes.dashboard")

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = nvim-autopairs;
type = "lua";
config =
/*
lua
*/
# lua
''
require("nvim-autopairs").setup({})
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = nvim-bqf;
type = "lua";
config =
/*
lua
*/
# lua
''
require("bqf").setup({})
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = bufferline-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("bufferline").setup({})
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = nvim-colorizer-lua;
type = "lua";
config =
/*
lua
*/
# lua
''
require("colorizer").setup({})
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = comment-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("Comment").setup({
opleader = {

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = conform-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("conform").setup({
default_format_opts = {

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = copilot-lua;
type = "lua";
config =
/*
lua
*/
# lua
''
require("copilot").setup({
panel = {

View File

@@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
vim-illuminate
];

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = fidget-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("fidget").setup({
progress = {

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = vim-fugitive;
type = "viml";
config =
/*
vim
*/
# vim
''
nmap <space>G :Git<CR>
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = gitsigns-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("gitsigns").setup({
signs = {

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = lualine-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("lualine").setup({
options = {

View File

@@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim = {
plugins = with pkgs.vimPlugins; [
none-ls-nvim
@@ -6,9 +7,7 @@
nvim-treesitter.withAllGrammars
];
extraConfig =
/*
lua
*/
# lua
''
-- Require necessary plugins
require("plenary")

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = oil-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("oil").setup({
buf_options = {

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = plenary-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("plenary").setup({})
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = range-highlight-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("range-highlight").setup({})
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = nvim-treesitter.withAllGrammars;
type = "lua";
config =
/*
lua
*/
# lua
''
require("nvim-treesitter.configs").setup({
highlight = {

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = nvim-web-devicons;
type = "lua";
config =
/*
lua
*/
# lua
''
require("nvim-web-devicons").setup({})
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = which-key-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("which-key").setup({})
'';

View File

@@ -3,21 +3,22 @@
config,
lib,
...
}: {
}:
{
programs.neovim = {
extraConfig =
lib.mkAfter # vim
''
function! SetCustomKeywords()
syn match Todo /TODO/
syn match Done /DONE/
syn match Start /START/
syn match End /END/
endfunction
autocmd Syntax * call SetCustomKeywords()
'';
''
function! SetCustomKeywords()
syn match Todo /TODO/
syn match Done /DONE/
syn match Start /START/
syn match End /END/
endfunction
autocmd Syntax * call SetCustomKeywords()
'';
plugins = with pkgs.vimPlugins; [
rust-vim
dart-vim-plugin
@@ -34,15 +35,11 @@
{
plugin = vimtex;
config = let
viewMethod =
if config.programs.zathura.enable
then "zathura"
else "general";
in
/*
vim
*/
config =
let
viewMethod = if config.programs.zathura.enable then "zathura" else "general";
in
# vim
''
let g:vimtex_view_method = '${viewMethod}'
"Don't open automatically