From 33ccc429322463f8db833d6e84de2539787901c6 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sat, 18 Jan 2025 19:26:51 -0700 Subject: [PATCH 01/76] Created tex language options --- modules/plugins/languages/default.nix | 23 +- modules/plugins/languages/tex.nix | 309 ++++++++++++++++++++++++++ 2 files changed, 321 insertions(+), 11 deletions(-) create mode 100644 modules/plugins/languages/tex.nix diff --git a/modules/plugins/languages/default.nix b/modules/plugins/languages/default.nix index 219e04fb..4f717309 100644 --- a/modules/plugins/languages/default.nix +++ b/modules/plugins/languages/default.nix @@ -5,41 +5,42 @@ in { ./asm.nix ./astro.nix ./bash.nix - ./dart.nix ./clang.nix + ./csharp.nix ./css.nix + ./dart.nix ./elixir.nix ./gleam.nix ./go.nix - ./hcl.nix - ./kotlin.nix - ./html.nix ./haskell.nix + ./hcl.nix + ./html.nix ./java.nix + ./julia.nix + ./kotlin.nix ./lua.nix ./markdown.nix ./nim.nix - ./vala.nix ./nix.nix + ./nu.nix ./ocaml.nix + ./odin.nix ./php.nix ./python.nix ./r.nix + ./ruby.nix ./rust.nix ./scala.nix ./sql.nix ./svelte.nix ./tailwind.nix ./terraform.nix + ./tex.nix ./ts.nix ./typst.nix - ./zig.nix - ./csharp.nix - ./julia.nix - ./nu.nix - ./odin.nix + ./vala.nix ./wgsl.nix - ./ruby.nix + ./zig.nix ]; options.vim.languages = { diff --git a/modules/plugins/languages/tex.nix b/modules/plugins/languages/tex.nix new file mode 100644 index 00000000..b98ea26e --- /dev/null +++ b/modules/plugins/languages/tex.nix @@ -0,0 +1,309 @@ +# TODO: +# - Add Texlab LSP settings: +# - chktex +# - diagnosticsDelay +# - diagnostics +# - symbols +# - formatterLineLength +# - bibtexFormatter +# - latexFormatter +# - latexindent +# - completion +# - inlayHints +# - experimental + +{ + config, + pkgs, + lib, + ... +}: +let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.modules) mkIf mkMerge listOf; + inherit (lib.types) package str bool; + inherit (lib.nvim.types) mkGrammarOption; + inherit (builtins) any attrValues; + + cfg = config.vim.languages.tex; +in +{ + options.vim.languages.tex = { + enable = mkEnableOption "Tex support"; + + # Treesitter options for latex and bibtex flavours of tex. + treesitter = { + latex = { + enable = mkEnableOption "Latex treesitter" // { + default = config.vim.languages.enableTreesitter; + }; + package = mkGrammarOption pkgs "latex"; + }; + bibtex = { + enable = mkEnableOption "Bibtex treesitter" // { + default = config.vim.languages.enableTreesitter; + }; + package = mkGrammarOption pkgs "bibtex"; + }; + }; + + # LSP options + # Because tex LSPs also including building/compiling tex, they have + # more options that are only specific to them and thus it makes + # more sense to group one into its own group of options. + # + # Each lsp group must have an enable option of its own. + lsp = { + texlab = { + enable = mkEnableOption "Tex LSP support (texlab)" // { + default = config.vim.languages.enableLSP; + }; + + package = mkOption { + type = package; + default = pkgs.texlab; + description = "texlab package"; + }; + + build = { + package = mkOption { + type = package; + default = pkgs.tectonic; + description = "build/compiler package"; + }; + executable = mkOption { + type = str; + default = "tectonic"; + description = "The executable name from the build package that will be used to build/compile the tex."; + }; + args = mkOption { + type = listOf str; + default = [ + "-X" + "compile" + "%f" + "--synctex" + "--keep-logs" + "--keep-intermediates" + ]; + description = '' + Defines additional arguments that are passed to the configured LaTeX build tool. + Note that flags and their arguments need to be separate elements in this array. + To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. + The placeholder `%f` will be replaced by the server. + + Placeholders: + - `%f`: The path of the TeX file to compile. + ''; + }; + forwardSearchAfter = mkOption { + type = bool; + default = false; + description = "Set this property to true if you want to execute a forward search after a build."; + }; + onSave = mkOption { + type = bool; + default = false; + description = "Set this property to true if you want to compile the project after saving a file."; + }; + useFileList = mkOption { + type = bool; + default = false; + description = '' + When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. + + Note that enabling this property might have an impact on performance. + ''; + }; + auxDirectory = mkOption { + type = str; + default = "."; + description = '' + When not using latexmk, provides a way to define the directory containing the .aux files. + Note that you need to set the aux directory in latex.build.args too. + + When using a latexmkrc file, texlab will automatically infer the correct setting. + ''; + }; + logDirectory = mkOption { + type = str; + default = "."; + description = '' + When not using latexmk, provides a way to define the directory containing the build log files. + Note that you need to change the output directory in your build arguments too. + + When using a latexmkrc file, texlab will automatically infer the correct setting. + ''; + }; + pdfDirectory = mkOption { + type = str; + default = "."; + description = '' + When not using latexmk, provides a way to define the directory containing the output files. + Note that you need to set the output directory in latex.build.args too. + + When using a latexmkrc file, texlab will automatically infer the correct setting. + ''; + }; + filename = mkOption { + type = str; + default = null; + description = '' + Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. + ''; + }; + }; + + forwardSearch = { + enable = mkOption { + type = bool; + default = false; + example = true; + description = '' + Whether to enable forward search. + + Enable this option if you want to have the compiled document appear in your chosen PDF viewer. + + For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). + Note this is not all the options, but can act as a guide to help you allong with custom configs. + ''; + }; + package = mkOption { + type = package; + default = pkgs.okular; + description = '' + The package to use as your PDF viewer. + This viewer needs to support Synctex. + ''; + }; + executable = mkOption { + type = str; + default = "okular"; + description = '' + Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. + ''; + }; + args = mkOption { + type = listOf str; + default = [ + "--unique" + "file:%p#src:%l%f" + ]; + description = '' + Defines additional arguments that are passed to the configured previewer to perform the forward search. + The placeholders %f, %p, %l will be replaced by the server. + + Placeholders: + - %f: The path of the current TeX file. + - %p: The path of the current PDF file. + - %l: The current line number. + ''; + }; + + }; + + extraLuaSettings = mkOption { + type = str; + default = ""; + example = '' + formatterLineLength = 80, + ''; + description = '' + For any options that do not have options provided through nvf this can be used to add them. + Options already declared in nvf config will NOT be overridden. + + Options will be placed in: + ``` + lspconfig.texlab.setup { + settings = { + texlab = { + ... + + ... + + } + } + } + ``` + ''; + }; + }; + + # Add other LSPs here + + }; + }; + + config = mkIf cfg.enable (mkMerge [ + + # Treesitter + (mkIf cfg.treesitter.latex.enable { + vim.treesitter.enable = true; + vim.treesitter.grammars = [ cfg.treesitter.latex.package ]; + }) + (mkIf cfg.treesitter.bibtex.enable { + vim.treesitter.enable = true; + vim.treesitter.grammars = [ cfg.treesitter.bibtex.package ]; + }) + + # LSP + (mkIf (any (x: x.enable) (attrValues cfg.lsp)) ( + { + vim.lsp.lspconfig.enable = true; # Enable lspconfig when any of the lsps are enabled + } + // (mkMerge [ + + # Texlab + ( + let + tl = cfg.lsp.texlab; + build = tl.build; + listToLua = + list: nullOnEmpty: + let + inherit (builtins) + length + concatStringsSep + map + toString + ; + in + if length list == 0 then + if nullOnEmpty then "null" else "{ }" + else + "{ ${concatStringsSep ", " (map (x: ''"${toString x}"'') list)} }"; + in + (mkIf tl.enable { + vim.lsp.lspconfig.sources.texlab = '' + lspconfig.texlab.setup { + settings = { + texlab = { + build = { + executable = "${build.package}/bin/${build.executable}", + args = ${listToLua build.args false}, + forwardSearchAfter = ${build.forwardSearchAfter}, + onSave = ${build.onSave}, + useFileList = ${build.useFileList}, + auxDirectory = "${build.auxDirectroy}", + logDirectory = "${build.logDirectroy}", + pdfDirectory = "${build.pdfDirectroy}", + ${if build.filename != null then ''filename = "${build.filename}",'' else ""} + }, + forwardSearch = { + executable = "${tl.forwardSearch.package}/bin/${tl.forwardSearch.executable}", + args = ${listToLua tl.forwardSearch.args true} + }, + ${tl.extraLuaSettings} + } + } + } + ''; + }) + ) + + # Add other LSPs here + ]) + )) + + ]); +} From 9cded6f6c2a51f914448a58f43d12dc1cca8f3a7 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sat, 18 Jan 2025 19:56:41 -0700 Subject: [PATCH 02/76] Fix import on the wrong line --- modules/plugins/languages/tex.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/plugins/languages/tex.nix b/modules/plugins/languages/tex.nix index b98ea26e..dd0f7910 100644 --- a/modules/plugins/languages/tex.nix +++ b/modules/plugins/languages/tex.nix @@ -20,8 +20,8 @@ }: let inherit (lib.options) mkEnableOption mkOption; - inherit (lib.modules) mkIf mkMerge listOf; - inherit (lib.types) package str bool; + inherit (lib.modules) mkIf mkMerge; + inherit (lib.types) package str bool listOf; inherit (lib.nvim.types) mkGrammarOption; inherit (builtins) any attrValues; From a504d8ef37969109d199d09a530ba07472241c1a Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sat, 18 Jan 2025 20:01:08 -0700 Subject: [PATCH 03/76] Added toString functions on Texlab LSP source booleans and other mapped values --- modules/plugins/languages/tex.nix | 33 +++++++++++++++++-------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/modules/plugins/languages/tex.nix b/modules/plugins/languages/tex.nix index dd0f7910..90363bd8 100644 --- a/modules/plugins/languages/tex.nix +++ b/modules/plugins/languages/tex.nix @@ -21,7 +21,12 @@ let inherit (lib.options) mkEnableOption mkOption; inherit (lib.modules) mkIf mkMerge; - inherit (lib.types) package str bool listOf; + inherit (lib.types) + package + str + bool + listOf + ; inherit (lib.nvim.types) mkGrammarOption; inherit (builtins) any attrValues; @@ -256,18 +261,16 @@ in # Texlab ( let + inherit (builtins) + length + concatStringsSep + map + toString + ; tl = cfg.lsp.texlab; build = tl.build; listToLua = list: nullOnEmpty: - let - inherit (builtins) - length - concatStringsSep - map - toString - ; - in if length list == 0 then if nullOnEmpty then "null" else "{ }" else @@ -281,12 +284,12 @@ in build = { executable = "${build.package}/bin/${build.executable}", args = ${listToLua build.args false}, - forwardSearchAfter = ${build.forwardSearchAfter}, - onSave = ${build.onSave}, - useFileList = ${build.useFileList}, - auxDirectory = "${build.auxDirectroy}", - logDirectory = "${build.logDirectroy}", - pdfDirectory = "${build.pdfDirectroy}", + forwardSearchAfter = ${toString build.forwardSearchAfter}, + onSave = ${toString build.onSave}, + useFileList = ${toString build.useFileList}, + auxDirectory = "${toString build.auxDirectroy}", + logDirectory = "${toString build.logDirectroy}", + pdfDirectory = "${toString build.pdfDirectroy}", ${if build.filename != null then ''filename = "${build.filename}",'' else ""} }, forwardSearch = { From 97b4dd88ef6a267fc526cde87277c8263b1d930e Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sat, 18 Jan 2025 20:03:40 -0700 Subject: [PATCH 04/76] Fixed typo --- modules/plugins/languages/tex.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/plugins/languages/tex.nix b/modules/plugins/languages/tex.nix index 90363bd8..80b7b7de 100644 --- a/modules/plugins/languages/tex.nix +++ b/modules/plugins/languages/tex.nix @@ -287,9 +287,9 @@ in forwardSearchAfter = ${toString build.forwardSearchAfter}, onSave = ${toString build.onSave}, useFileList = ${toString build.useFileList}, - auxDirectory = "${toString build.auxDirectroy}", - logDirectory = "${toString build.logDirectroy}", - pdfDirectory = "${toString build.pdfDirectroy}", + auxDirectory = "${toString build.auxDirectory}", + logDirectory = "${toString build.logDirectory}", + pdfDirectory = "${toString build.pdfDirectory}", ${if build.filename != null then ''filename = "${build.filename}",'' else ""} }, forwardSearch = { From 23f2b22ae7ce9e0d7dca23061a81c8ad7dded107 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sat, 18 Jan 2025 20:11:32 -0700 Subject: [PATCH 05/76] Created function to simplify converting a string into lua format and removed null default values --- modules/plugins/languages/tex.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/plugins/languages/tex.nix b/modules/plugins/languages/tex.nix index 80b7b7de..409551a6 100644 --- a/modules/plugins/languages/tex.nix +++ b/modules/plugins/languages/tex.nix @@ -152,7 +152,7 @@ in }; filename = mkOption { type = str; - default = null; + default = ""; description = '' Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. ''; @@ -269,12 +269,16 @@ in ; tl = cfg.lsp.texlab; build = tl.build; + listToLua = list: nullOnEmpty: if length list == 0 then if nullOnEmpty then "null" else "{ }" else "{ ${concatStringsSep ", " (map (x: ''"${toString x}"'') list)} }"; + + stringToLua = + string: nullOnEmpty: if string == "" then if nullOnEmpty then "null" else "" else ''"${string}"''; in (mkIf tl.enable { vim.lsp.lspconfig.sources.texlab = '' @@ -287,9 +291,9 @@ in forwardSearchAfter = ${toString build.forwardSearchAfter}, onSave = ${toString build.onSave}, useFileList = ${toString build.useFileList}, - auxDirectory = "${toString build.auxDirectory}", - logDirectory = "${toString build.logDirectory}", - pdfDirectory = "${toString build.pdfDirectory}", + auxDirectory = ${stringToLua build.auxDirectory true}, + logDirectory = ${stringToLua build.logDirectory true}, + pdfDirectory = ${stringToLua build.pdfDirectory true}, ${if build.filename != null then ''filename = "${build.filename}",'' else ""} }, forwardSearch = { From 7744a1a97fcf4c8d3563e76ad6a9606833b3c53d Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sat, 18 Jan 2025 20:20:56 -0700 Subject: [PATCH 06/76] Fixed weird nix boolean toString implementation --- modules/plugins/languages/tex.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/plugins/languages/tex.nix b/modules/plugins/languages/tex.nix index 409551a6..f09c02d4 100644 --- a/modules/plugins/languages/tex.nix +++ b/modules/plugins/languages/tex.nix @@ -279,6 +279,9 @@ in stringToLua = string: nullOnEmpty: if string == "" then if nullOnEmpty then "null" else "" else ''"${string}"''; + + boolToLua = + boolean: if boolean then "true" else "false"; in (mkIf tl.enable { vim.lsp.lspconfig.sources.texlab = '' @@ -288,9 +291,9 @@ in build = { executable = "${build.package}/bin/${build.executable}", args = ${listToLua build.args false}, - forwardSearchAfter = ${toString build.forwardSearchAfter}, - onSave = ${toString build.onSave}, - useFileList = ${toString build.useFileList}, + forwardSearchAfter = ${boolToLua build.forwardSearchAfter}, + onSave = ${boolToLua build.onSave}, + useFileList = ${boolToLua build.useFileList}, auxDirectory = ${stringToLua build.auxDirectory true}, logDirectory = ${stringToLua build.logDirectory true}, pdfDirectory = ${stringToLua build.pdfDirectory true}, From 9811174419b780feebc30ff3c5f26bc3ec19888e Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sat, 18 Jan 2025 20:30:55 -0700 Subject: [PATCH 07/76] Changed texlab lsp config build.filename to use stringToLua function --- modules/plugins/languages/tex.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/languages/tex.nix b/modules/plugins/languages/tex.nix index f09c02d4..48e3357a 100644 --- a/modules/plugins/languages/tex.nix +++ b/modules/plugins/languages/tex.nix @@ -297,7 +297,7 @@ in auxDirectory = ${stringToLua build.auxDirectory true}, logDirectory = ${stringToLua build.logDirectory true}, pdfDirectory = ${stringToLua build.pdfDirectory true}, - ${if build.filename != null then ''filename = "${build.filename}",'' else ""} + filename = ${stringToLua build.filename true}, }, forwardSearch = { executable = "${tl.forwardSearch.package}/bin/${tl.forwardSearch.executable}", From 38977641b57e7f282bb2bca8e9d67b8f460a6641 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sat, 18 Jan 2025 21:03:43 -0700 Subject: [PATCH 08/76] Added tex to the languages list --- docs/manual/configuring/languages.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/manual/configuring/languages.md b/docs/manual/configuring/languages.md index 74714365..ec722dfc 100644 --- a/docs/manual/configuring/languages.md +++ b/docs/manual/configuring/languages.md @@ -19,6 +19,7 @@ formatting to diagnostics. The following languages have sections under the - Go: [vim.languages.go.enable](#opt-vim.languages.go.enable) - Lua: [vim.languages.lua.enable](#opt-vim.languages.lua.enable) - PHP: [vim.languages.php.enable](#opt-vim.languages.php.enable) +- Tex: [vim.languages.tex.enable](#opt-vim.languages.tex.enable) Adding support for more languages, and improving support for existing ones are great places where you can contribute with a PR. From 5883c0936654c694f525de29dc76bbd38a6f76e8 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sun, 19 Jan 2025 11:06:22 -0700 Subject: [PATCH 09/76] Fixed texlab needing to be installed globally to be able to use the lsp --- modules/plugins/languages/tex.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/plugins/languages/tex.nix b/modules/plugins/languages/tex.nix index 48e3357a..57b3be97 100644 --- a/modules/plugins/languages/tex.nix +++ b/modules/plugins/languages/tex.nix @@ -280,12 +280,12 @@ in stringToLua = string: nullOnEmpty: if string == "" then if nullOnEmpty then "null" else "" else ''"${string}"''; - boolToLua = - boolean: if boolean then "true" else "false"; + boolToLua = boolean: if boolean then "true" else "false"; in (mkIf tl.enable { vim.lsp.lspconfig.sources.texlab = '' lspconfig.texlab.setup { + cmd = { "${tl.package}/bin/texlab" }, settings = { texlab = { build = { From c19142091270b8e734fa09763978e6f6670aa61e Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sun, 19 Jan 2025 15:54:54 -0700 Subject: [PATCH 10/76] Added support for setting the g:tex_flavor option --- modules/plugins/languages/tex.nix | 65 ++++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 13 deletions(-) diff --git a/modules/plugins/languages/tex.nix b/modules/plugins/languages/tex.nix index 57b3be97..9b611c99 100644 --- a/modules/plugins/languages/tex.nix +++ b/modules/plugins/languages/tex.nix @@ -11,7 +11,6 @@ # - completion # - inlayHints # - experimental - { config, pkgs, @@ -22,13 +21,20 @@ let inherit (lib.options) mkEnableOption mkOption; inherit (lib.modules) mkIf mkMerge; inherit (lib.types) - package - str bool listOf + package + str ; inherit (lib.nvim.types) mkGrammarOption; - inherit (builtins) any attrValues; + inherit (builtins) + any + attrValues + concatStringsSep + length + map + toString + ; cfg = config.vim.languages.tex; in @@ -204,7 +210,6 @@ in - %l: The current line number. ''; }; - }; extraLuaSettings = mkOption { @@ -235,12 +240,49 @@ in }; # Add other LSPs here + }; + extraOpts = { + texFlavor = { + enable = mkOption { + type = bool; + default = false; + example = true; + description = '' + Whether to set the vim.g.tex_flavor (g:tex_flavor) option in your lua config. + + When opening a .tex file vim will try to automatically try to determine the file type from + the three options: plaintex (for plain TeX), context (for ConTeXt), or tex (for LaTeX). + This can either be done by a indicator line of the form `%&` on the first line or + if absent vim will search the file for keywords to try and determine the filetype. + If no filetype can be determined automatically then by default it will fallback to plaintex. + + This option will enable setting the tex flavor in your lua config and you can set its value + useing the `vim.languages.tex.lsp.extraOpts.texFlavor.flavor = ` in your nvf config. + + Setting this option to `false` will omit the `vim.g.tex_flavor = ` line from your lua + config entirely (unless you manually set it elsewhere of course). + ''; + }; + flavor = mkOption { + type = str; + default = "plaintex"; + example = "tex"; + description = '' + The flavor to set as a fallback for when vim cannot automatically determine the tex flavor when + opening a .tex document. + + The options are: plaintex (for plain TeX), context (for ConTeXt), or tex (for LaTeX). + + This can be particularly useful for when using `vim.utility.new-file-template` options for + creating templates when no context has yet been added to a new file. + ''; + }; + }; }; }; config = mkIf cfg.enable (mkMerge [ - # Treesitter (mkIf cfg.treesitter.latex.enable { vim.treesitter.enable = true; @@ -257,16 +299,9 @@ in vim.lsp.lspconfig.enable = true; # Enable lspconfig when any of the lsps are enabled } // (mkMerge [ - # Texlab ( let - inherit (builtins) - length - concatStringsSep - map - toString - ; tl = cfg.lsp.texlab; build = tl.build; @@ -315,5 +350,9 @@ in ]) )) + # Extra Lua config options + (mkIf cfg.extraOpts.texFlavor.enable { + vim.globals.tex_flavor = "${cfg.extraOpts.texFlavor.flavor}"; + }) ]); } From fb0ddb338ea2c5cce8633e57c9268adde2b667ca Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sun, 19 Jan 2025 16:05:26 -0700 Subject: [PATCH 11/76] Switched to Alejandra formatting style --- modules/plugins/languages/tex.nix | 63 ++++++++++++++++--------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/modules/plugins/languages/tex.nix b/modules/plugins/languages/tex.nix index 9b611c99..6fb6e845 100644 --- a/modules/plugins/languages/tex.nix +++ b/modules/plugins/languages/tex.nix @@ -16,18 +16,19 @@ pkgs, lib, ... -}: -let +}: let inherit (lib.options) mkEnableOption mkOption; inherit (lib.modules) mkIf mkMerge; - inherit (lib.types) + inherit + (lib.types) bool listOf package str ; inherit (lib.nvim.types) mkGrammarOption; - inherit (builtins) + inherit + (builtins) any attrValues concatStringsSep @@ -37,23 +38,18 @@ let ; cfg = config.vim.languages.tex; -in -{ +in { options.vim.languages.tex = { enable = mkEnableOption "Tex support"; # Treesitter options for latex and bibtex flavours of tex. treesitter = { latex = { - enable = mkEnableOption "Latex treesitter" // { - default = config.vim.languages.enableTreesitter; - }; + enable = mkEnableOption "Latex treesitter" // { default = config.vim.languages.enableTreesitter; }; package = mkGrammarOption pkgs "latex"; }; bibtex = { - enable = mkEnableOption "Bibtex treesitter" // { - default = config.vim.languages.enableTreesitter; - }; + enable = mkEnableOption "Bibtex treesitter" // { default = config.vim.languages.enableTreesitter; }; package = mkGrammarOption pkgs "bibtex"; }; }; @@ -66,9 +62,7 @@ in # Each lsp group must have an enable option of its own. lsp = { texlab = { - enable = mkEnableOption "Tex LSP support (texlab)" // { - default = config.vim.languages.enableLSP; - }; + enable = mkEnableOption "Tex LSP support (texlab)" // { default = config.vim.languages.enableLSP; }; package = mkOption { type = package; @@ -286,18 +280,16 @@ in # Treesitter (mkIf cfg.treesitter.latex.enable { vim.treesitter.enable = true; - vim.treesitter.grammars = [ cfg.treesitter.latex.package ]; + vim.treesitter.grammars = [cfg.treesitter.latex.package]; }) (mkIf cfg.treesitter.bibtex.enable { vim.treesitter.enable = true; - vim.treesitter.grammars = [ cfg.treesitter.bibtex.package ]; + vim.treesitter.grammars = [cfg.treesitter.bibtex.package]; }) # LSP (mkIf (any (x: x.enable) (attrValues cfg.lsp)) ( - { - vim.lsp.lspconfig.enable = true; # Enable lspconfig when any of the lsps are enabled - } + { vim.lsp.lspconfig.enable = true; } # Enable lspconfig when any of the lsps are enabled // (mkMerge [ # Texlab ( @@ -305,19 +297,28 @@ in tl = cfg.lsp.texlab; build = tl.build; - listToLua = - list: nullOnEmpty: - if length list == 0 then - if nullOnEmpty then "null" else "{ }" - else - "{ ${concatStringsSep ", " (map (x: ''"${toString x}"'') list)} }"; + listToLua = list: nullOnEmpty: + if length list == 0 + then + if nullOnEmpty + then "null" + else "{ }" + else "{ ${concatStringsSep ", " (map (x: ''"${toString x}"'') list)} }"; - stringToLua = - string: nullOnEmpty: if string == "" then if nullOnEmpty then "null" else "" else ''"${string}"''; + stringToLua = string: nullOnEmpty: + if string == "" + then + if nullOnEmpty + then "null" + else "" + else ''"${string}"''; - boolToLua = boolean: if boolean then "true" else "false"; - in - (mkIf tl.enable { + boolToLua = boolean: + if boolean + then "true" + else "false"; + + in (mkIf tl.enable { vim.lsp.lspconfig.sources.texlab = '' lspconfig.texlab.setup { cmd = { "${tl.package}/bin/texlab" }, From cd0527139376212b484cfdcd3448afc3e184d451 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Tue, 21 Jan 2025 20:42:05 -0700 Subject: [PATCH 12/76] Tex templates were broken in the current version of the new-file-templates.nvim dependency so created fork to fix it and redirected flake url there --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 02ceb667..dc5eeef5 100644 --- a/flake.nix +++ b/flake.nix @@ -736,7 +736,7 @@ plugin-new-file-template-nvim = { # (required by new-file-template.nvim) - url = "github:otavioschwanck/new-file-template.nvim"; + url = "github:isaacST08/new-file-template.nvim"; flake = false; }; From 9357bde934d07236237df850aeebd58f7a54ce79 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 23 Jan 2025 15:37:45 -0700 Subject: [PATCH 13/76] Added texlab tectonic options --- modules/plugins/languages/tex.nix | 346 ++++++++++++++++++++++++++---- 1 file changed, 303 insertions(+), 43 deletions(-) diff --git a/modules/plugins/languages/tex.nix b/modules/plugins/languages/tex.nix index 6fb6e845..e39a4be3 100644 --- a/modules/plugins/languages/tex.nix +++ b/modules/plugins/languages/tex.nix @@ -22,7 +22,11 @@ inherit (lib.types) bool + either + enum + ints listOf + oneOf package str ; @@ -30,14 +34,113 @@ inherit (builtins) any + attrNames attrValues + concatLists concatStringsSep + elem + elemAt + filter + hasAttr + isAttrs length map + throw toString ; cfg = config.vim.languages.tex; + + # --- Enable Options --- + mkEnableDefaultOption = default: description: (mkOption { + type = bool; + default = default; + example = !default; + description = description; + }); + mkEnableTreesitterOption = mkEnableDefaultOption config.vim.languages.enableTreesitter; + mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; + + # --- Arg Collation Functions -- + collateArgs.lsp.texlab.build = { + tectonic = buildConfig: let + selfConfig = buildConfig.tectonic; + in ( + # Base args + [ + "-X" + "compile" + "%f" + ] + # Flags + ++ ( + if selfConfig.keepIntermediates + then ["--keep-intermediates"] + else [] + ) + ++ ( + if selfConfig.keepLogs + then ["--keep-logs"] + else [] + ) + ++ ( + if selfConfig.onlyCached + then ["--only-cached"] + else [] + ) + ++ ( + if selfConfig.synctex + then ["--synctex"] + else [] + ) + ++ ( + if selfConfig.untrustedInput + then ["--untrusted"] + else [] + ) + # Options + ++ ( + if selfConfig.reruns > 0 + then ["--reruns" "${toString selfConfig.reruns}"] + else [] + ) + ++ ( + if selfConfig.bundle != "" + then ["--bundle" "${toString selfConfig.bundle}"] + else [] + ) + ++ ( + if selfConfig.webBundle != "" + then ["--web-bundle" "${toString selfConfig.webBundle}"] + else [] + ) + ++ ( + if selfConfig.outfmt != "" + then ["--outfmt" "${toString selfConfig.outfmt}"] + else [] + ) + ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) + ++ ( + if selfConfig.format != "" + then ["--format" "${toString selfConfig.format}"] + else [] + ) + ++ ( + if selfConfig.color != "" + then ["--color" "${toString selfConfig.color}"] + else [] + ) + # Still options but these are not defined by builder specific options but + # instead synchronize options between the global build options and builder + # specific options + ++ ( + if !(elem buildConfig.pdfDirectory ["." ""]) + then ["--outdir" "${buildConfig.pdfDirectory}"] + else [] + ) + ); + custom = buildConfig: buildConfig.custom.args; + }; in { options.vim.languages.tex = { enable = mkEnableOption "Tex support"; @@ -45,11 +148,11 @@ in { # Treesitter options for latex and bibtex flavours of tex. treesitter = { latex = { - enable = mkEnableOption "Latex treesitter" // { default = config.vim.languages.enableTreesitter; }; + enable = mkEnableTreesitterOption "Whether to enable Latex treesitter"; package = mkGrammarOption pkgs "latex"; }; bibtex = { - enable = mkEnableOption "Bibtex treesitter" // { default = config.vim.languages.enableTreesitter; }; + enable = mkEnableTreesitterOption "Whether to enable Bibtex treesitter"; package = mkGrammarOption pkgs "bibtex"; }; }; @@ -62,7 +165,7 @@ in { # Each lsp group must have an enable option of its own. lsp = { texlab = { - enable = mkEnableOption "Tex LSP support (texlab)" // { default = config.vim.languages.enableLSP; }; + enable = mkEnableLspOption "Whether to enable Tex LSP support (texlab)"; package = mkOption { type = package; @@ -71,36 +174,141 @@ in { }; build = { - package = mkOption { - type = package; - default = pkgs.tectonic; - description = "build/compiler package"; - }; - executable = mkOption { - type = str; - default = "tectonic"; - description = "The executable name from the build package that will be used to build/compile the tex."; - }; - args = mkOption { - type = listOf str; - default = [ - "-X" - "compile" - "%f" - "--synctex" - "--keep-logs" - "--keep-intermediates" - ]; - description = '' - Defines additional arguments that are passed to the configured LaTeX build tool. - Note that flags and their arguments need to be separate elements in this array. - To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. - The placeholder `%f` will be replaced by the server. + tectonic = { + enable = mkEnableDefaultOption true "Whether to enable Tex Compilation Via Tectonic"; - Placeholders: - - `%f`: The path of the TeX file to compile. + package = mkOption { + type = package; + default = pkgs.tectonic; + description = "tectonic package"; + }; + + executable = mkOption { + type = str; + default = "tectonic"; + description = "The executable name from the build package that will be used to build/compile the tex."; + }; + + # -- Flags -- + keepIntermediates = mkEnableDefaultOption false '' + Keep the intermediate files generated during processing. + + If texlab is reporting build errors when there shouldn't be, disable this option. ''; + keepLogs = mkEnableDefaultOption true '' + Keep the log files generated during processing. + + Without the keepLogs flag, texlab won't be able to report compilation warnings. + ''; + onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; + synctex = mkEnableDefaultOption true "Generate SyncTeX data"; + untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; + + # -- Options -- + reruns = mkOption { + type = ints.unsigned; + default = 0; + example = 2; + description = "Rerun the TeX engine exactly this many times after the first"; + }; + + bundle = mkOption { + type = str; + default = ""; + description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; + }; + + webBundle = mkOption { + type = str; + default = ""; + description = "Use this URL to find resource files instead of the default"; + }; + + outfmt = mkOption { + type = enum [ + "pdf" + "html" + "xdv" + "aux" + "fmt" + "" + ]; + default = ""; + description = "The kind of output to generate"; + }; + + hidePaths = mkOption { + type = listOf str; + default = []; + example = [ + "./secrets.tex" + "./passwords.tex" + ]; + description = "Tell the engine that no file at exists, if it tries to read it."; + }; + + format = mkOption { + type = str; + default = ""; + description = "The name of the \"format\" file used to initialize the TeX engine"; + }; + + color = mkOption { + type = enum [ + "always" + "auto" + "never" + "" + ]; + default = ""; + example = "always"; + description = "Enable/disable colorful log output"; + }; + + extraOptions = { + type = listOf str; + default = []; + description = '' + Add extra command line options to include in the tectonic build command. + Extra options added here will not overwrite the options set in as nvf options. + ''; + }; }; + + custom = { + enable = mkEnableDefaultOption false "Whether to enable using a custom build package"; + package = mkOption { + type = package; + default = pkgs.tectonic; + description = "build/compiler package"; + }; + executable = mkOption { + type = str; + default = "tectonic"; + description = "The executable name from the build package that will be used to build/compile the tex."; + }; + args = mkOption { + type = listOf str; + default = [ + "-X" + "compile" + "%f" + "--synctex" + "--keep-logs" + "--keep-intermediates" + ]; + description = '' + Defines additional arguments that are passed to the configured LaTeX build tool. + Note that flags and their arguments need to be separate elements in this array. + To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. + The placeholder `%f` will be replaced by the server. + + Placeholders: + - `%f`: The path of the TeX file to compile. + ''; + }; + }; + forwardSearchAfter = mkOption { type = bool; default = false; @@ -289,9 +497,11 @@ in { # LSP (mkIf (any (x: x.enable) (attrValues cfg.lsp)) ( - { vim.lsp.lspconfig.enable = true; } # Enable lspconfig when any of the lsps are enabled + { + vim.lsp.lspconfig.enable = true; + } # Enable lspconfig when any of the lsps are enabled // (mkMerge [ - # Texlab + # ----- Texlab ----- ( let tl = cfg.lsp.texlab; @@ -318,23 +528,73 @@ in { then "true" else "false"; + # -- Build -- + buildConfig = let + # This function will sort through the builder options of ...texlab.build and count how many + # builders have been enabled and get the attrs of the last enabled builder. + getBuilder = { + enabledBuildersCount ? 0, + enabledBuilderName ? "", + index ? 0, + builderNamesList ? ( + filter ( + x: let + y = tl.build.${x}; + in (isAttrs y && hasAttr "enable" y) + ) (attrNames tl.build) + ), + }: let + currentBuilderName = elemAt builderNamesList index; + currentBuilder = tl.build.${currentBuilderName}; + nextIndex = index + 1; + currentState = { + enabledBuildersCount = + if currentBuilder.enable + then enabledBuildersCount + 1 + else enabledBuildersCount; + enabledBuilderName = + if currentBuilder.enable + then currentBuilderName + else enabledBuilderName; + }; + in + if length builderNamesList > nextIndex + then + getBuilder ({ + inherit builderNamesList; + index = nextIndex; + } + // currentState) + else currentState; + + getBuilderResults = getBuilder {}; + builder = tl.build.${getBuilderResults.enabledBuilderName}; + builderArgs = collateArgs.lsp.texlab.build.${getBuilderResults.enabledBuilderName} tl.build; + in + if getBuilderResults.enabledBuildersCount == 0 + then "" + else if getBuilderResults.enabledBuildersCount > 1 + then throw "Texlab does not support having more than 1 builders enabled!" + else '' + build = { + executable = "${builder.package}/bin/${builder.executable}", + args = ${listToLua builderArgs false}, + forwardSearchAfter = ${boolToLua build.forwardSearchAfter}, + onSave = ${boolToLua build.onSave}, + useFileList = ${boolToLua build.useFileList}, + auxDirectory = ${stringToLua build.auxDirectory true}, + logDirectory = ${stringToLua build.logDirectory true}, + pdfDirectory = ${stringToLua build.pdfDirectory true}, + filename = ${stringToLua build.filename true}, + }, + ''; in (mkIf tl.enable { vim.lsp.lspconfig.sources.texlab = '' lspconfig.texlab.setup { cmd = { "${tl.package}/bin/texlab" }, settings = { texlab = { - build = { - executable = "${build.package}/bin/${build.executable}", - args = ${listToLua build.args false}, - forwardSearchAfter = ${boolToLua build.forwardSearchAfter}, - onSave = ${boolToLua build.onSave}, - useFileList = ${boolToLua build.useFileList}, - auxDirectory = ${stringToLua build.auxDirectory true}, - logDirectory = ${stringToLua build.logDirectory true}, - pdfDirectory = ${stringToLua build.pdfDirectory true}, - filename = ${stringToLua build.filename true}, - }, + ${buildConfig} forwardSearch = { executable = "${tl.forwardSearch.package}/bin/${tl.forwardSearch.executable}", args = ${listToLua tl.forwardSearch.args true} From 1f08c4eda7608b182512222dbacccf665595ef8a Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 23 Jan 2025 16:08:31 -0700 Subject: [PATCH 14/76] Starting modularizing tex.nix into smaller sections --- modules/plugins/languages/default.nix | 2 +- .../languages/{tex.nix => tex/default.nix} | 45 ++++++++++--------- modules/plugins/languages/tex/treesitter.nix | 39 ++++++++++++++++ 3 files changed, 65 insertions(+), 21 deletions(-) rename modules/plugins/languages/{tex.nix => tex/default.nix} (96%) create mode 100644 modules/plugins/languages/tex/treesitter.nix diff --git a/modules/plugins/languages/default.nix b/modules/plugins/languages/default.nix index 4f717309..5313ccba 100644 --- a/modules/plugins/languages/default.nix +++ b/modules/plugins/languages/default.nix @@ -35,7 +35,7 @@ in { ./svelte.nix ./tailwind.nix ./terraform.nix - ./tex.nix + ./tex ./ts.nix ./typst.nix ./vala.nix diff --git a/modules/plugins/languages/tex.nix b/modules/plugins/languages/tex/default.nix similarity index 96% rename from modules/plugins/languages/tex.nix rename to modules/plugins/languages/tex/default.nix index e39a4be3..54811783 100644 --- a/modules/plugins/languages/tex.nix +++ b/modules/plugins/languages/tex/default.nix @@ -142,20 +142,25 @@ custom = buildConfig: buildConfig.custom.args; }; in { + + imports = [ + ./treesitter.nix + ]; + options.vim.languages.tex = { enable = mkEnableOption "Tex support"; - # Treesitter options for latex and bibtex flavours of tex. - treesitter = { - latex = { - enable = mkEnableTreesitterOption "Whether to enable Latex treesitter"; - package = mkGrammarOption pkgs "latex"; - }; - bibtex = { - enable = mkEnableTreesitterOption "Whether to enable Bibtex treesitter"; - package = mkGrammarOption pkgs "bibtex"; - }; - }; + # # Treesitter options for latex and bibtex flavours of tex. + # treesitter = { + # latex = { + # enable = mkEnableTreesitterOption "Whether to enable Latex treesitter"; + # package = mkGrammarOption pkgs "latex"; + # }; + # bibtex = { + # enable = mkEnableTreesitterOption "Whether to enable Bibtex treesitter"; + # package = mkGrammarOption pkgs "bibtex"; + # }; + # }; # LSP options # Because tex LSPs also including building/compiling tex, they have @@ -485,15 +490,15 @@ in { }; config = mkIf cfg.enable (mkMerge [ - # Treesitter - (mkIf cfg.treesitter.latex.enable { - vim.treesitter.enable = true; - vim.treesitter.grammars = [cfg.treesitter.latex.package]; - }) - (mkIf cfg.treesitter.bibtex.enable { - vim.treesitter.enable = true; - vim.treesitter.grammars = [cfg.treesitter.bibtex.package]; - }) + # # Treesitter + # (mkIf cfg.treesitter.latex.enable { + # vim.treesitter.enable = true; + # vim.treesitter.grammars = [cfg.treesitter.latex.package]; + # }) + # (mkIf cfg.treesitter.bibtex.enable { + # vim.treesitter.enable = true; + # vim.treesitter.grammars = [cfg.treesitter.bibtex.package]; + # }) # LSP (mkIf (any (x: x.enable) (attrValues cfg.lsp)) ( diff --git a/modules/plugins/languages/tex/treesitter.nix b/modules/plugins/languages/tex/treesitter.nix new file mode 100644 index 00000000..3b70165e --- /dev/null +++ b/modules/plugins/languages/tex/treesitter.nix @@ -0,0 +1,39 @@ +{ + config, + pkgs, + lib, + ... +}: +let + inherit (lib.options) mkEnableOption; + inherit (lib.modules) mkIf mkMerge; + inherit (lib.nvim.types) mkGrammarOption; + + cfg = config.vim.languages.tex; + + mkEnableTreesitterOption = + description: mkEnableOption description // { default = config.vim.languages.enableTreesitter; }; +in +{ + options.vim.languages.tex.treesitter = { + latex = { + enable = mkEnableTreesitterOption "Whether to enable Latex treesitter"; + package = mkGrammarOption pkgs "latex"; + }; + bibtex = { + enable = mkEnableTreesitterOption "Whether to enable Bibtex treesitter"; + package = mkGrammarOption pkgs "bibtex"; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + (mkIf cfg.treesitter.latex.enable { + vim.treesitter.enable = true; + vim.treesitter.grammars = [ cfg.treesitter.latex.package ]; + }) + (mkIf cfg.treesitter.bibtex.enable { + vim.treesitter.enable = true; + vim.treesitter.grammars = [ cfg.treesitter.bibtex.package ]; + }) + ]); +} From c3291ab71c9052e55a8dd8e33f99bec4e5e3eaea Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 23 Jan 2025 16:34:57 -0700 Subject: [PATCH 15/76] Moved lsp config into its own module --- modules/plugins/languages/tex/default.nix | 965 +++++++++--------- modules/plugins/languages/tex/lsp/default.nix | 528 ++++++++++ 2 files changed, 1011 insertions(+), 482 deletions(-) create mode 100644 modules/plugins/languages/tex/lsp/default.nix diff --git a/modules/plugins/languages/tex/default.nix b/modules/plugins/languages/tex/default.nix index 54811783..116403d1 100644 --- a/modules/plugins/languages/tex/default.nix +++ b/modules/plugins/languages/tex/default.nix @@ -52,99 +52,100 @@ cfg = config.vim.languages.tex; # --- Enable Options --- - mkEnableDefaultOption = default: description: (mkOption { - type = bool; - default = default; - example = !default; - description = description; - }); - mkEnableTreesitterOption = mkEnableDefaultOption config.vim.languages.enableTreesitter; - mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; + # mkEnableDefaultOption = default: description: (mkOption { + # type = bool; + # default = default; + # example = !default; + # description = description; + # }); + # mkEnableTreesitterOption = mkEnableDefaultOption config.vim.languages.enableTreesitter; + # mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; - # --- Arg Collation Functions -- - collateArgs.lsp.texlab.build = { - tectonic = buildConfig: let - selfConfig = buildConfig.tectonic; - in ( - # Base args - [ - "-X" - "compile" - "%f" - ] - # Flags - ++ ( - if selfConfig.keepIntermediates - then ["--keep-intermediates"] - else [] - ) - ++ ( - if selfConfig.keepLogs - then ["--keep-logs"] - else [] - ) - ++ ( - if selfConfig.onlyCached - then ["--only-cached"] - else [] - ) - ++ ( - if selfConfig.synctex - then ["--synctex"] - else [] - ) - ++ ( - if selfConfig.untrustedInput - then ["--untrusted"] - else [] - ) - # Options - ++ ( - if selfConfig.reruns > 0 - then ["--reruns" "${toString selfConfig.reruns}"] - else [] - ) - ++ ( - if selfConfig.bundle != "" - then ["--bundle" "${toString selfConfig.bundle}"] - else [] - ) - ++ ( - if selfConfig.webBundle != "" - then ["--web-bundle" "${toString selfConfig.webBundle}"] - else [] - ) - ++ ( - if selfConfig.outfmt != "" - then ["--outfmt" "${toString selfConfig.outfmt}"] - else [] - ) - ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) - ++ ( - if selfConfig.format != "" - then ["--format" "${toString selfConfig.format}"] - else [] - ) - ++ ( - if selfConfig.color != "" - then ["--color" "${toString selfConfig.color}"] - else [] - ) - # Still options but these are not defined by builder specific options but - # instead synchronize options between the global build options and builder - # specific options - ++ ( - if !(elem buildConfig.pdfDirectory ["." ""]) - then ["--outdir" "${buildConfig.pdfDirectory}"] - else [] - ) - ); - custom = buildConfig: buildConfig.custom.args; - }; + # # --- Arg Collation Functions -- + # collateArgs.lsp.texlab.build = { + # tectonic = buildConfig: let + # selfConfig = buildConfig.tectonic; + # in ( + # # Base args + # [ + # "-X" + # "compile" + # "%f" + # ] + # # Flags + # ++ ( + # if selfConfig.keepIntermediates + # then ["--keep-intermediates"] + # else [] + # ) + # ++ ( + # if selfConfig.keepLogs + # then ["--keep-logs"] + # else [] + # ) + # ++ ( + # if selfConfig.onlyCached + # then ["--only-cached"] + # else [] + # ) + # ++ ( + # if selfConfig.synctex + # then ["--synctex"] + # else [] + # ) + # ++ ( + # if selfConfig.untrustedInput + # then ["--untrusted"] + # else [] + # ) + # # Options + # ++ ( + # if selfConfig.reruns > 0 + # then ["--reruns" "${toString selfConfig.reruns}"] + # else [] + # ) + # ++ ( + # if selfConfig.bundle != "" + # then ["--bundle" "${toString selfConfig.bundle}"] + # else [] + # ) + # ++ ( + # if selfConfig.webBundle != "" + # then ["--web-bundle" "${toString selfConfig.webBundle}"] + # else [] + # ) + # ++ ( + # if selfConfig.outfmt != "" + # then ["--outfmt" "${toString selfConfig.outfmt}"] + # else [] + # ) + # ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) + # ++ ( + # if selfConfig.format != "" + # then ["--format" "${toString selfConfig.format}"] + # else [] + # ) + # ++ ( + # if selfConfig.color != "" + # then ["--color" "${toString selfConfig.color}"] + # else [] + # ) + # # Still options but these are not defined by builder specific options but + # # instead synchronize options between the global build options and builder + # # specific options + # ++ ( + # if !(elem buildConfig.pdfDirectory ["." ""]) + # then ["--outdir" "${buildConfig.pdfDirectory}"] + # else [] + # ) + # ); + # custom = buildConfig: buildConfig.custom.args; + # }; in { imports = [ ./treesitter.nix + ./lsp ]; options.vim.languages.tex = { @@ -168,286 +169,286 @@ in { # more sense to group one into its own group of options. # # Each lsp group must have an enable option of its own. - lsp = { - texlab = { - enable = mkEnableLspOption "Whether to enable Tex LSP support (texlab)"; - - package = mkOption { - type = package; - default = pkgs.texlab; - description = "texlab package"; - }; - - build = { - tectonic = { - enable = mkEnableDefaultOption true "Whether to enable Tex Compilation Via Tectonic"; - - package = mkOption { - type = package; - default = pkgs.tectonic; - description = "tectonic package"; - }; - - executable = mkOption { - type = str; - default = "tectonic"; - description = "The executable name from the build package that will be used to build/compile the tex."; - }; - - # -- Flags -- - keepIntermediates = mkEnableDefaultOption false '' - Keep the intermediate files generated during processing. - - If texlab is reporting build errors when there shouldn't be, disable this option. - ''; - keepLogs = mkEnableDefaultOption true '' - Keep the log files generated during processing. - - Without the keepLogs flag, texlab won't be able to report compilation warnings. - ''; - onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; - synctex = mkEnableDefaultOption true "Generate SyncTeX data"; - untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; - - # -- Options -- - reruns = mkOption { - type = ints.unsigned; - default = 0; - example = 2; - description = "Rerun the TeX engine exactly this many times after the first"; - }; - - bundle = mkOption { - type = str; - default = ""; - description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; - }; - - webBundle = mkOption { - type = str; - default = ""; - description = "Use this URL to find resource files instead of the default"; - }; - - outfmt = mkOption { - type = enum [ - "pdf" - "html" - "xdv" - "aux" - "fmt" - "" - ]; - default = ""; - description = "The kind of output to generate"; - }; - - hidePaths = mkOption { - type = listOf str; - default = []; - example = [ - "./secrets.tex" - "./passwords.tex" - ]; - description = "Tell the engine that no file at exists, if it tries to read it."; - }; - - format = mkOption { - type = str; - default = ""; - description = "The name of the \"format\" file used to initialize the TeX engine"; - }; - - color = mkOption { - type = enum [ - "always" - "auto" - "never" - "" - ]; - default = ""; - example = "always"; - description = "Enable/disable colorful log output"; - }; - - extraOptions = { - type = listOf str; - default = []; - description = '' - Add extra command line options to include in the tectonic build command. - Extra options added here will not overwrite the options set in as nvf options. - ''; - }; - }; - - custom = { - enable = mkEnableDefaultOption false "Whether to enable using a custom build package"; - package = mkOption { - type = package; - default = pkgs.tectonic; - description = "build/compiler package"; - }; - executable = mkOption { - type = str; - default = "tectonic"; - description = "The executable name from the build package that will be used to build/compile the tex."; - }; - args = mkOption { - type = listOf str; - default = [ - "-X" - "compile" - "%f" - "--synctex" - "--keep-logs" - "--keep-intermediates" - ]; - description = '' - Defines additional arguments that are passed to the configured LaTeX build tool. - Note that flags and their arguments need to be separate elements in this array. - To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. - The placeholder `%f` will be replaced by the server. - - Placeholders: - - `%f`: The path of the TeX file to compile. - ''; - }; - }; - - forwardSearchAfter = mkOption { - type = bool; - default = false; - description = "Set this property to true if you want to execute a forward search after a build."; - }; - onSave = mkOption { - type = bool; - default = false; - description = "Set this property to true if you want to compile the project after saving a file."; - }; - useFileList = mkOption { - type = bool; - default = false; - description = '' - When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. - - Note that enabling this property might have an impact on performance. - ''; - }; - auxDirectory = mkOption { - type = str; - default = "."; - description = '' - When not using latexmk, provides a way to define the directory containing the .aux files. - Note that you need to set the aux directory in latex.build.args too. - - When using a latexmkrc file, texlab will automatically infer the correct setting. - ''; - }; - logDirectory = mkOption { - type = str; - default = "."; - description = '' - When not using latexmk, provides a way to define the directory containing the build log files. - Note that you need to change the output directory in your build arguments too. - - When using a latexmkrc file, texlab will automatically infer the correct setting. - ''; - }; - pdfDirectory = mkOption { - type = str; - default = "."; - description = '' - When not using latexmk, provides a way to define the directory containing the output files. - Note that you need to set the output directory in latex.build.args too. - - When using a latexmkrc file, texlab will automatically infer the correct setting. - ''; - }; - filename = mkOption { - type = str; - default = ""; - description = '' - Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. - ''; - }; - }; - - forwardSearch = { - enable = mkOption { - type = bool; - default = false; - example = true; - description = '' - Whether to enable forward search. - - Enable this option if you want to have the compiled document appear in your chosen PDF viewer. - - For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). - Note this is not all the options, but can act as a guide to help you allong with custom configs. - ''; - }; - package = mkOption { - type = package; - default = pkgs.okular; - description = '' - The package to use as your PDF viewer. - This viewer needs to support Synctex. - ''; - }; - executable = mkOption { - type = str; - default = "okular"; - description = '' - Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. - ''; - }; - args = mkOption { - type = listOf str; - default = [ - "--unique" - "file:%p#src:%l%f" - ]; - description = '' - Defines additional arguments that are passed to the configured previewer to perform the forward search. - The placeholders %f, %p, %l will be replaced by the server. - - Placeholders: - - %f: The path of the current TeX file. - - %p: The path of the current PDF file. - - %l: The current line number. - ''; - }; - }; - - extraLuaSettings = mkOption { - type = str; - default = ""; - example = '' - formatterLineLength = 80, - ''; - description = '' - For any options that do not have options provided through nvf this can be used to add them. - Options already declared in nvf config will NOT be overridden. - - Options will be placed in: - ``` - lspconfig.texlab.setup { - settings = { - texlab = { - ... - - ... - - } - } - } - ``` - ''; - }; - }; - - # Add other LSPs here - }; + # lsp = { + # texlab = { + # enable = mkEnableLspOption "Whether to enable Tex LSP support (texlab)"; + # + # package = mkOption { + # type = package; + # default = pkgs.texlab; + # description = "texlab package"; + # }; + # + # build = { + # tectonic = { + # enable = mkEnableDefaultOption true "Whether to enable Tex Compilation Via Tectonic"; + # + # package = mkOption { + # type = package; + # default = pkgs.tectonic; + # description = "tectonic package"; + # }; + # + # executable = mkOption { + # type = str; + # default = "tectonic"; + # description = "The executable name from the build package that will be used to build/compile the tex."; + # }; + # + # # -- Flags -- + # keepIntermediates = mkEnableDefaultOption false '' + # Keep the intermediate files generated during processing. + # + # If texlab is reporting build errors when there shouldn't be, disable this option. + # ''; + # keepLogs = mkEnableDefaultOption true '' + # Keep the log files generated during processing. + # + # Without the keepLogs flag, texlab won't be able to report compilation warnings. + # ''; + # onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; + # synctex = mkEnableDefaultOption true "Generate SyncTeX data"; + # untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; + # + # # -- Options -- + # reruns = mkOption { + # type = ints.unsigned; + # default = 0; + # example = 2; + # description = "Rerun the TeX engine exactly this many times after the first"; + # }; + # + # bundle = mkOption { + # type = str; + # default = ""; + # description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; + # }; + # + # webBundle = mkOption { + # type = str; + # default = ""; + # description = "Use this URL to find resource files instead of the default"; + # }; + # + # outfmt = mkOption { + # type = enum [ + # "pdf" + # "html" + # "xdv" + # "aux" + # "fmt" + # "" + # ]; + # default = ""; + # description = "The kind of output to generate"; + # }; + # + # hidePaths = mkOption { + # type = listOf str; + # default = []; + # example = [ + # "./secrets.tex" + # "./passwords.tex" + # ]; + # description = "Tell the engine that no file at exists, if it tries to read it."; + # }; + # + # format = mkOption { + # type = str; + # default = ""; + # description = "The name of the \"format\" file used to initialize the TeX engine"; + # }; + # + # color = mkOption { + # type = enum [ + # "always" + # "auto" + # "never" + # "" + # ]; + # default = ""; + # example = "always"; + # description = "Enable/disable colorful log output"; + # }; + # + # extraOptions = { + # type = listOf str; + # default = []; + # description = '' + # Add extra command line options to include in the tectonic build command. + # Extra options added here will not overwrite the options set in as nvf options. + # ''; + # }; + # }; + # + # custom = { + # enable = mkEnableDefaultOption false "Whether to enable using a custom build package"; + # package = mkOption { + # type = package; + # default = pkgs.tectonic; + # description = "build/compiler package"; + # }; + # executable = mkOption { + # type = str; + # default = "tectonic"; + # description = "The executable name from the build package that will be used to build/compile the tex."; + # }; + # args = mkOption { + # type = listOf str; + # default = [ + # "-X" + # "compile" + # "%f" + # "--synctex" + # "--keep-logs" + # "--keep-intermediates" + # ]; + # description = '' + # Defines additional arguments that are passed to the configured LaTeX build tool. + # Note that flags and their arguments need to be separate elements in this array. + # To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. + # The placeholder `%f` will be replaced by the server. + # + # Placeholders: + # - `%f`: The path of the TeX file to compile. + # ''; + # }; + # }; + # + # forwardSearchAfter = mkOption { + # type = bool; + # default = false; + # description = "Set this property to true if you want to execute a forward search after a build."; + # }; + # onSave = mkOption { + # type = bool; + # default = false; + # description = "Set this property to true if you want to compile the project after saving a file."; + # }; + # useFileList = mkOption { + # type = bool; + # default = false; + # description = '' + # When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. + # + # Note that enabling this property might have an impact on performance. + # ''; + # }; + # auxDirectory = mkOption { + # type = str; + # default = "."; + # description = '' + # When not using latexmk, provides a way to define the directory containing the .aux files. + # Note that you need to set the aux directory in latex.build.args too. + # + # When using a latexmkrc file, texlab will automatically infer the correct setting. + # ''; + # }; + # logDirectory = mkOption { + # type = str; + # default = "."; + # description = '' + # When not using latexmk, provides a way to define the directory containing the build log files. + # Note that you need to change the output directory in your build arguments too. + # + # When using a latexmkrc file, texlab will automatically infer the correct setting. + # ''; + # }; + # pdfDirectory = mkOption { + # type = str; + # default = "."; + # description = '' + # When not using latexmk, provides a way to define the directory containing the output files. + # Note that you need to set the output directory in latex.build.args too. + # + # When using a latexmkrc file, texlab will automatically infer the correct setting. + # ''; + # }; + # filename = mkOption { + # type = str; + # default = ""; + # description = '' + # Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. + # ''; + # }; + # }; + # + # forwardSearch = { + # enable = mkOption { + # type = bool; + # default = false; + # example = true; + # description = '' + # Whether to enable forward search. + # + # Enable this option if you want to have the compiled document appear in your chosen PDF viewer. + # + # For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). + # Note this is not all the options, but can act as a guide to help you allong with custom configs. + # ''; + # }; + # package = mkOption { + # type = package; + # default = pkgs.okular; + # description = '' + # The package to use as your PDF viewer. + # This viewer needs to support Synctex. + # ''; + # }; + # executable = mkOption { + # type = str; + # default = "okular"; + # description = '' + # Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. + # ''; + # }; + # args = mkOption { + # type = listOf str; + # default = [ + # "--unique" + # "file:%p#src:%l%f" + # ]; + # description = '' + # Defines additional arguments that are passed to the configured previewer to perform the forward search. + # The placeholders %f, %p, %l will be replaced by the server. + # + # Placeholders: + # - %f: The path of the current TeX file. + # - %p: The path of the current PDF file. + # - %l: The current line number. + # ''; + # }; + # }; + # + # extraLuaSettings = mkOption { + # type = str; + # default = ""; + # example = '' + # formatterLineLength = 80, + # ''; + # description = '' + # For any options that do not have options provided through nvf this can be used to add them. + # Options already declared in nvf config will NOT be overridden. + # + # Options will be placed in: + # ``` + # lspconfig.texlab.setup { + # settings = { + # texlab = { + # ... + # + # ... + # + # } + # } + # } + # ``` + # ''; + # }; + # }; + # + # # Add other LSPs here + # }; extraOpts = { texFlavor = { @@ -501,120 +502,120 @@ in { # }) # LSP - (mkIf (any (x: x.enable) (attrValues cfg.lsp)) ( - { - vim.lsp.lspconfig.enable = true; - } # Enable lspconfig when any of the lsps are enabled - // (mkMerge [ - # ----- Texlab ----- - ( - let - tl = cfg.lsp.texlab; - build = tl.build; - - listToLua = list: nullOnEmpty: - if length list == 0 - then - if nullOnEmpty - then "null" - else "{ }" - else "{ ${concatStringsSep ", " (map (x: ''"${toString x}"'') list)} }"; - - stringToLua = string: nullOnEmpty: - if string == "" - then - if nullOnEmpty - then "null" - else "" - else ''"${string}"''; - - boolToLua = boolean: - if boolean - then "true" - else "false"; - - # -- Build -- - buildConfig = let - # This function will sort through the builder options of ...texlab.build and count how many - # builders have been enabled and get the attrs of the last enabled builder. - getBuilder = { - enabledBuildersCount ? 0, - enabledBuilderName ? "", - index ? 0, - builderNamesList ? ( - filter ( - x: let - y = tl.build.${x}; - in (isAttrs y && hasAttr "enable" y) - ) (attrNames tl.build) - ), - }: let - currentBuilderName = elemAt builderNamesList index; - currentBuilder = tl.build.${currentBuilderName}; - nextIndex = index + 1; - currentState = { - enabledBuildersCount = - if currentBuilder.enable - then enabledBuildersCount + 1 - else enabledBuildersCount; - enabledBuilderName = - if currentBuilder.enable - then currentBuilderName - else enabledBuilderName; - }; - in - if length builderNamesList > nextIndex - then - getBuilder ({ - inherit builderNamesList; - index = nextIndex; - } - // currentState) - else currentState; - - getBuilderResults = getBuilder {}; - builder = tl.build.${getBuilderResults.enabledBuilderName}; - builderArgs = collateArgs.lsp.texlab.build.${getBuilderResults.enabledBuilderName} tl.build; - in - if getBuilderResults.enabledBuildersCount == 0 - then "" - else if getBuilderResults.enabledBuildersCount > 1 - then throw "Texlab does not support having more than 1 builders enabled!" - else '' - build = { - executable = "${builder.package}/bin/${builder.executable}", - args = ${listToLua builderArgs false}, - forwardSearchAfter = ${boolToLua build.forwardSearchAfter}, - onSave = ${boolToLua build.onSave}, - useFileList = ${boolToLua build.useFileList}, - auxDirectory = ${stringToLua build.auxDirectory true}, - logDirectory = ${stringToLua build.logDirectory true}, - pdfDirectory = ${stringToLua build.pdfDirectory true}, - filename = ${stringToLua build.filename true}, - }, - ''; - in (mkIf tl.enable { - vim.lsp.lspconfig.sources.texlab = '' - lspconfig.texlab.setup { - cmd = { "${tl.package}/bin/texlab" }, - settings = { - texlab = { - ${buildConfig} - forwardSearch = { - executable = "${tl.forwardSearch.package}/bin/${tl.forwardSearch.executable}", - args = ${listToLua tl.forwardSearch.args true} - }, - ${tl.extraLuaSettings} - } - } - } - ''; - }) - ) - - # Add other LSPs here - ]) - )) + # (mkIf (any (x: x.enable) (attrValues cfg.lsp)) ( + # { + # vim.lsp.lspconfig.enable = true; + # } # Enable lspconfig when any of the lsps are enabled + # // (mkMerge [ + # # ----- Texlab ----- + # ( + # let + # tl = cfg.lsp.texlab; + # build = tl.build; + # + # listToLua = list: nullOnEmpty: + # if length list == 0 + # then + # if nullOnEmpty + # then "null" + # else "{ }" + # else "{ ${concatStringsSep ", " (map (x: ''"${toString x}"'') list)} }"; + # + # stringToLua = string: nullOnEmpty: + # if string == "" + # then + # if nullOnEmpty + # then "null" + # else "" + # else ''"${string}"''; + # + # boolToLua = boolean: + # if boolean + # then "true" + # else "false"; + # + # # -- Build -- + # buildConfig = let + # # This function will sort through the builder options of ...texlab.build and count how many + # # builders have been enabled and get the attrs of the last enabled builder. + # getBuilder = { + # enabledBuildersCount ? 0, + # enabledBuilderName ? "", + # index ? 0, + # builderNamesList ? ( + # filter ( + # x: let + # y = tl.build.${x}; + # in (isAttrs y && hasAttr "enable" y) + # ) (attrNames tl.build) + # ), + # }: let + # currentBuilderName = elemAt builderNamesList index; + # currentBuilder = tl.build.${currentBuilderName}; + # nextIndex = index + 1; + # currentState = { + # enabledBuildersCount = + # if currentBuilder.enable + # then enabledBuildersCount + 1 + # else enabledBuildersCount; + # enabledBuilderName = + # if currentBuilder.enable + # then currentBuilderName + # else enabledBuilderName; + # }; + # in + # if length builderNamesList > nextIndex + # then + # getBuilder ({ + # inherit builderNamesList; + # index = nextIndex; + # } + # // currentState) + # else currentState; + # + # getBuilderResults = getBuilder {}; + # builder = tl.build.${getBuilderResults.enabledBuilderName}; + # builderArgs = collateArgs.lsp.texlab.build.${getBuilderResults.enabledBuilderName} tl.build; + # in + # if getBuilderResults.enabledBuildersCount == 0 + # then "" + # else if getBuilderResults.enabledBuildersCount > 1 + # then throw "Texlab does not support having more than 1 builders enabled!" + # else '' + # build = { + # executable = "${builder.package}/bin/${builder.executable}", + # args = ${listToLua builderArgs false}, + # forwardSearchAfter = ${boolToLua build.forwardSearchAfter}, + # onSave = ${boolToLua build.onSave}, + # useFileList = ${boolToLua build.useFileList}, + # auxDirectory = ${stringToLua build.auxDirectory true}, + # logDirectory = ${stringToLua build.logDirectory true}, + # pdfDirectory = ${stringToLua build.pdfDirectory true}, + # filename = ${stringToLua build.filename true}, + # }, + # ''; + # in (mkIf tl.enable { + # vim.lsp.lspconfig.sources.texlab = '' + # lspconfig.texlab.setup { + # cmd = { "${tl.package}/bin/texlab" }, + # settings = { + # texlab = { + # ${buildConfig} + # forwardSearch = { + # executable = "${tl.forwardSearch.package}/bin/${tl.forwardSearch.executable}", + # args = ${listToLua tl.forwardSearch.args true} + # }, + # ${tl.extraLuaSettings} + # } + # } + # } + # ''; + # }) + # ) + # + # # Add other LSPs here + # ]) + # )) # Extra Lua config options (mkIf cfg.extraOpts.texFlavor.enable { diff --git a/modules/plugins/languages/tex/lsp/default.nix b/modules/plugins/languages/tex/lsp/default.nix new file mode 100644 index 00000000..3c48d515 --- /dev/null +++ b/modules/plugins/languages/tex/lsp/default.nix @@ -0,0 +1,528 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.modules) mkIf mkMerge; + inherit + (lib.types) + bool + either + enum + ints + listOf + oneOf + package + str + ; + inherit (lib.nvim.types) mkGrammarOption; + inherit + (builtins) + any + attrNames + attrValues + concatLists + concatStringsSep + elem + elemAt + filter + hasAttr + isAttrs + length + map + throw + toString + ; + + cfg = config.vim.languages.tex; + + # --- Enable Options --- + mkEnableDefaultOption = default: description: (mkOption { + type = bool; + default = default; + example = !default; + description = description; + }); + mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; + + # --- Arg Collation Functions -- + collateArgs.lsp.texlab.build = { + tectonic = buildConfig: let + selfConfig = buildConfig.tectonic; + in ( + # Base args + [ + "-X" + "compile" + "%f" + ] + # Flags + ++ ( + if selfConfig.keepIntermediates + then ["--keep-intermediates"] + else [] + ) + ++ ( + if selfConfig.keepLogs + then ["--keep-logs"] + else [] + ) + ++ ( + if selfConfig.onlyCached + then ["--only-cached"] + else [] + ) + ++ ( + if selfConfig.synctex + then ["--synctex"] + else [] + ) + ++ ( + if selfConfig.untrustedInput + then ["--untrusted"] + else [] + ) + # Options + ++ ( + if selfConfig.reruns > 0 + then ["--reruns" "${toString selfConfig.reruns}"] + else [] + ) + ++ ( + if selfConfig.bundle != "" + then ["--bundle" "${toString selfConfig.bundle}"] + else [] + ) + ++ ( + if selfConfig.webBundle != "" + then ["--web-bundle" "${toString selfConfig.webBundle}"] + else [] + ) + ++ ( + if selfConfig.outfmt != "" + then ["--outfmt" "${toString selfConfig.outfmt}"] + else [] + ) + ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) + ++ ( + if selfConfig.format != "" + then ["--format" "${toString selfConfig.format}"] + else [] + ) + ++ ( + if selfConfig.color != "" + then ["--color" "${toString selfConfig.color}"] + else [] + ) + # Still options but these are not defined by builder specific options but + # instead synchronize options between the global build options and builder + # specific options + ++ ( + if !(elem buildConfig.pdfDirectory ["." ""]) + then ["--outdir" "${buildConfig.pdfDirectory}"] + else [] + ) + ); + custom = buildConfig: buildConfig.custom.args; + }; +in { + options.vim.languages.tex.lsp = { + texlab = { + enable = mkEnableLspOption "Whether to enable Tex LSP support (texlab)"; + + package = mkOption { + type = package; + default = pkgs.texlab; + description = "texlab package"; + }; + + build = { + tectonic = { + enable = mkEnableDefaultOption true "Whether to enable Tex Compilation Via Tectonic"; + + package = mkOption { + type = package; + default = pkgs.tectonic; + description = "tectonic package"; + }; + + executable = mkOption { + type = str; + default = "tectonic"; + description = "The executable name from the build package that will be used to build/compile the tex."; + }; + + # -- Flags -- + keepIntermediates = mkEnableDefaultOption false '' + Keep the intermediate files generated during processing. + + If texlab is reporting build errors when there shouldn't be, disable this option. + ''; + keepLogs = mkEnableDefaultOption true '' + Keep the log files generated during processing. + + Without the keepLogs flag, texlab won't be able to report compilation warnings. + ''; + onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; + synctex = mkEnableDefaultOption true "Generate SyncTeX data"; + untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; + + # -- Options -- + reruns = mkOption { + type = ints.unsigned; + default = 0; + example = 2; + description = "Rerun the TeX engine exactly this many times after the first"; + }; + + bundle = mkOption { + type = str; + default = ""; + description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; + }; + + webBundle = mkOption { + type = str; + default = ""; + description = "Use this URL to find resource files instead of the default"; + }; + + outfmt = mkOption { + type = enum [ + "pdf" + "html" + "xdv" + "aux" + "fmt" + "" + ]; + default = ""; + description = "The kind of output to generate"; + }; + + hidePaths = mkOption { + type = listOf str; + default = []; + example = [ + "./secrets.tex" + "./passwords.tex" + ]; + description = "Tell the engine that no file at exists, if it tries to read it."; + }; + + format = mkOption { + type = str; + default = ""; + description = "The name of the \"format\" file used to initialize the TeX engine"; + }; + + color = mkOption { + type = enum [ + "always" + "auto" + "never" + "" + ]; + default = ""; + example = "always"; + description = "Enable/disable colorful log output"; + }; + + extraOptions = { + type = listOf str; + default = []; + description = '' + Add extra command line options to include in the tectonic build command. + Extra options added here will not overwrite the options set in as nvf options. + ''; + }; + }; + + custom = { + enable = mkEnableDefaultOption false "Whether to enable using a custom build package"; + package = mkOption { + type = package; + default = pkgs.tectonic; + description = "build/compiler package"; + }; + executable = mkOption { + type = str; + default = "tectonic"; + description = "The executable name from the build package that will be used to build/compile the tex."; + }; + args = mkOption { + type = listOf str; + default = [ + "-X" + "compile" + "%f" + "--synctex" + "--keep-logs" + "--keep-intermediates" + ]; + description = '' + Defines additional arguments that are passed to the configured LaTeX build tool. + Note that flags and their arguments need to be separate elements in this array. + To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. + The placeholder `%f` will be replaced by the server. + + Placeholders: + - `%f`: The path of the TeX file to compile. + ''; + }; + }; + + forwardSearchAfter = mkOption { + type = bool; + default = false; + description = "Set this property to true if you want to execute a forward search after a build."; + }; + onSave = mkOption { + type = bool; + default = false; + description = "Set this property to true if you want to compile the project after saving a file."; + }; + useFileList = mkOption { + type = bool; + default = false; + description = '' + When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. + + Note that enabling this property might have an impact on performance. + ''; + }; + auxDirectory = mkOption { + type = str; + default = "."; + description = '' + When not using latexmk, provides a way to define the directory containing the .aux files. + Note that you need to set the aux directory in latex.build.args too. + + When using a latexmkrc file, texlab will automatically infer the correct setting. + ''; + }; + logDirectory = mkOption { + type = str; + default = "."; + description = '' + When not using latexmk, provides a way to define the directory containing the build log files. + Note that you need to change the output directory in your build arguments too. + + When using a latexmkrc file, texlab will automatically infer the correct setting. + ''; + }; + pdfDirectory = mkOption { + type = str; + default = "."; + description = '' + When not using latexmk, provides a way to define the directory containing the output files. + Note that you need to set the output directory in latex.build.args too. + + When using a latexmkrc file, texlab will automatically infer the correct setting. + ''; + }; + filename = mkOption { + type = str; + default = ""; + description = '' + Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. + ''; + }; + }; + + forwardSearch = { + enable = mkOption { + type = bool; + default = false; + example = true; + description = '' + Whether to enable forward search. + + Enable this option if you want to have the compiled document appear in your chosen PDF viewer. + + For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). + Note this is not all the options, but can act as a guide to help you allong with custom configs. + ''; + }; + package = mkOption { + type = package; + default = pkgs.okular; + description = '' + The package to use as your PDF viewer. + This viewer needs to support Synctex. + ''; + }; + executable = mkOption { + type = str; + default = "okular"; + description = '' + Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. + ''; + }; + args = mkOption { + type = listOf str; + default = [ + "--unique" + "file:%p#src:%l%f" + ]; + description = '' + Defines additional arguments that are passed to the configured previewer to perform the forward search. + The placeholders %f, %p, %l will be replaced by the server. + + Placeholders: + - %f: The path of the current TeX file. + - %p: The path of the current PDF file. + - %l: The current line number. + ''; + }; + }; + + extraLuaSettings = mkOption { + type = str; + default = ""; + example = '' + formatterLineLength = 80, + ''; + description = '' + For any options that do not have options provided through nvf this can be used to add them. + Options already declared in nvf config will NOT be overridden. + + Options will be placed in: + ``` + lspconfig.texlab.setup { + settings = { + texlab = { + ... + + ... + + } + } + } + ``` + ''; + }; + }; + + # Add other LSPs here + }; + + # config = mkIf cfg.enable (mkMerge [ + # (mkIf (any (x: x.enable) (attrValues cfg.lsp)) ( + config = mkIf (cfg.enable && (any (x: x.enable) (attrValues cfg.lsp))) ( + { + vim.lsp.lspconfig.enable = true; + } # Enable lspconfig when any of the lsps are enabled + // (mkMerge [ + # ----- Texlab ----- + ( + let + tl = cfg.lsp.texlab; + build = tl.build; + + listToLua = list: nullOnEmpty: + if length list == 0 + then + if nullOnEmpty + then "null" + else "{ }" + else "{ ${concatStringsSep ", " (map (x: ''"${toString x}"'') list)} }"; + + stringToLua = string: nullOnEmpty: + if string == "" + then + if nullOnEmpty + then "null" + else "" + else ''"${string}"''; + + boolToLua = boolean: + if boolean + then "true" + else "false"; + + # -- Build -- + buildConfig = let + # This function will sort through the builder options of ...texlab.build and count how many + # builders have been enabled and get the attrs of the last enabled builder. + getBuilder = { + enabledBuildersCount ? 0, + enabledBuilderName ? "", + index ? 0, + builderNamesList ? ( + filter ( + x: let + y = tl.build.${x}; + in (isAttrs y && hasAttr "enable" y) + ) (attrNames tl.build) + ), + }: let + currentBuilderName = elemAt builderNamesList index; + currentBuilder = tl.build.${currentBuilderName}; + nextIndex = index + 1; + currentState = { + enabledBuildersCount = + if currentBuilder.enable + then enabledBuildersCount + 1 + else enabledBuildersCount; + enabledBuilderName = + if currentBuilder.enable + then currentBuilderName + else enabledBuilderName; + }; + in + if length builderNamesList > nextIndex + then + getBuilder ({ + inherit builderNamesList; + index = nextIndex; + } + // currentState) + else currentState; + + getBuilderResults = getBuilder {}; + builder = tl.build.${getBuilderResults.enabledBuilderName}; + builderArgs = collateArgs.lsp.texlab.build.${getBuilderResults.enabledBuilderName} tl.build; + in + if getBuilderResults.enabledBuildersCount == 0 + then "" + else if getBuilderResults.enabledBuildersCount > 1 + then throw "Texlab does not support having more than 1 builders enabled!" + else '' + build = { + executable = "${builder.package}/bin/${builder.executable}", + args = ${listToLua builderArgs false}, + forwardSearchAfter = ${boolToLua build.forwardSearchAfter}, + onSave = ${boolToLua build.onSave}, + useFileList = ${boolToLua build.useFileList}, + auxDirectory = ${stringToLua build.auxDirectory true}, + logDirectory = ${stringToLua build.logDirectory true}, + pdfDirectory = ${stringToLua build.pdfDirectory true}, + filename = ${stringToLua build.filename true}, + }, + ''; + in (mkIf tl.enable { + vim.lsp.lspconfig.sources.texlab = '' + lspconfig.texlab.setup { + cmd = { "${tl.package}/bin/texlab" }, + settings = { + texlab = { + ${buildConfig} + forwardSearch = { + executable = "${tl.forwardSearch.package}/bin/${tl.forwardSearch.executable}", + args = ${listToLua tl.forwardSearch.args true} + }, + ${tl.extraLuaSettings} + } + } + } + ''; + }) + ) + + # Add other LSPs here + ]) + ); +} From 9b401be571372c80796d37759ff02e1bc2326929 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 23 Jan 2025 16:54:21 -0700 Subject: [PATCH 16/76] Migrated texlab into its own module --- modules/plugins/languages/tex/lsp/default.nix | 951 +++++++++--------- modules/plugins/languages/tex/lsp/texlab.nix | 512 ++++++++++ 2 files changed, 989 insertions(+), 474 deletions(-) create mode 100644 modules/plugins/languages/tex/lsp/texlab.nix diff --git a/modules/plugins/languages/tex/lsp/default.nix b/modules/plugins/languages/tex/lsp/default.nix index 3c48d515..ffffe5cf 100644 --- a/modules/plugins/languages/tex/lsp/default.nix +++ b/modules/plugins/languages/tex/lsp/default.nix @@ -39,375 +39,378 @@ cfg = config.vim.languages.tex; # --- Enable Options --- - mkEnableDefaultOption = default: description: (mkOption { - type = bool; - default = default; - example = !default; - description = description; - }); - mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; + # mkEnableDefaultOption = default: description: (mkOption { + # type = bool; + # default = default; + # example = !default; + # description = description; + # }); + # mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; - # --- Arg Collation Functions -- - collateArgs.lsp.texlab.build = { - tectonic = buildConfig: let - selfConfig = buildConfig.tectonic; - in ( - # Base args - [ - "-X" - "compile" - "%f" - ] - # Flags - ++ ( - if selfConfig.keepIntermediates - then ["--keep-intermediates"] - else [] - ) - ++ ( - if selfConfig.keepLogs - then ["--keep-logs"] - else [] - ) - ++ ( - if selfConfig.onlyCached - then ["--only-cached"] - else [] - ) - ++ ( - if selfConfig.synctex - then ["--synctex"] - else [] - ) - ++ ( - if selfConfig.untrustedInput - then ["--untrusted"] - else [] - ) - # Options - ++ ( - if selfConfig.reruns > 0 - then ["--reruns" "${toString selfConfig.reruns}"] - else [] - ) - ++ ( - if selfConfig.bundle != "" - then ["--bundle" "${toString selfConfig.bundle}"] - else [] - ) - ++ ( - if selfConfig.webBundle != "" - then ["--web-bundle" "${toString selfConfig.webBundle}"] - else [] - ) - ++ ( - if selfConfig.outfmt != "" - then ["--outfmt" "${toString selfConfig.outfmt}"] - else [] - ) - ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) - ++ ( - if selfConfig.format != "" - then ["--format" "${toString selfConfig.format}"] - else [] - ) - ++ ( - if selfConfig.color != "" - then ["--color" "${toString selfConfig.color}"] - else [] - ) - # Still options but these are not defined by builder specific options but - # instead synchronize options between the global build options and builder - # specific options - ++ ( - if !(elem buildConfig.pdfDirectory ["." ""]) - then ["--outdir" "${buildConfig.pdfDirectory}"] - else [] - ) - ); - custom = buildConfig: buildConfig.custom.args; - }; + # # --- Arg Collation Functions -- + # collateArgs.lsp.texlab.build = { + # tectonic = buildConfig: let + # selfConfig = buildConfig.tectonic; + # in ( + # # Base args + # [ + # "-X" + # "compile" + # "%f" + # ] + # # Flags + # ++ ( + # if selfConfig.keepIntermediates + # then ["--keep-intermediates"] + # else [] + # ) + # ++ ( + # if selfConfig.keepLogs + # then ["--keep-logs"] + # else [] + # ) + # ++ ( + # if selfConfig.onlyCached + # then ["--only-cached"] + # else [] + # ) + # ++ ( + # if selfConfig.synctex + # then ["--synctex"] + # else [] + # ) + # ++ ( + # if selfConfig.untrustedInput + # then ["--untrusted"] + # else [] + # ) + # # Options + # ++ ( + # if selfConfig.reruns > 0 + # then ["--reruns" "${toString selfConfig.reruns}"] + # else [] + # ) + # ++ ( + # if selfConfig.bundle != "" + # then ["--bundle" "${toString selfConfig.bundle}"] + # else [] + # ) + # ++ ( + # if selfConfig.webBundle != "" + # then ["--web-bundle" "${toString selfConfig.webBundle}"] + # else [] + # ) + # ++ ( + # if selfConfig.outfmt != "" + # then ["--outfmt" "${toString selfConfig.outfmt}"] + # else [] + # ) + # ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) + # ++ ( + # if selfConfig.format != "" + # then ["--format" "${toString selfConfig.format}"] + # else [] + # ) + # ++ ( + # if selfConfig.color != "" + # then ["--color" "${toString selfConfig.color}"] + # else [] + # ) + # # Still options but these are not defined by builder specific options but + # # instead synchronize options between the global build options and builder + # # specific options + # ++ ( + # if !(elem buildConfig.pdfDirectory ["." ""]) + # then ["--outdir" "${buildConfig.pdfDirectory}"] + # else [] + # ) + # ); + # custom = buildConfig: buildConfig.custom.args; + # }; in { - options.vim.languages.tex.lsp = { - texlab = { - enable = mkEnableLspOption "Whether to enable Tex LSP support (texlab)"; - - package = mkOption { - type = package; - default = pkgs.texlab; - description = "texlab package"; - }; - - build = { - tectonic = { - enable = mkEnableDefaultOption true "Whether to enable Tex Compilation Via Tectonic"; - - package = mkOption { - type = package; - default = pkgs.tectonic; - description = "tectonic package"; - }; - - executable = mkOption { - type = str; - default = "tectonic"; - description = "The executable name from the build package that will be used to build/compile the tex."; - }; - - # -- Flags -- - keepIntermediates = mkEnableDefaultOption false '' - Keep the intermediate files generated during processing. - - If texlab is reporting build errors when there shouldn't be, disable this option. - ''; - keepLogs = mkEnableDefaultOption true '' - Keep the log files generated during processing. - - Without the keepLogs flag, texlab won't be able to report compilation warnings. - ''; - onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; - synctex = mkEnableDefaultOption true "Generate SyncTeX data"; - untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; - - # -- Options -- - reruns = mkOption { - type = ints.unsigned; - default = 0; - example = 2; - description = "Rerun the TeX engine exactly this many times after the first"; - }; - - bundle = mkOption { - type = str; - default = ""; - description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; - }; - - webBundle = mkOption { - type = str; - default = ""; - description = "Use this URL to find resource files instead of the default"; - }; - - outfmt = mkOption { - type = enum [ - "pdf" - "html" - "xdv" - "aux" - "fmt" - "" - ]; - default = ""; - description = "The kind of output to generate"; - }; - - hidePaths = mkOption { - type = listOf str; - default = []; - example = [ - "./secrets.tex" - "./passwords.tex" - ]; - description = "Tell the engine that no file at exists, if it tries to read it."; - }; - - format = mkOption { - type = str; - default = ""; - description = "The name of the \"format\" file used to initialize the TeX engine"; - }; - - color = mkOption { - type = enum [ - "always" - "auto" - "never" - "" - ]; - default = ""; - example = "always"; - description = "Enable/disable colorful log output"; - }; - - extraOptions = { - type = listOf str; - default = []; - description = '' - Add extra command line options to include in the tectonic build command. - Extra options added here will not overwrite the options set in as nvf options. - ''; - }; - }; - - custom = { - enable = mkEnableDefaultOption false "Whether to enable using a custom build package"; - package = mkOption { - type = package; - default = pkgs.tectonic; - description = "build/compiler package"; - }; - executable = mkOption { - type = str; - default = "tectonic"; - description = "The executable name from the build package that will be used to build/compile the tex."; - }; - args = mkOption { - type = listOf str; - default = [ - "-X" - "compile" - "%f" - "--synctex" - "--keep-logs" - "--keep-intermediates" - ]; - description = '' - Defines additional arguments that are passed to the configured LaTeX build tool. - Note that flags and their arguments need to be separate elements in this array. - To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. - The placeholder `%f` will be replaced by the server. - - Placeholders: - - `%f`: The path of the TeX file to compile. - ''; - }; - }; - - forwardSearchAfter = mkOption { - type = bool; - default = false; - description = "Set this property to true if you want to execute a forward search after a build."; - }; - onSave = mkOption { - type = bool; - default = false; - description = "Set this property to true if you want to compile the project after saving a file."; - }; - useFileList = mkOption { - type = bool; - default = false; - description = '' - When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. - - Note that enabling this property might have an impact on performance. - ''; - }; - auxDirectory = mkOption { - type = str; - default = "."; - description = '' - When not using latexmk, provides a way to define the directory containing the .aux files. - Note that you need to set the aux directory in latex.build.args too. - - When using a latexmkrc file, texlab will automatically infer the correct setting. - ''; - }; - logDirectory = mkOption { - type = str; - default = "."; - description = '' - When not using latexmk, provides a way to define the directory containing the build log files. - Note that you need to change the output directory in your build arguments too. - - When using a latexmkrc file, texlab will automatically infer the correct setting. - ''; - }; - pdfDirectory = mkOption { - type = str; - default = "."; - description = '' - When not using latexmk, provides a way to define the directory containing the output files. - Note that you need to set the output directory in latex.build.args too. - - When using a latexmkrc file, texlab will automatically infer the correct setting. - ''; - }; - filename = mkOption { - type = str; - default = ""; - description = '' - Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. - ''; - }; - }; - - forwardSearch = { - enable = mkOption { - type = bool; - default = false; - example = true; - description = '' - Whether to enable forward search. - - Enable this option if you want to have the compiled document appear in your chosen PDF viewer. - - For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). - Note this is not all the options, but can act as a guide to help you allong with custom configs. - ''; - }; - package = mkOption { - type = package; - default = pkgs.okular; - description = '' - The package to use as your PDF viewer. - This viewer needs to support Synctex. - ''; - }; - executable = mkOption { - type = str; - default = "okular"; - description = '' - Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. - ''; - }; - args = mkOption { - type = listOf str; - default = [ - "--unique" - "file:%p#src:%l%f" - ]; - description = '' - Defines additional arguments that are passed to the configured previewer to perform the forward search. - The placeholders %f, %p, %l will be replaced by the server. - - Placeholders: - - %f: The path of the current TeX file. - - %p: The path of the current PDF file. - - %l: The current line number. - ''; - }; - }; - - extraLuaSettings = mkOption { - type = str; - default = ""; - example = '' - formatterLineLength = 80, - ''; - description = '' - For any options that do not have options provided through nvf this can be used to add them. - Options already declared in nvf config will NOT be overridden. - - Options will be placed in: - ``` - lspconfig.texlab.setup { - settings = { - texlab = { - ... - - ... - - } - } - } - ``` - ''; - }; - }; + imports = [ + ./texlab.nix + ]; + # options.vim.languages.tex.lsp = { + # texlab = { + # enable = mkEnableLspOption "Whether to enable Tex LSP support (texlab)"; + # + # package = mkOption { + # type = package; + # default = pkgs.texlab; + # description = "texlab package"; + # }; + # + # build = { + # tectonic = { + # enable = mkEnableDefaultOption true "Whether to enable Tex Compilation Via Tectonic"; + # + # package = mkOption { + # type = package; + # default = pkgs.tectonic; + # description = "tectonic package"; + # }; + # + # executable = mkOption { + # type = str; + # default = "tectonic"; + # description = "The executable name from the build package that will be used to build/compile the tex."; + # }; + # + # # -- Flags -- + # keepIntermediates = mkEnableDefaultOption false '' + # Keep the intermediate files generated during processing. + # + # If texlab is reporting build errors when there shouldn't be, disable this option. + # ''; + # keepLogs = mkEnableDefaultOption true '' + # Keep the log files generated during processing. + # + # Without the keepLogs flag, texlab won't be able to report compilation warnings. + # ''; + # onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; + # synctex = mkEnableDefaultOption true "Generate SyncTeX data"; + # untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; + # + # # -- Options -- + # reruns = mkOption { + # type = ints.unsigned; + # default = 0; + # example = 2; + # description = "Rerun the TeX engine exactly this many times after the first"; + # }; + # + # bundle = mkOption { + # type = str; + # default = ""; + # description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; + # }; + # + # webBundle = mkOption { + # type = str; + # default = ""; + # description = "Use this URL to find resource files instead of the default"; + # }; + # + # outfmt = mkOption { + # type = enum [ + # "pdf" + # "html" + # "xdv" + # "aux" + # "fmt" + # "" + # ]; + # default = ""; + # description = "The kind of output to generate"; + # }; + # + # hidePaths = mkOption { + # type = listOf str; + # default = []; + # example = [ + # "./secrets.tex" + # "./passwords.tex" + # ]; + # description = "Tell the engine that no file at exists, if it tries to read it."; + # }; + # + # format = mkOption { + # type = str; + # default = ""; + # description = "The name of the \"format\" file used to initialize the TeX engine"; + # }; + # + # color = mkOption { + # type = enum [ + # "always" + # "auto" + # "never" + # "" + # ]; + # default = ""; + # example = "always"; + # description = "Enable/disable colorful log output"; + # }; + # + # extraOptions = { + # type = listOf str; + # default = []; + # description = '' + # Add extra command line options to include in the tectonic build command. + # Extra options added here will not overwrite the options set in as nvf options. + # ''; + # }; + # }; + # + # custom = { + # enable = mkEnableDefaultOption false "Whether to enable using a custom build package"; + # package = mkOption { + # type = package; + # default = pkgs.tectonic; + # description = "build/compiler package"; + # }; + # executable = mkOption { + # type = str; + # default = "tectonic"; + # description = "The executable name from the build package that will be used to build/compile the tex."; + # }; + # args = mkOption { + # type = listOf str; + # default = [ + # "-X" + # "compile" + # "%f" + # "--synctex" + # "--keep-logs" + # "--keep-intermediates" + # ]; + # description = '' + # Defines additional arguments that are passed to the configured LaTeX build tool. + # Note that flags and their arguments need to be separate elements in this array. + # To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. + # The placeholder `%f` will be replaced by the server. + # + # Placeholders: + # - `%f`: The path of the TeX file to compile. + # ''; + # }; + # }; + # + # forwardSearchAfter = mkOption { + # type = bool; + # default = false; + # description = "Set this property to true if you want to execute a forward search after a build."; + # }; + # onSave = mkOption { + # type = bool; + # default = false; + # description = "Set this property to true if you want to compile the project after saving a file."; + # }; + # useFileList = mkOption { + # type = bool; + # default = false; + # description = '' + # When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. + # + # Note that enabling this property might have an impact on performance. + # ''; + # }; + # auxDirectory = mkOption { + # type = str; + # default = "."; + # description = '' + # When not using latexmk, provides a way to define the directory containing the .aux files. + # Note that you need to set the aux directory in latex.build.args too. + # + # When using a latexmkrc file, texlab will automatically infer the correct setting. + # ''; + # }; + # logDirectory = mkOption { + # type = str; + # default = "."; + # description = '' + # When not using latexmk, provides a way to define the directory containing the build log files. + # Note that you need to change the output directory in your build arguments too. + # + # When using a latexmkrc file, texlab will automatically infer the correct setting. + # ''; + # }; + # pdfDirectory = mkOption { + # type = str; + # default = "."; + # description = '' + # When not using latexmk, provides a way to define the directory containing the output files. + # Note that you need to set the output directory in latex.build.args too. + # + # When using a latexmkrc file, texlab will automatically infer the correct setting. + # ''; + # }; + # filename = mkOption { + # type = str; + # default = ""; + # description = '' + # Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. + # ''; + # }; + # }; + # + # forwardSearch = { + # enable = mkOption { + # type = bool; + # default = false; + # example = true; + # description = '' + # Whether to enable forward search. + # + # Enable this option if you want to have the compiled document appear in your chosen PDF viewer. + # + # For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). + # Note this is not all the options, but can act as a guide to help you allong with custom configs. + # ''; + # }; + # package = mkOption { + # type = package; + # default = pkgs.okular; + # description = '' + # The package to use as your PDF viewer. + # This viewer needs to support Synctex. + # ''; + # }; + # executable = mkOption { + # type = str; + # default = "okular"; + # description = '' + # Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. + # ''; + # }; + # args = mkOption { + # type = listOf str; + # default = [ + # "--unique" + # "file:%p#src:%l%f" + # ]; + # description = '' + # Defines additional arguments that are passed to the configured previewer to perform the forward search. + # The placeholders %f, %p, %l will be replaced by the server. + # + # Placeholders: + # - %f: The path of the current TeX file. + # - %p: The path of the current PDF file. + # - %l: The current line number. + # ''; + # }; + # }; + # + # extraLuaSettings = mkOption { + # type = str; + # default = ""; + # example = '' + # formatterLineLength = 80, + # ''; + # description = '' + # For any options that do not have options provided through nvf this can be used to add them. + # Options already declared in nvf config will NOT be overridden. + # + # Options will be placed in: + # ``` + # lspconfig.texlab.setup { + # settings = { + # texlab = { + # ... + # + # ... + # + # } + # } + # } + # ``` + # ''; + # }; + # }; # Add other LSPs here - }; + # }; # config = mkIf cfg.enable (mkMerge [ # (mkIf (any (x: x.enable) (attrValues cfg.lsp)) ( @@ -415,114 +418,114 @@ in { { vim.lsp.lspconfig.enable = true; } # Enable lspconfig when any of the lsps are enabled - // (mkMerge [ - # ----- Texlab ----- - ( - let - tl = cfg.lsp.texlab; - build = tl.build; - - listToLua = list: nullOnEmpty: - if length list == 0 - then - if nullOnEmpty - then "null" - else "{ }" - else "{ ${concatStringsSep ", " (map (x: ''"${toString x}"'') list)} }"; - - stringToLua = string: nullOnEmpty: - if string == "" - then - if nullOnEmpty - then "null" - else "" - else ''"${string}"''; - - boolToLua = boolean: - if boolean - then "true" - else "false"; - - # -- Build -- - buildConfig = let - # This function will sort through the builder options of ...texlab.build and count how many - # builders have been enabled and get the attrs of the last enabled builder. - getBuilder = { - enabledBuildersCount ? 0, - enabledBuilderName ? "", - index ? 0, - builderNamesList ? ( - filter ( - x: let - y = tl.build.${x}; - in (isAttrs y && hasAttr "enable" y) - ) (attrNames tl.build) - ), - }: let - currentBuilderName = elemAt builderNamesList index; - currentBuilder = tl.build.${currentBuilderName}; - nextIndex = index + 1; - currentState = { - enabledBuildersCount = - if currentBuilder.enable - then enabledBuildersCount + 1 - else enabledBuildersCount; - enabledBuilderName = - if currentBuilder.enable - then currentBuilderName - else enabledBuilderName; - }; - in - if length builderNamesList > nextIndex - then - getBuilder ({ - inherit builderNamesList; - index = nextIndex; - } - // currentState) - else currentState; - - getBuilderResults = getBuilder {}; - builder = tl.build.${getBuilderResults.enabledBuilderName}; - builderArgs = collateArgs.lsp.texlab.build.${getBuilderResults.enabledBuilderName} tl.build; - in - if getBuilderResults.enabledBuildersCount == 0 - then "" - else if getBuilderResults.enabledBuildersCount > 1 - then throw "Texlab does not support having more than 1 builders enabled!" - else '' - build = { - executable = "${builder.package}/bin/${builder.executable}", - args = ${listToLua builderArgs false}, - forwardSearchAfter = ${boolToLua build.forwardSearchAfter}, - onSave = ${boolToLua build.onSave}, - useFileList = ${boolToLua build.useFileList}, - auxDirectory = ${stringToLua build.auxDirectory true}, - logDirectory = ${stringToLua build.logDirectory true}, - pdfDirectory = ${stringToLua build.pdfDirectory true}, - filename = ${stringToLua build.filename true}, - }, - ''; - in (mkIf tl.enable { - vim.lsp.lspconfig.sources.texlab = '' - lspconfig.texlab.setup { - cmd = { "${tl.package}/bin/texlab" }, - settings = { - texlab = { - ${buildConfig} - forwardSearch = { - executable = "${tl.forwardSearch.package}/bin/${tl.forwardSearch.executable}", - args = ${listToLua tl.forwardSearch.args true} - }, - ${tl.extraLuaSettings} - } - } - } - ''; - }) - ) - - # Add other LSPs here - ]) + # // (mkMerge [ + # # ----- Texlab ----- + # ( + # let + # tl = cfg.lsp.texlab; + # build = tl.build; + # + # listToLua = list: nullOnEmpty: + # if length list == 0 + # then + # if nullOnEmpty + # then "null" + # else "{ }" + # else "{ ${concatStringsSep ", " (map (x: ''"${toString x}"'') list)} }"; + # + # stringToLua = string: nullOnEmpty: + # if string == "" + # then + # if nullOnEmpty + # then "null" + # else "" + # else ''"${string}"''; + # + # boolToLua = boolean: + # if boolean + # then "true" + # else "false"; + # + # # -- Build -- + # buildConfig = let + # # This function will sort through the builder options of ...texlab.build and count how many + # # builders have been enabled and get the attrs of the last enabled builder. + # getBuilder = { + # enabledBuildersCount ? 0, + # enabledBuilderName ? "", + # index ? 0, + # builderNamesList ? ( + # filter ( + # x: let + # y = tl.build.${x}; + # in (isAttrs y && hasAttr "enable" y) + # ) (attrNames tl.build) + # ), + # }: let + # currentBuilderName = elemAt builderNamesList index; + # currentBuilder = tl.build.${currentBuilderName}; + # nextIndex = index + 1; + # currentState = { + # enabledBuildersCount = + # if currentBuilder.enable + # then enabledBuildersCount + 1 + # else enabledBuildersCount; + # enabledBuilderName = + # if currentBuilder.enable + # then currentBuilderName + # else enabledBuilderName; + # }; + # in + # if length builderNamesList > nextIndex + # then + # getBuilder ({ + # inherit builderNamesList; + # index = nextIndex; + # } + # // currentState) + # else currentState; + # + # getBuilderResults = getBuilder {}; + # builder = tl.build.${getBuilderResults.enabledBuilderName}; + # builderArgs = collateArgs.lsp.texlab.build.${getBuilderResults.enabledBuilderName} tl.build; + # in + # if getBuilderResults.enabledBuildersCount == 0 + # then "" + # else if getBuilderResults.enabledBuildersCount > 1 + # then throw "Texlab does not support having more than 1 builders enabled!" + # else '' + # build = { + # executable = "${builder.package}/bin/${builder.executable}", + # args = ${listToLua builderArgs false}, + # forwardSearchAfter = ${boolToLua build.forwardSearchAfter}, + # onSave = ${boolToLua build.onSave}, + # useFileList = ${boolToLua build.useFileList}, + # auxDirectory = ${stringToLua build.auxDirectory true}, + # logDirectory = ${stringToLua build.logDirectory true}, + # pdfDirectory = ${stringToLua build.pdfDirectory true}, + # filename = ${stringToLua build.filename true}, + # }, + # ''; + # in (mkIf tl.enable { + # vim.lsp.lspconfig.sources.texlab = '' + # lspconfig.texlab.setup { + # cmd = { "${tl.package}/bin/texlab" }, + # settings = { + # texlab = { + # ${buildConfig} + # forwardSearch = { + # executable = "${tl.forwardSearch.package}/bin/${tl.forwardSearch.executable}", + # args = ${listToLua tl.forwardSearch.args true} + # }, + # ${tl.extraLuaSettings} + # } + # } + # } + # ''; + # }) + # ) + # + # # Add other LSPs here + # ]) ); } diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix new file mode 100644 index 00000000..cd7b85dc --- /dev/null +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -0,0 +1,512 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.modules) mkIf mkMerge; + inherit + (lib.types) + bool + either + enum + ints + listOf + oneOf + package + str + ; + inherit (lib.nvim.types) mkGrammarOption; + inherit + (builtins) + any + attrNames + attrValues + concatLists + concatStringsSep + elem + elemAt + filter + hasAttr + isAttrs + length + map + throw + toString + ; + + cfg = config.vim.languages.tex; + + # --- Enable Options --- + mkEnableDefaultOption = default: description: (mkOption { + type = bool; + default = default; + example = !default; + description = description; + }); + mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; + + # --- Arg Collation Functions -- + collateArgs.lsp.texlab.build = { + tectonic = buildConfig: let + selfConfig = buildConfig.tectonic; + in ( + # Base args + [ + "-X" + "compile" + "%f" + ] + # Flags + ++ ( + if selfConfig.keepIntermediates + then ["--keep-intermediates"] + else [] + ) + ++ ( + if selfConfig.keepLogs + then ["--keep-logs"] + else [] + ) + ++ ( + if selfConfig.onlyCached + then ["--only-cached"] + else [] + ) + ++ ( + if selfConfig.synctex + then ["--synctex"] + else [] + ) + ++ ( + if selfConfig.untrustedInput + then ["--untrusted"] + else [] + ) + # Options + ++ ( + if selfConfig.reruns > 0 + then ["--reruns" "${toString selfConfig.reruns}"] + else [] + ) + ++ ( + if selfConfig.bundle != "" + then ["--bundle" "${toString selfConfig.bundle}"] + else [] + ) + ++ ( + if selfConfig.webBundle != "" + then ["--web-bundle" "${toString selfConfig.webBundle}"] + else [] + ) + ++ ( + if selfConfig.outfmt != "" + then ["--outfmt" "${toString selfConfig.outfmt}"] + else [] + ) + ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) + ++ ( + if selfConfig.format != "" + then ["--format" "${toString selfConfig.format}"] + else [] + ) + ++ ( + if selfConfig.color != "" + then ["--color" "${toString selfConfig.color}"] + else [] + ) + # Still options but these are not defined by builder specific options but + # instead synchronize options between the global build options and builder + # specific options + ++ ( + if !(elem buildConfig.pdfDirectory ["." ""]) + then ["--outdir" "${buildConfig.pdfDirectory}"] + else [] + ) + ); + custom = buildConfig: buildConfig.custom.args; + }; +in { + options.vim.languages.tex.lsp.texlab = { + enable = mkEnableLspOption "Whether to enable Tex LSP support (texlab)"; + + package = mkOption { + type = package; + default = pkgs.texlab; + description = "texlab package"; + }; + + build = { + tectonic = { + enable = mkEnableDefaultOption true "Whether to enable Tex Compilation Via Tectonic"; + + package = mkOption { + type = package; + default = pkgs.tectonic; + description = "tectonic package"; + }; + + executable = mkOption { + type = str; + default = "tectonic"; + description = "The executable name from the build package that will be used to build/compile the tex."; + }; + + # -- Flags -- + keepIntermediates = mkEnableDefaultOption false '' + Keep the intermediate files generated during processing. + + If texlab is reporting build errors when there shouldn't be, disable this option. + ''; + keepLogs = mkEnableDefaultOption true '' + Keep the log files generated during processing. + + Without the keepLogs flag, texlab won't be able to report compilation warnings. + ''; + onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; + synctex = mkEnableDefaultOption true "Generate SyncTeX data"; + untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; + + # -- Options -- + reruns = mkOption { + type = ints.unsigned; + default = 0; + example = 2; + description = "Rerun the TeX engine exactly this many times after the first"; + }; + + bundle = mkOption { + type = str; + default = ""; + description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; + }; + + webBundle = mkOption { + type = str; + default = ""; + description = "Use this URL to find resource files instead of the default"; + }; + + outfmt = mkOption { + type = enum [ + "pdf" + "html" + "xdv" + "aux" + "fmt" + "" + ]; + default = ""; + description = "The kind of output to generate"; + }; + + hidePaths = mkOption { + type = listOf str; + default = []; + example = [ + "./secrets.tex" + "./passwords.tex" + ]; + description = "Tell the engine that no file at exists, if it tries to read it."; + }; + + format = mkOption { + type = str; + default = ""; + description = "The name of the \"format\" file used to initialize the TeX engine"; + }; + + color = mkOption { + type = enum [ + "always" + "auto" + "never" + "" + ]; + default = ""; + example = "always"; + description = "Enable/disable colorful log output"; + }; + + extraOptions = { + type = listOf str; + default = []; + description = '' + Add extra command line options to include in the tectonic build command. + Extra options added here will not overwrite the options set in as nvf options. + ''; + }; + }; + + custom = { + enable = mkEnableDefaultOption false "Whether to enable using a custom build package"; + package = mkOption { + type = package; + default = pkgs.tectonic; + description = "build/compiler package"; + }; + executable = mkOption { + type = str; + default = "tectonic"; + description = "The executable name from the build package that will be used to build/compile the tex."; + }; + args = mkOption { + type = listOf str; + default = [ + "-X" + "compile" + "%f" + "--synctex" + "--keep-logs" + "--keep-intermediates" + ]; + description = '' + Defines additional arguments that are passed to the configured LaTeX build tool. + Note that flags and their arguments need to be separate elements in this array. + To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. + The placeholder `%f` will be replaced by the server. + + Placeholders: + - `%f`: The path of the TeX file to compile. + ''; + }; + }; + + forwardSearchAfter = mkOption { + type = bool; + default = false; + description = "Set this property to true if you want to execute a forward search after a build."; + }; + onSave = mkOption { + type = bool; + default = false; + description = "Set this property to true if you want to compile the project after saving a file."; + }; + useFileList = mkOption { + type = bool; + default = false; + description = '' + When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. + + Note that enabling this property might have an impact on performance. + ''; + }; + auxDirectory = mkOption { + type = str; + default = "."; + description = '' + When not using latexmk, provides a way to define the directory containing the .aux files. + Note that you need to set the aux directory in latex.build.args too. + + When using a latexmkrc file, texlab will automatically infer the correct setting. + ''; + }; + logDirectory = mkOption { + type = str; + default = "."; + description = '' + When not using latexmk, provides a way to define the directory containing the build log files. + Note that you need to change the output directory in your build arguments too. + + When using a latexmkrc file, texlab will automatically infer the correct setting. + ''; + }; + pdfDirectory = mkOption { + type = str; + default = "."; + description = '' + When not using latexmk, provides a way to define the directory containing the output files. + Note that you need to set the output directory in latex.build.args too. + + When using a latexmkrc file, texlab will automatically infer the correct setting. + ''; + }; + filename = mkOption { + type = str; + default = ""; + description = '' + Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. + ''; + }; + }; + + forwardSearch = { + enable = mkOption { + type = bool; + default = false; + example = true; + description = '' + Whether to enable forward search. + + Enable this option if you want to have the compiled document appear in your chosen PDF viewer. + + For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). + Note this is not all the options, but can act as a guide to help you allong with custom configs. + ''; + }; + package = mkOption { + type = package; + default = pkgs.okular; + description = '' + The package to use as your PDF viewer. + This viewer needs to support Synctex. + ''; + }; + executable = mkOption { + type = str; + default = "okular"; + description = '' + Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. + ''; + }; + args = mkOption { + type = listOf str; + default = [ + "--unique" + "file:%p#src:%l%f" + ]; + description = '' + Defines additional arguments that are passed to the configured previewer to perform the forward search. + The placeholders %f, %p, %l will be replaced by the server. + + Placeholders: + - %f: The path of the current TeX file. + - %p: The path of the current PDF file. + - %l: The current line number. + ''; + }; + }; + + extraLuaSettings = mkOption { + type = str; + default = ""; + example = '' + formatterLineLength = 80, + ''; + description = '' + For any options that do not have options provided through nvf this can be used to add them. + Options already declared in nvf config will NOT be overridden. + + Options will be placed in: + ``` + lspconfig.texlab.setup { + settings = { + texlab = { + ... + + ... + + } + } + } + ``` + ''; + }; + }; + + config = mkIf (cfg.enable && (cfg.lsp.texlab.enable)) ( + let + tl = cfg.lsp.texlab; + build = tl.build; + + listToLua = list: nullOnEmpty: + if length list == 0 + then + if nullOnEmpty + then "null" + else "{ }" + else "{ ${concatStringsSep ", " (map (x: ''"${toString x}"'') list)} }"; + + stringToLua = string: nullOnEmpty: + if string == "" + then + if nullOnEmpty + then "null" + else "" + else ''"${string}"''; + + boolToLua = boolean: + if boolean + then "true" + else "false"; + + # -- Build -- + buildConfig = let + # This function will sort through the builder options of ...texlab.build and count how many + # builders have been enabled and get the attrs of the last enabled builder. + getBuilder = { + enabledBuildersCount ? 0, + enabledBuilderName ? "", + index ? 0, + builderNamesList ? ( + filter ( + x: let + y = tl.build.${x}; + in (isAttrs y && hasAttr "enable" y) + ) (attrNames tl.build) + ), + }: let + currentBuilderName = elemAt builderNamesList index; + currentBuilder = tl.build.${currentBuilderName}; + nextIndex = index + 1; + currentState = { + enabledBuildersCount = + if currentBuilder.enable + then enabledBuildersCount + 1 + else enabledBuildersCount; + enabledBuilderName = + if currentBuilder.enable + then currentBuilderName + else enabledBuilderName; + }; + in + if length builderNamesList > nextIndex + then + getBuilder ({ + inherit builderNamesList; + index = nextIndex; + } + // currentState) + else currentState; + + getBuilderResults = getBuilder {}; + builder = tl.build.${getBuilderResults.enabledBuilderName}; + builderArgs = collateArgs.lsp.texlab.build.${getBuilderResults.enabledBuilderName} tl.build; + in + if getBuilderResults.enabledBuildersCount == 0 + then "" + else if getBuilderResults.enabledBuildersCount > 1 + then throw "Texlab does not support having more than 1 builders enabled!" + else '' + build = { + executable = "${builder.package}/bin/${builder.executable}", + args = ${listToLua builderArgs false}, + forwardSearchAfter = ${boolToLua build.forwardSearchAfter}, + onSave = ${boolToLua build.onSave}, + useFileList = ${boolToLua build.useFileList}, + auxDirectory = ${stringToLua build.auxDirectory true}, + logDirectory = ${stringToLua build.logDirectory true}, + pdfDirectory = ${stringToLua build.pdfDirectory true}, + filename = ${stringToLua build.filename true}, + }, + ''; + in { + vim.lsp.lspconfig.sources.texlab = '' + lspconfig.texlab.setup { + cmd = { "${tl.package}/bin/texlab" }, + settings = { + texlab = { + ${buildConfig} + forwardSearch = { + executable = "${tl.forwardSearch.package}/bin/${tl.forwardSearch.executable}", + args = ${listToLua tl.forwardSearch.args true} + }, + ${tl.extraLuaSettings} + } + } + } + ''; + } + ); +} From 48674a46fa8134232b70412566f96f9e276b278f Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 23 Jan 2025 17:05:25 -0700 Subject: [PATCH 17/76] Cleanup residue from modularization --- modules/plugins/languages/tex/default.nix | 563 +----------------- modules/plugins/languages/tex/lsp/default.nix | 523 +--------------- modules/plugins/languages/tex/lsp/texlab.nix | 22 +- modules/plugins/languages/tex/treesitter.nix | 13 +- 4 files changed, 27 insertions(+), 1094 deletions(-) diff --git a/modules/plugins/languages/tex/default.nix b/modules/plugins/languages/tex/default.nix index 116403d1..944f43f2 100644 --- a/modules/plugins/languages/tex/default.nix +++ b/modules/plugins/languages/tex/default.nix @@ -1,148 +1,14 @@ -# TODO: -# - Add Texlab LSP settings: -# - chktex -# - diagnosticsDelay -# - diagnostics -# - symbols -# - formatterLineLength -# - bibtexFormatter -# - latexFormatter -# - latexindent -# - completion -# - inlayHints -# - experimental { config, - pkgs, lib, ... }: let - inherit (lib.options) mkEnableOption mkOption; inherit (lib.modules) mkIf mkMerge; - inherit - (lib.types) - bool - either - enum - ints - listOf - oneOf - package - str - ; - inherit (lib.nvim.types) mkGrammarOption; - inherit - (builtins) - any - attrNames - attrValues - concatLists - concatStringsSep - elem - elemAt - filter - hasAttr - isAttrs - length - map - throw - toString - ; + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.types) bool str; cfg = config.vim.languages.tex; - - # --- Enable Options --- - # mkEnableDefaultOption = default: description: (mkOption { - # type = bool; - # default = default; - # example = !default; - # description = description; - # }); - # mkEnableTreesitterOption = mkEnableDefaultOption config.vim.languages.enableTreesitter; - # mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; - - # # --- Arg Collation Functions -- - # collateArgs.lsp.texlab.build = { - # tectonic = buildConfig: let - # selfConfig = buildConfig.tectonic; - # in ( - # # Base args - # [ - # "-X" - # "compile" - # "%f" - # ] - # # Flags - # ++ ( - # if selfConfig.keepIntermediates - # then ["--keep-intermediates"] - # else [] - # ) - # ++ ( - # if selfConfig.keepLogs - # then ["--keep-logs"] - # else [] - # ) - # ++ ( - # if selfConfig.onlyCached - # then ["--only-cached"] - # else [] - # ) - # ++ ( - # if selfConfig.synctex - # then ["--synctex"] - # else [] - # ) - # ++ ( - # if selfConfig.untrustedInput - # then ["--untrusted"] - # else [] - # ) - # # Options - # ++ ( - # if selfConfig.reruns > 0 - # then ["--reruns" "${toString selfConfig.reruns}"] - # else [] - # ) - # ++ ( - # if selfConfig.bundle != "" - # then ["--bundle" "${toString selfConfig.bundle}"] - # else [] - # ) - # ++ ( - # if selfConfig.webBundle != "" - # then ["--web-bundle" "${toString selfConfig.webBundle}"] - # else [] - # ) - # ++ ( - # if selfConfig.outfmt != "" - # then ["--outfmt" "${toString selfConfig.outfmt}"] - # else [] - # ) - # ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) - # ++ ( - # if selfConfig.format != "" - # then ["--format" "${toString selfConfig.format}"] - # else [] - # ) - # ++ ( - # if selfConfig.color != "" - # then ["--color" "${toString selfConfig.color}"] - # else [] - # ) - # # Still options but these are not defined by builder specific options but - # # instead synchronize options between the global build options and builder - # # specific options - # ++ ( - # if !(elem buildConfig.pdfDirectory ["." ""]) - # then ["--outdir" "${buildConfig.pdfDirectory}"] - # else [] - # ) - # ); - # custom = buildConfig: buildConfig.custom.args; - # }; in { - imports = [ ./treesitter.nix ./lsp @@ -151,305 +17,6 @@ in { options.vim.languages.tex = { enable = mkEnableOption "Tex support"; - # # Treesitter options for latex and bibtex flavours of tex. - # treesitter = { - # latex = { - # enable = mkEnableTreesitterOption "Whether to enable Latex treesitter"; - # package = mkGrammarOption pkgs "latex"; - # }; - # bibtex = { - # enable = mkEnableTreesitterOption "Whether to enable Bibtex treesitter"; - # package = mkGrammarOption pkgs "bibtex"; - # }; - # }; - - # LSP options - # Because tex LSPs also including building/compiling tex, they have - # more options that are only specific to them and thus it makes - # more sense to group one into its own group of options. - # - # Each lsp group must have an enable option of its own. - # lsp = { - # texlab = { - # enable = mkEnableLspOption "Whether to enable Tex LSP support (texlab)"; - # - # package = mkOption { - # type = package; - # default = pkgs.texlab; - # description = "texlab package"; - # }; - # - # build = { - # tectonic = { - # enable = mkEnableDefaultOption true "Whether to enable Tex Compilation Via Tectonic"; - # - # package = mkOption { - # type = package; - # default = pkgs.tectonic; - # description = "tectonic package"; - # }; - # - # executable = mkOption { - # type = str; - # default = "tectonic"; - # description = "The executable name from the build package that will be used to build/compile the tex."; - # }; - # - # # -- Flags -- - # keepIntermediates = mkEnableDefaultOption false '' - # Keep the intermediate files generated during processing. - # - # If texlab is reporting build errors when there shouldn't be, disable this option. - # ''; - # keepLogs = mkEnableDefaultOption true '' - # Keep the log files generated during processing. - # - # Without the keepLogs flag, texlab won't be able to report compilation warnings. - # ''; - # onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; - # synctex = mkEnableDefaultOption true "Generate SyncTeX data"; - # untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; - # - # # -- Options -- - # reruns = mkOption { - # type = ints.unsigned; - # default = 0; - # example = 2; - # description = "Rerun the TeX engine exactly this many times after the first"; - # }; - # - # bundle = mkOption { - # type = str; - # default = ""; - # description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; - # }; - # - # webBundle = mkOption { - # type = str; - # default = ""; - # description = "Use this URL to find resource files instead of the default"; - # }; - # - # outfmt = mkOption { - # type = enum [ - # "pdf" - # "html" - # "xdv" - # "aux" - # "fmt" - # "" - # ]; - # default = ""; - # description = "The kind of output to generate"; - # }; - # - # hidePaths = mkOption { - # type = listOf str; - # default = []; - # example = [ - # "./secrets.tex" - # "./passwords.tex" - # ]; - # description = "Tell the engine that no file at exists, if it tries to read it."; - # }; - # - # format = mkOption { - # type = str; - # default = ""; - # description = "The name of the \"format\" file used to initialize the TeX engine"; - # }; - # - # color = mkOption { - # type = enum [ - # "always" - # "auto" - # "never" - # "" - # ]; - # default = ""; - # example = "always"; - # description = "Enable/disable colorful log output"; - # }; - # - # extraOptions = { - # type = listOf str; - # default = []; - # description = '' - # Add extra command line options to include in the tectonic build command. - # Extra options added here will not overwrite the options set in as nvf options. - # ''; - # }; - # }; - # - # custom = { - # enable = mkEnableDefaultOption false "Whether to enable using a custom build package"; - # package = mkOption { - # type = package; - # default = pkgs.tectonic; - # description = "build/compiler package"; - # }; - # executable = mkOption { - # type = str; - # default = "tectonic"; - # description = "The executable name from the build package that will be used to build/compile the tex."; - # }; - # args = mkOption { - # type = listOf str; - # default = [ - # "-X" - # "compile" - # "%f" - # "--synctex" - # "--keep-logs" - # "--keep-intermediates" - # ]; - # description = '' - # Defines additional arguments that are passed to the configured LaTeX build tool. - # Note that flags and their arguments need to be separate elements in this array. - # To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. - # The placeholder `%f` will be replaced by the server. - # - # Placeholders: - # - `%f`: The path of the TeX file to compile. - # ''; - # }; - # }; - # - # forwardSearchAfter = mkOption { - # type = bool; - # default = false; - # description = "Set this property to true if you want to execute a forward search after a build."; - # }; - # onSave = mkOption { - # type = bool; - # default = false; - # description = "Set this property to true if you want to compile the project after saving a file."; - # }; - # useFileList = mkOption { - # type = bool; - # default = false; - # description = '' - # When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. - # - # Note that enabling this property might have an impact on performance. - # ''; - # }; - # auxDirectory = mkOption { - # type = str; - # default = "."; - # description = '' - # When not using latexmk, provides a way to define the directory containing the .aux files. - # Note that you need to set the aux directory in latex.build.args too. - # - # When using a latexmkrc file, texlab will automatically infer the correct setting. - # ''; - # }; - # logDirectory = mkOption { - # type = str; - # default = "."; - # description = '' - # When not using latexmk, provides a way to define the directory containing the build log files. - # Note that you need to change the output directory in your build arguments too. - # - # When using a latexmkrc file, texlab will automatically infer the correct setting. - # ''; - # }; - # pdfDirectory = mkOption { - # type = str; - # default = "."; - # description = '' - # When not using latexmk, provides a way to define the directory containing the output files. - # Note that you need to set the output directory in latex.build.args too. - # - # When using a latexmkrc file, texlab will automatically infer the correct setting. - # ''; - # }; - # filename = mkOption { - # type = str; - # default = ""; - # description = '' - # Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. - # ''; - # }; - # }; - # - # forwardSearch = { - # enable = mkOption { - # type = bool; - # default = false; - # example = true; - # description = '' - # Whether to enable forward search. - # - # Enable this option if you want to have the compiled document appear in your chosen PDF viewer. - # - # For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). - # Note this is not all the options, but can act as a guide to help you allong with custom configs. - # ''; - # }; - # package = mkOption { - # type = package; - # default = pkgs.okular; - # description = '' - # The package to use as your PDF viewer. - # This viewer needs to support Synctex. - # ''; - # }; - # executable = mkOption { - # type = str; - # default = "okular"; - # description = '' - # Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. - # ''; - # }; - # args = mkOption { - # type = listOf str; - # default = [ - # "--unique" - # "file:%p#src:%l%f" - # ]; - # description = '' - # Defines additional arguments that are passed to the configured previewer to perform the forward search. - # The placeholders %f, %p, %l will be replaced by the server. - # - # Placeholders: - # - %f: The path of the current TeX file. - # - %p: The path of the current PDF file. - # - %l: The current line number. - # ''; - # }; - # }; - # - # extraLuaSettings = mkOption { - # type = str; - # default = ""; - # example = '' - # formatterLineLength = 80, - # ''; - # description = '' - # For any options that do not have options provided through nvf this can be used to add them. - # Options already declared in nvf config will NOT be overridden. - # - # Options will be placed in: - # ``` - # lspconfig.texlab.setup { - # settings = { - # texlab = { - # ... - # - # ... - # - # } - # } - # } - # ``` - # ''; - # }; - # }; - # - # # Add other LSPs here - # }; - extraOpts = { texFlavor = { enable = mkOption { @@ -491,132 +58,6 @@ in { }; config = mkIf cfg.enable (mkMerge [ - # # Treesitter - # (mkIf cfg.treesitter.latex.enable { - # vim.treesitter.enable = true; - # vim.treesitter.grammars = [cfg.treesitter.latex.package]; - # }) - # (mkIf cfg.treesitter.bibtex.enable { - # vim.treesitter.enable = true; - # vim.treesitter.grammars = [cfg.treesitter.bibtex.package]; - # }) - - # LSP - # (mkIf (any (x: x.enable) (attrValues cfg.lsp)) ( - # { - # vim.lsp.lspconfig.enable = true; - # } # Enable lspconfig when any of the lsps are enabled - # // (mkMerge [ - # # ----- Texlab ----- - # ( - # let - # tl = cfg.lsp.texlab; - # build = tl.build; - # - # listToLua = list: nullOnEmpty: - # if length list == 0 - # then - # if nullOnEmpty - # then "null" - # else "{ }" - # else "{ ${concatStringsSep ", " (map (x: ''"${toString x}"'') list)} }"; - # - # stringToLua = string: nullOnEmpty: - # if string == "" - # then - # if nullOnEmpty - # then "null" - # else "" - # else ''"${string}"''; - # - # boolToLua = boolean: - # if boolean - # then "true" - # else "false"; - # - # # -- Build -- - # buildConfig = let - # # This function will sort through the builder options of ...texlab.build and count how many - # # builders have been enabled and get the attrs of the last enabled builder. - # getBuilder = { - # enabledBuildersCount ? 0, - # enabledBuilderName ? "", - # index ? 0, - # builderNamesList ? ( - # filter ( - # x: let - # y = tl.build.${x}; - # in (isAttrs y && hasAttr "enable" y) - # ) (attrNames tl.build) - # ), - # }: let - # currentBuilderName = elemAt builderNamesList index; - # currentBuilder = tl.build.${currentBuilderName}; - # nextIndex = index + 1; - # currentState = { - # enabledBuildersCount = - # if currentBuilder.enable - # then enabledBuildersCount + 1 - # else enabledBuildersCount; - # enabledBuilderName = - # if currentBuilder.enable - # then currentBuilderName - # else enabledBuilderName; - # }; - # in - # if length builderNamesList > nextIndex - # then - # getBuilder ({ - # inherit builderNamesList; - # index = nextIndex; - # } - # // currentState) - # else currentState; - # - # getBuilderResults = getBuilder {}; - # builder = tl.build.${getBuilderResults.enabledBuilderName}; - # builderArgs = collateArgs.lsp.texlab.build.${getBuilderResults.enabledBuilderName} tl.build; - # in - # if getBuilderResults.enabledBuildersCount == 0 - # then "" - # else if getBuilderResults.enabledBuildersCount > 1 - # then throw "Texlab does not support having more than 1 builders enabled!" - # else '' - # build = { - # executable = "${builder.package}/bin/${builder.executable}", - # args = ${listToLua builderArgs false}, - # forwardSearchAfter = ${boolToLua build.forwardSearchAfter}, - # onSave = ${boolToLua build.onSave}, - # useFileList = ${boolToLua build.useFileList}, - # auxDirectory = ${stringToLua build.auxDirectory true}, - # logDirectory = ${stringToLua build.logDirectory true}, - # pdfDirectory = ${stringToLua build.pdfDirectory true}, - # filename = ${stringToLua build.filename true}, - # }, - # ''; - # in (mkIf tl.enable { - # vim.lsp.lspconfig.sources.texlab = '' - # lspconfig.texlab.setup { - # cmd = { "${tl.package}/bin/texlab" }, - # settings = { - # texlab = { - # ${buildConfig} - # forwardSearch = { - # executable = "${tl.forwardSearch.package}/bin/${tl.forwardSearch.executable}", - # args = ${listToLua tl.forwardSearch.args true} - # }, - # ${tl.extraLuaSettings} - # } - # } - # } - # ''; - # }) - # ) - # - # # Add other LSPs here - # ]) - # )) - # Extra Lua config options (mkIf cfg.extraOpts.texFlavor.enable { vim.globals.tex_flavor = "${cfg.extraOpts.texFlavor.flavor}"; diff --git a/modules/plugins/languages/tex/lsp/default.nix b/modules/plugins/languages/tex/lsp/default.nix index ffffe5cf..affb272a 100644 --- a/modules/plugins/languages/tex/lsp/default.nix +++ b/modules/plugins/languages/tex/lsp/default.nix @@ -1,531 +1,18 @@ { config, - pkgs, lib, ... }: let - inherit (lib.options) mkEnableOption mkOption; - inherit (lib.modules) mkIf mkMerge; - inherit - (lib.types) - bool - either - enum - ints - listOf - oneOf - package - str - ; - inherit (lib.nvim.types) mkGrammarOption; - inherit - (builtins) - any - attrNames - attrValues - concatLists - concatStringsSep - elem - elemAt - filter - hasAttr - isAttrs - length - map - throw - toString - ; + inherit (lib.modules) mkIf; + inherit (builtins) any attrValues; cfg = config.vim.languages.tex; - - # --- Enable Options --- - # mkEnableDefaultOption = default: description: (mkOption { - # type = bool; - # default = default; - # example = !default; - # description = description; - # }); - # mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; - - # # --- Arg Collation Functions -- - # collateArgs.lsp.texlab.build = { - # tectonic = buildConfig: let - # selfConfig = buildConfig.tectonic; - # in ( - # # Base args - # [ - # "-X" - # "compile" - # "%f" - # ] - # # Flags - # ++ ( - # if selfConfig.keepIntermediates - # then ["--keep-intermediates"] - # else [] - # ) - # ++ ( - # if selfConfig.keepLogs - # then ["--keep-logs"] - # else [] - # ) - # ++ ( - # if selfConfig.onlyCached - # then ["--only-cached"] - # else [] - # ) - # ++ ( - # if selfConfig.synctex - # then ["--synctex"] - # else [] - # ) - # ++ ( - # if selfConfig.untrustedInput - # then ["--untrusted"] - # else [] - # ) - # # Options - # ++ ( - # if selfConfig.reruns > 0 - # then ["--reruns" "${toString selfConfig.reruns}"] - # else [] - # ) - # ++ ( - # if selfConfig.bundle != "" - # then ["--bundle" "${toString selfConfig.bundle}"] - # else [] - # ) - # ++ ( - # if selfConfig.webBundle != "" - # then ["--web-bundle" "${toString selfConfig.webBundle}"] - # else [] - # ) - # ++ ( - # if selfConfig.outfmt != "" - # then ["--outfmt" "${toString selfConfig.outfmt}"] - # else [] - # ) - # ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) - # ++ ( - # if selfConfig.format != "" - # then ["--format" "${toString selfConfig.format}"] - # else [] - # ) - # ++ ( - # if selfConfig.color != "" - # then ["--color" "${toString selfConfig.color}"] - # else [] - # ) - # # Still options but these are not defined by builder specific options but - # # instead synchronize options between the global build options and builder - # # specific options - # ++ ( - # if !(elem buildConfig.pdfDirectory ["." ""]) - # then ["--outdir" "${buildConfig.pdfDirectory}"] - # else [] - # ) - # ); - # custom = buildConfig: buildConfig.custom.args; - # }; in { imports = [ ./texlab.nix ]; - # options.vim.languages.tex.lsp = { - # texlab = { - # enable = mkEnableLspOption "Whether to enable Tex LSP support (texlab)"; - # - # package = mkOption { - # type = package; - # default = pkgs.texlab; - # description = "texlab package"; - # }; - # - # build = { - # tectonic = { - # enable = mkEnableDefaultOption true "Whether to enable Tex Compilation Via Tectonic"; - # - # package = mkOption { - # type = package; - # default = pkgs.tectonic; - # description = "tectonic package"; - # }; - # - # executable = mkOption { - # type = str; - # default = "tectonic"; - # description = "The executable name from the build package that will be used to build/compile the tex."; - # }; - # - # # -- Flags -- - # keepIntermediates = mkEnableDefaultOption false '' - # Keep the intermediate files generated during processing. - # - # If texlab is reporting build errors when there shouldn't be, disable this option. - # ''; - # keepLogs = mkEnableDefaultOption true '' - # Keep the log files generated during processing. - # - # Without the keepLogs flag, texlab won't be able to report compilation warnings. - # ''; - # onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; - # synctex = mkEnableDefaultOption true "Generate SyncTeX data"; - # untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; - # - # # -- Options -- - # reruns = mkOption { - # type = ints.unsigned; - # default = 0; - # example = 2; - # description = "Rerun the TeX engine exactly this many times after the first"; - # }; - # - # bundle = mkOption { - # type = str; - # default = ""; - # description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; - # }; - # - # webBundle = mkOption { - # type = str; - # default = ""; - # description = "Use this URL to find resource files instead of the default"; - # }; - # - # outfmt = mkOption { - # type = enum [ - # "pdf" - # "html" - # "xdv" - # "aux" - # "fmt" - # "" - # ]; - # default = ""; - # description = "The kind of output to generate"; - # }; - # - # hidePaths = mkOption { - # type = listOf str; - # default = []; - # example = [ - # "./secrets.tex" - # "./passwords.tex" - # ]; - # description = "Tell the engine that no file at exists, if it tries to read it."; - # }; - # - # format = mkOption { - # type = str; - # default = ""; - # description = "The name of the \"format\" file used to initialize the TeX engine"; - # }; - # - # color = mkOption { - # type = enum [ - # "always" - # "auto" - # "never" - # "" - # ]; - # default = ""; - # example = "always"; - # description = "Enable/disable colorful log output"; - # }; - # - # extraOptions = { - # type = listOf str; - # default = []; - # description = '' - # Add extra command line options to include in the tectonic build command. - # Extra options added here will not overwrite the options set in as nvf options. - # ''; - # }; - # }; - # - # custom = { - # enable = mkEnableDefaultOption false "Whether to enable using a custom build package"; - # package = mkOption { - # type = package; - # default = pkgs.tectonic; - # description = "build/compiler package"; - # }; - # executable = mkOption { - # type = str; - # default = "tectonic"; - # description = "The executable name from the build package that will be used to build/compile the tex."; - # }; - # args = mkOption { - # type = listOf str; - # default = [ - # "-X" - # "compile" - # "%f" - # "--synctex" - # "--keep-logs" - # "--keep-intermediates" - # ]; - # description = '' - # Defines additional arguments that are passed to the configured LaTeX build tool. - # Note that flags and their arguments need to be separate elements in this array. - # To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. - # The placeholder `%f` will be replaced by the server. - # - # Placeholders: - # - `%f`: The path of the TeX file to compile. - # ''; - # }; - # }; - # - # forwardSearchAfter = mkOption { - # type = bool; - # default = false; - # description = "Set this property to true if you want to execute a forward search after a build."; - # }; - # onSave = mkOption { - # type = bool; - # default = false; - # description = "Set this property to true if you want to compile the project after saving a file."; - # }; - # useFileList = mkOption { - # type = bool; - # default = false; - # description = '' - # When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. - # - # Note that enabling this property might have an impact on performance. - # ''; - # }; - # auxDirectory = mkOption { - # type = str; - # default = "."; - # description = '' - # When not using latexmk, provides a way to define the directory containing the .aux files. - # Note that you need to set the aux directory in latex.build.args too. - # - # When using a latexmkrc file, texlab will automatically infer the correct setting. - # ''; - # }; - # logDirectory = mkOption { - # type = str; - # default = "."; - # description = '' - # When not using latexmk, provides a way to define the directory containing the build log files. - # Note that you need to change the output directory in your build arguments too. - # - # When using a latexmkrc file, texlab will automatically infer the correct setting. - # ''; - # }; - # pdfDirectory = mkOption { - # type = str; - # default = "."; - # description = '' - # When not using latexmk, provides a way to define the directory containing the output files. - # Note that you need to set the output directory in latex.build.args too. - # - # When using a latexmkrc file, texlab will automatically infer the correct setting. - # ''; - # }; - # filename = mkOption { - # type = str; - # default = ""; - # description = '' - # Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. - # ''; - # }; - # }; - # - # forwardSearch = { - # enable = mkOption { - # type = bool; - # default = false; - # example = true; - # description = '' - # Whether to enable forward search. - # - # Enable this option if you want to have the compiled document appear in your chosen PDF viewer. - # - # For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). - # Note this is not all the options, but can act as a guide to help you allong with custom configs. - # ''; - # }; - # package = mkOption { - # type = package; - # default = pkgs.okular; - # description = '' - # The package to use as your PDF viewer. - # This viewer needs to support Synctex. - # ''; - # }; - # executable = mkOption { - # type = str; - # default = "okular"; - # description = '' - # Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. - # ''; - # }; - # args = mkOption { - # type = listOf str; - # default = [ - # "--unique" - # "file:%p#src:%l%f" - # ]; - # description = '' - # Defines additional arguments that are passed to the configured previewer to perform the forward search. - # The placeholders %f, %p, %l will be replaced by the server. - # - # Placeholders: - # - %f: The path of the current TeX file. - # - %p: The path of the current PDF file. - # - %l: The current line number. - # ''; - # }; - # }; - # - # extraLuaSettings = mkOption { - # type = str; - # default = ""; - # example = '' - # formatterLineLength = 80, - # ''; - # description = '' - # For any options that do not have options provided through nvf this can be used to add them. - # Options already declared in nvf config will NOT be overridden. - # - # Options will be placed in: - # ``` - # lspconfig.texlab.setup { - # settings = { - # texlab = { - # ... - # - # ... - # - # } - # } - # } - # ``` - # ''; - # }; - # }; - # Add other LSPs here - # }; - - # config = mkIf cfg.enable (mkMerge [ - # (mkIf (any (x: x.enable) (attrValues cfg.lsp)) ( - config = mkIf (cfg.enable && (any (x: x.enable) (attrValues cfg.lsp))) ( - { - vim.lsp.lspconfig.enable = true; - } # Enable lspconfig when any of the lsps are enabled - # // (mkMerge [ - # # ----- Texlab ----- - # ( - # let - # tl = cfg.lsp.texlab; - # build = tl.build; - # - # listToLua = list: nullOnEmpty: - # if length list == 0 - # then - # if nullOnEmpty - # then "null" - # else "{ }" - # else "{ ${concatStringsSep ", " (map (x: ''"${toString x}"'') list)} }"; - # - # stringToLua = string: nullOnEmpty: - # if string == "" - # then - # if nullOnEmpty - # then "null" - # else "" - # else ''"${string}"''; - # - # boolToLua = boolean: - # if boolean - # then "true" - # else "false"; - # - # # -- Build -- - # buildConfig = let - # # This function will sort through the builder options of ...texlab.build and count how many - # # builders have been enabled and get the attrs of the last enabled builder. - # getBuilder = { - # enabledBuildersCount ? 0, - # enabledBuilderName ? "", - # index ? 0, - # builderNamesList ? ( - # filter ( - # x: let - # y = tl.build.${x}; - # in (isAttrs y && hasAttr "enable" y) - # ) (attrNames tl.build) - # ), - # }: let - # currentBuilderName = elemAt builderNamesList index; - # currentBuilder = tl.build.${currentBuilderName}; - # nextIndex = index + 1; - # currentState = { - # enabledBuildersCount = - # if currentBuilder.enable - # then enabledBuildersCount + 1 - # else enabledBuildersCount; - # enabledBuilderName = - # if currentBuilder.enable - # then currentBuilderName - # else enabledBuilderName; - # }; - # in - # if length builderNamesList > nextIndex - # then - # getBuilder ({ - # inherit builderNamesList; - # index = nextIndex; - # } - # // currentState) - # else currentState; - # - # getBuilderResults = getBuilder {}; - # builder = tl.build.${getBuilderResults.enabledBuilderName}; - # builderArgs = collateArgs.lsp.texlab.build.${getBuilderResults.enabledBuilderName} tl.build; - # in - # if getBuilderResults.enabledBuildersCount == 0 - # then "" - # else if getBuilderResults.enabledBuildersCount > 1 - # then throw "Texlab does not support having more than 1 builders enabled!" - # else '' - # build = { - # executable = "${builder.package}/bin/${builder.executable}", - # args = ${listToLua builderArgs false}, - # forwardSearchAfter = ${boolToLua build.forwardSearchAfter}, - # onSave = ${boolToLua build.onSave}, - # useFileList = ${boolToLua build.useFileList}, - # auxDirectory = ${stringToLua build.auxDirectory true}, - # logDirectory = ${stringToLua build.logDirectory true}, - # pdfDirectory = ${stringToLua build.pdfDirectory true}, - # filename = ${stringToLua build.filename true}, - # }, - # ''; - # in (mkIf tl.enable { - # vim.lsp.lspconfig.sources.texlab = '' - # lspconfig.texlab.setup { - # cmd = { "${tl.package}/bin/texlab" }, - # settings = { - # texlab = { - # ${buildConfig} - # forwardSearch = { - # executable = "${tl.forwardSearch.package}/bin/${tl.forwardSearch.executable}", - # args = ${listToLua tl.forwardSearch.args true} - # }, - # ${tl.extraLuaSettings} - # } - # } - # } - # ''; - # }) - # ) - # - # # Add other LSPs here - # ]) - ); + config = mkIf (cfg.enable && (any (x: x.enable) (attrValues cfg.lsp))) { + vim.lsp.lspconfig.enable = true; # Enable lspconfig when any of the lsps are enabled + }; } diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index cd7b85dc..0f21aa3a 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -1,28 +1,36 @@ +# TODO: +# - Add Texlab LSP settings: +# - chktex +# - diagnosticsDelay +# - diagnostics +# - symbols +# - formatterLineLength +# - bibtexFormatter +# - latexFormatter +# - latexindent +# - completion +# - inlayHints +# - experimental { config, pkgs, lib, ... }: let - inherit (lib.options) mkEnableOption mkOption; - inherit (lib.modules) mkIf mkMerge; + inherit (lib.options) mkOption; + inherit (lib.modules) mkIf; inherit (lib.types) bool - either enum ints listOf - oneOf package str ; - inherit (lib.nvim.types) mkGrammarOption; inherit (builtins) - any attrNames - attrValues concatLists concatStringsSep elem diff --git a/modules/plugins/languages/tex/treesitter.nix b/modules/plugins/languages/tex/treesitter.nix index 3b70165e..44459afb 100644 --- a/modules/plugins/languages/tex/treesitter.nix +++ b/modules/plugins/languages/tex/treesitter.nix @@ -3,18 +3,15 @@ pkgs, lib, ... -}: -let +}: let inherit (lib.options) mkEnableOption; inherit (lib.modules) mkIf mkMerge; inherit (lib.nvim.types) mkGrammarOption; cfg = config.vim.languages.tex; - mkEnableTreesitterOption = - description: mkEnableOption description // { default = config.vim.languages.enableTreesitter; }; -in -{ + mkEnableTreesitterOption = description: mkEnableOption description // {default = config.vim.languages.enableTreesitter;}; +in { options.vim.languages.tex.treesitter = { latex = { enable = mkEnableTreesitterOption "Whether to enable Latex treesitter"; @@ -29,11 +26,11 @@ in config = mkIf cfg.enable (mkMerge [ (mkIf cfg.treesitter.latex.enable { vim.treesitter.enable = true; - vim.treesitter.grammars = [ cfg.treesitter.latex.package ]; + vim.treesitter.grammars = [cfg.treesitter.latex.package]; }) (mkIf cfg.treesitter.bibtex.enable { vim.treesitter.enable = true; - vim.treesitter.grammars = [ cfg.treesitter.bibtex.package ]; + vim.treesitter.grammars = [cfg.treesitter.bibtex.package]; }) ]); } From 44959a0c8af7ee0dea46dded0e560a657a8400a8 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 23 Jan 2025 19:35:00 -0700 Subject: [PATCH 18/76] Created build module --- .../languages/tex/build/builders/custom.nix | 86 +++ .../languages/tex/build/builders/default.nix | 65 ++ .../languages/tex/build/builders/tectonic.nix | 231 +++++++ .../plugins/languages/tex/build/default.nix | 107 +++ modules/plugins/languages/tex/default.nix | 1 + modules/plugins/languages/tex/lsp/texlab.nix | 632 +++++++++--------- 6 files changed, 820 insertions(+), 302 deletions(-) create mode 100644 modules/plugins/languages/tex/build/builders/custom.nix create mode 100644 modules/plugins/languages/tex/build/builders/default.nix create mode 100644 modules/plugins/languages/tex/build/builders/tectonic.nix create mode 100644 modules/plugins/languages/tex/build/default.nix diff --git a/modules/plugins/languages/tex/build/builders/custom.nix b/modules/plugins/languages/tex/build/builders/custom.nix new file mode 100644 index 00000000..680d37a9 --- /dev/null +++ b/modules/plugins/languages/tex/build/builders/custom.nix @@ -0,0 +1,86 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib.options) mkOption; + inherit (lib.modules) mkIf; + inherit + (lib.types) + bool + enum + ints + listOf + package + str + ; + inherit + (builtins) + attrNames + concatLists + concatStringsSep + elem + elemAt + filter + hasAttr + isAttrs + length + map + throw + toString + ; + + cfg = config.vim.languages.tex; + + # --- Enable Options --- + mkEnableDefaultOption = default: description: (mkOption { + type = bool; + default = default; + example = !default; + description = description; + }); + + collateArgs = buildConfig: buildConfig.builders.custom.args; +in { + options.vim.languages.tex.build.builders.custom = { + enable = mkEnableDefaultOption false "Whether to enable using a custom build package"; + package = mkOption { + type = package; + default = pkgs.tectonic; + description = "build/compiler package"; + }; + executable = mkOption { + type = str; + default = "tectonic"; + description = "The executable name from the build package that will be used to build/compile the tex."; + }; + args = mkOption { + type = listOf str; + default = [ + "-X" + "compile" + "%f" + "--synctex" + "--keep-logs" + "--keep-intermediates" + ]; + description = '' + Defines additional arguments that are passed to the configured LaTeX build tool. + Note that flags and their arguments need to be separate elements in this array. + To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. + The placeholder `%f` will be replaced by the server. + + Placeholders: + - `%f`: The path of the TeX file to compile. + ''; + }; + }; + + config = mkIf (cfg.enable && cfg.build.builders.custom.enable) { + vim.languages.tex.build.builder = { + name = "custom"; + args = collateArgs cfg.build; + }; + }; +} diff --git a/modules/plugins/languages/tex/build/builders/default.nix b/modules/plugins/languages/tex/build/builders/default.nix new file mode 100644 index 00000000..da00fbdb --- /dev/null +++ b/modules/plugins/languages/tex/build/builders/default.nix @@ -0,0 +1,65 @@ +{ + config, + pkgs, + lib, + ... +}: +let + inherit (lib.options) mkOption mkEnableOption; + inherit + (lib.types) + bool + enum + ints + listOf + package + str + ; + inherit + (builtins) + attrNames + concatLists + concatStringsSep + elem + elemAt + filter + hasAttr + isAttrs + length + map + throw + toString + ; + + cfg = config.vim.languages.tex; +in +{ + imports = [ + ./custom.nix + ./tectonic.nix + ]; + + options.vim.languages.tex.build.builder = { + name = mkOption { + type = enum (attrNames cfg.build.builders); + default = "tectonic"; + description = "The tex builder to use"; + }; + args = mkOption { + type = listOf str; + default = []; + description = "The list of args to pass to the builder"; + }; + package = mkOption { + type = package; + default = cfg.build.builders.tectonic.package; + description = "The tex builder package to use"; + }; + executable = mkOption { + type = str; + default = cfg.build.builders.tectonic.executable; + description = "The tex builder executable to use"; + }; + }; +} + diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix b/modules/plugins/languages/tex/build/builders/tectonic.nix new file mode 100644 index 00000000..0ec8bea0 --- /dev/null +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix @@ -0,0 +1,231 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.modules) mkIf; + inherit + (lib.types) + bool + enum + ints + listOf + package + str + ; + inherit + (builtins) + attrNames + concatLists + concatStringsSep + elem + elemAt + filter + hasAttr + isAttrs + length + map + throw + toString + ; + + cfg = config.vim.languages.tex; + + # --- Enable Options --- + mkEnableDefaultOption = default: description: (mkOption { + type = bool; + default = default; + example = !default; + description = description; + }); + mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; + + # --- Arg Collation Functions -- + collateArgs = buildConfig: let + selfConfig = buildConfig.builders.tectonic; + in ( + # Base args + [ + "-X" + "compile" + "%f" + ] + # Flags + ++ ( + if selfConfig.keepIntermediates + then ["--keep-intermediates"] + else [] + ) + ++ ( + if selfConfig.keepLogs + then ["--keep-logs"] + else [] + ) + ++ ( + if selfConfig.onlyCached + then ["--only-cached"] + else [] + ) + ++ ( + if selfConfig.synctex + then ["--synctex"] + else [] + ) + ++ ( + if selfConfig.untrustedInput + then ["--untrusted"] + else [] + ) + # Options + ++ ( + if selfConfig.reruns > 0 + then ["--reruns" "${toString selfConfig.reruns}"] + else [] + ) + ++ ( + if selfConfig.bundle != "" + then ["--bundle" "${toString selfConfig.bundle}"] + else [] + ) + ++ ( + if selfConfig.webBundle != "" + then ["--web-bundle" "${toString selfConfig.webBundle}"] + else [] + ) + ++ ( + if selfConfig.outfmt != "" + then ["--outfmt" "${toString selfConfig.outfmt}"] + else [] + ) + ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) + ++ ( + if selfConfig.format != "" + then ["--format" "${toString selfConfig.format}"] + else [] + ) + ++ ( + if selfConfig.color != "" + then ["--color" "${toString selfConfig.color}"] + else [] + ) + # Still options but these are not defined by builder specific options but + # instead synchronize options between the global build options and builder + # specific options + ++ ( + if !(elem buildConfig.pdfDirectory ["." ""]) + then ["--outdir" "${buildConfig.pdfDirectory}"] + else [] + ) + ); +in { + options.vim.languages.tex.build.builders.tectonic = { + enable = mkEnableOption "Whether to enable Tex Compilation Via Tectonic"; + + package = mkOption { + type = package; + default = pkgs.tectonic; + description = "tectonic package"; + }; + + executable = mkOption { + type = str; + default = "tectonic"; + description = "The executable name from the build package that will be used to build/compile the tex."; + }; + + # -- Flags -- + keepIntermediates = mkEnableDefaultOption false '' + Keep the intermediate files generated during processing. + + If texlab is reporting build errors when there shouldn't be, disable this option. + ''; + keepLogs = mkEnableDefaultOption true '' + Keep the log files generated during processing. + + Without the keepLogs flag, texlab won't be able to report compilation warnings. + ''; + onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; + synctex = mkEnableDefaultOption true "Generate SyncTeX data"; + untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; + + # -- Options -- + reruns = mkOption { + type = ints.unsigned; + default = 0; + example = 2; + description = "Rerun the TeX engine exactly this many times after the first"; + }; + + bundle = mkOption { + type = str; + default = ""; + description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; + }; + + webBundle = mkOption { + type = str; + default = ""; + description = "Use this URL to find resource files instead of the default"; + }; + + outfmt = mkOption { + type = enum [ + "pdf" + "html" + "xdv" + "aux" + "fmt" + "" + ]; + default = ""; + description = "The kind of output to generate"; + }; + + hidePaths = mkOption { + type = listOf str; + default = []; + example = [ + "./secrets.tex" + "./passwords.tex" + ]; + description = "Tell the engine that no file at exists, if it tries to read it."; + }; + + format = mkOption { + type = str; + default = ""; + description = "The name of the \"format\" file used to initialize the TeX engine"; + }; + + color = mkOption { + type = enum [ + "always" + "auto" + "never" + "" + ]; + default = ""; + example = "always"; + description = "Enable/disable colorful log output"; + }; + + extraOptions = { + type = listOf str; + default = []; + description = '' + Add extra command line options to include in the tectonic build command. + Extra options added here will not overwrite the options set in as nvf options. + ''; + }; + }; + + config = mkIf (cfg.enable && cfg.build.builders.tectonic.enable) { + vim.languages.tex.build.builder = { + name = "tectonic"; + args = collateArgs cfg.build; + package = cfg.build.builders.tectonic.package; + }; + }; +} diff --git a/modules/plugins/languages/tex/build/default.nix b/modules/plugins/languages/tex/build/default.nix new file mode 100644 index 00000000..0882565e --- /dev/null +++ b/modules/plugins/languages/tex/build/default.nix @@ -0,0 +1,107 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib.options) mkOption; + inherit (lib.modules) mkIf; + inherit + (lib.types) + bool + enum + ints + listOf + package + str + ; + inherit + (builtins) + attrNames + concatLists + concatStringsSep + elem + elemAt + filter + hasAttr + isAttrs + length + map + throw + toString + ; + + cfg = config.vim.languages.tex; + + # --- Enable Options --- + mkEnableDefaultOption = default: description: (mkOption { + type = bool; + default = default; + example = !default; + description = description; + }); + mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; +in { + imports = [ + ./builders + ]; + + options.vim.languages.tex.build = { + forwardSearchAfter = mkOption { + type = bool; + default = false; + description = "Set this property to true if you want to execute a forward search after a build."; + }; + onSave = mkOption { + type = bool; + default = false; + description = "Set this property to true if you want to compile the project after saving a file."; + }; + useFileList = mkOption { + type = bool; + default = false; + description = '' + When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. + + Note that enabling this property might have an impact on performance. + ''; + }; + auxDirectory = mkOption { + type = str; + default = "."; + description = '' + When not using latexmk, provides a way to define the directory containing the .aux files. + Note that you need to set the aux directory in latex.build.args too. + + When using a latexmkrc file, texlab will automatically infer the correct setting. + ''; + }; + logDirectory = mkOption { + type = str; + default = "."; + description = '' + When not using latexmk, provides a way to define the directory containing the build log files. + Note that you need to change the output directory in your build arguments too. + + When using a latexmkrc file, texlab will automatically infer the correct setting. + ''; + }; + pdfDirectory = mkOption { + type = str; + default = "."; + description = '' + When not using latexmk, provides a way to define the directory containing the output files. + Note that you need to set the output directory in latex.build.args too. + + When using a latexmkrc file, texlab will automatically infer the correct setting. + ''; + }; + filename = mkOption { + type = str; + default = ""; + description = '' + Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. + ''; + }; + }; +} diff --git a/modules/plugins/languages/tex/default.nix b/modules/plugins/languages/tex/default.nix index 944f43f2..98ac5f1c 100644 --- a/modules/plugins/languages/tex/default.nix +++ b/modules/plugins/languages/tex/default.nix @@ -12,6 +12,7 @@ in { imports = [ ./treesitter.nix ./lsp + ./build ]; options.vim.languages.tex = { diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index 0f21aa3a..498a6017 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -56,85 +56,85 @@ mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; # --- Arg Collation Functions -- - collateArgs.lsp.texlab.build = { - tectonic = buildConfig: let - selfConfig = buildConfig.tectonic; - in ( - # Base args - [ - "-X" - "compile" - "%f" - ] - # Flags - ++ ( - if selfConfig.keepIntermediates - then ["--keep-intermediates"] - else [] - ) - ++ ( - if selfConfig.keepLogs - then ["--keep-logs"] - else [] - ) - ++ ( - if selfConfig.onlyCached - then ["--only-cached"] - else [] - ) - ++ ( - if selfConfig.synctex - then ["--synctex"] - else [] - ) - ++ ( - if selfConfig.untrustedInput - then ["--untrusted"] - else [] - ) - # Options - ++ ( - if selfConfig.reruns > 0 - then ["--reruns" "${toString selfConfig.reruns}"] - else [] - ) - ++ ( - if selfConfig.bundle != "" - then ["--bundle" "${toString selfConfig.bundle}"] - else [] - ) - ++ ( - if selfConfig.webBundle != "" - then ["--web-bundle" "${toString selfConfig.webBundle}"] - else [] - ) - ++ ( - if selfConfig.outfmt != "" - then ["--outfmt" "${toString selfConfig.outfmt}"] - else [] - ) - ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) - ++ ( - if selfConfig.format != "" - then ["--format" "${toString selfConfig.format}"] - else [] - ) - ++ ( - if selfConfig.color != "" - then ["--color" "${toString selfConfig.color}"] - else [] - ) - # Still options but these are not defined by builder specific options but - # instead synchronize options between the global build options and builder - # specific options - ++ ( - if !(elem buildConfig.pdfDirectory ["." ""]) - then ["--outdir" "${buildConfig.pdfDirectory}"] - else [] - ) - ); - custom = buildConfig: buildConfig.custom.args; - }; + # collateArgs.lsp.texlab.build = { + # tectonic = buildConfig: let + # selfConfig = buildConfig.tectonic; + # in ( + # # Base args + # [ + # "-X" + # "compile" + # "%f" + # ] + # # Flags + # ++ ( + # if selfConfig.keepIntermediates + # then ["--keep-intermediates"] + # else [] + # ) + # ++ ( + # if selfConfig.keepLogs + # then ["--keep-logs"] + # else [] + # ) + # ++ ( + # if selfConfig.onlyCached + # then ["--only-cached"] + # else [] + # ) + # ++ ( + # if selfConfig.synctex + # then ["--synctex"] + # else [] + # ) + # ++ ( + # if selfConfig.untrustedInput + # then ["--untrusted"] + # else [] + # ) + # # Options + # ++ ( + # if selfConfig.reruns > 0 + # then ["--reruns" "${toString selfConfig.reruns}"] + # else [] + # ) + # ++ ( + # if selfConfig.bundle != "" + # then ["--bundle" "${toString selfConfig.bundle}"] + # else [] + # ) + # ++ ( + # if selfConfig.webBundle != "" + # then ["--web-bundle" "${toString selfConfig.webBundle}"] + # else [] + # ) + # ++ ( + # if selfConfig.outfmt != "" + # then ["--outfmt" "${toString selfConfig.outfmt}"] + # else [] + # ) + # ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) + # ++ ( + # if selfConfig.format != "" + # then ["--format" "${toString selfConfig.format}"] + # else [] + # ) + # ++ ( + # if selfConfig.color != "" + # then ["--color" "${toString selfConfig.color}"] + # else [] + # ) + # # Still options but these are not defined by builder specific options but + # # instead synchronize options between the global build options and builder + # # specific options + # ++ ( + # if !(elem buildConfig.pdfDirectory ["." ""]) + # then ["--outdir" "${buildConfig.pdfDirectory}"] + # else [] + # ) + # ); + # custom = buildConfig: buildConfig.custom.args; # Moved + # }; in { options.vim.languages.tex.lsp.texlab = { enable = mkEnableLspOption "Whether to enable Tex LSP support (texlab)"; @@ -145,199 +145,200 @@ in { description = "texlab package"; }; - build = { - tectonic = { - enable = mkEnableDefaultOption true "Whether to enable Tex Compilation Via Tectonic"; + # build = { + # tectonic = { + # enable = mkEnableDefaultOption true "Whether to enable Tex Compilation Via Tectonic"; + # + # package = mkOption { + # type = package; + # default = pkgs.tectonic; + # description = "tectonic package"; + # }; + # + # executable = mkOption { + # type = str; + # default = "tectonic"; + # description = "The executable name from the build package that will be used to build/compile the tex."; + # }; + # + # # -- Flags -- + # keepIntermediates = mkEnableDefaultOption false '' + # Keep the intermediate files generated during processing. + # + # If texlab is reporting build errors when there shouldn't be, disable this option. + # ''; + # keepLogs = mkEnableDefaultOption true '' + # Keep the log files generated during processing. + # + # Without the keepLogs flag, texlab won't be able to report compilation warnings. + # ''; + # onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; + # synctex = mkEnableDefaultOption true "Generate SyncTeX data"; + # untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; + # + # # -- Options -- + # reruns = mkOption { + # type = ints.unsigned; + # default = 0; + # example = 2; + # description = "Rerun the TeX engine exactly this many times after the first"; + # }; + # + # bundle = mkOption { + # type = str; + # default = ""; + # description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; + # }; + # + # webBundle = mkOption { + # type = str; + # default = ""; + # description = "Use this URL to find resource files instead of the default"; + # }; + # + # outfmt = mkOption { + # type = enum [ + # "pdf" + # "html" + # "xdv" + # "aux" + # "fmt" + # "" + # ]; + # default = ""; + # description = "The kind of output to generate"; + # }; + # + # hidePaths = mkOption { + # type = listOf str; + # default = []; + # example = [ + # "./secrets.tex" + # "./passwords.tex" + # ]; + # description = "Tell the engine that no file at exists, if it tries to read it."; + # }; + # + # format = mkOption { + # type = str; + # default = ""; + # description = "The name of the \"format\" file used to initialize the TeX engine"; + # }; + # + # color = mkOption { + # type = enum [ + # "always" + # "auto" + # "never" + # "" + # ]; + # default = ""; + # example = "always"; + # description = "Enable/disable colorful log output"; + # }; + # + # extraOptions = { + # type = listOf str; + # default = []; + # description = '' + # Add extra command line options to include in the tectonic build command. + # Extra options added here will not overwrite the options set in as nvf options. + # ''; + # }; + # }; - package = mkOption { - type = package; - default = pkgs.tectonic; - description = "tectonic package"; - }; + # # Moved + # custom = { + # enable = mkEnableDefaultOption false "Whether to enable using a custom build package"; + # package = mkOption { + # type = package; + # default = pkgs.tectonic; + # description = "build/compiler package"; + # }; + # executable = mkOption { + # type = str; + # default = "tectonic"; + # description = "The executable name from the build package that will be used to build/compile the tex."; + # }; + # args = mkOption { + # type = listOf str; + # default = [ + # "-X" + # "compile" + # "%f" + # "--synctex" + # "--keep-logs" + # "--keep-intermediates" + # ]; + # description = '' + # Defines additional arguments that are passed to the configured LaTeX build tool. + # Note that flags and their arguments need to be separate elements in this array. + # To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. + # The placeholder `%f` will be replaced by the server. + # + # Placeholders: + # - `%f`: The path of the TeX file to compile. + # ''; + # }; + # }; - executable = mkOption { - type = str; - default = "tectonic"; - description = "The executable name from the build package that will be used to build/compile the tex."; - }; - - # -- Flags -- - keepIntermediates = mkEnableDefaultOption false '' - Keep the intermediate files generated during processing. - - If texlab is reporting build errors when there shouldn't be, disable this option. - ''; - keepLogs = mkEnableDefaultOption true '' - Keep the log files generated during processing. - - Without the keepLogs flag, texlab won't be able to report compilation warnings. - ''; - onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; - synctex = mkEnableDefaultOption true "Generate SyncTeX data"; - untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; - - # -- Options -- - reruns = mkOption { - type = ints.unsigned; - default = 0; - example = 2; - description = "Rerun the TeX engine exactly this many times after the first"; - }; - - bundle = mkOption { - type = str; - default = ""; - description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; - }; - - webBundle = mkOption { - type = str; - default = ""; - description = "Use this URL to find resource files instead of the default"; - }; - - outfmt = mkOption { - type = enum [ - "pdf" - "html" - "xdv" - "aux" - "fmt" - "" - ]; - default = ""; - description = "The kind of output to generate"; - }; - - hidePaths = mkOption { - type = listOf str; - default = []; - example = [ - "./secrets.tex" - "./passwords.tex" - ]; - description = "Tell the engine that no file at exists, if it tries to read it."; - }; - - format = mkOption { - type = str; - default = ""; - description = "The name of the \"format\" file used to initialize the TeX engine"; - }; - - color = mkOption { - type = enum [ - "always" - "auto" - "never" - "" - ]; - default = ""; - example = "always"; - description = "Enable/disable colorful log output"; - }; - - extraOptions = { - type = listOf str; - default = []; - description = '' - Add extra command line options to include in the tectonic build command. - Extra options added here will not overwrite the options set in as nvf options. - ''; - }; - }; - - custom = { - enable = mkEnableDefaultOption false "Whether to enable using a custom build package"; - package = mkOption { - type = package; - default = pkgs.tectonic; - description = "build/compiler package"; - }; - executable = mkOption { - type = str; - default = "tectonic"; - description = "The executable name from the build package that will be used to build/compile the tex."; - }; - args = mkOption { - type = listOf str; - default = [ - "-X" - "compile" - "%f" - "--synctex" - "--keep-logs" - "--keep-intermediates" - ]; - description = '' - Defines additional arguments that are passed to the configured LaTeX build tool. - Note that flags and their arguments need to be separate elements in this array. - To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. - The placeholder `%f` will be replaced by the server. - - Placeholders: - - `%f`: The path of the TeX file to compile. - ''; - }; - }; - - forwardSearchAfter = mkOption { - type = bool; - default = false; - description = "Set this property to true if you want to execute a forward search after a build."; - }; - onSave = mkOption { - type = bool; - default = false; - description = "Set this property to true if you want to compile the project after saving a file."; - }; - useFileList = mkOption { - type = bool; - default = false; - description = '' - When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. - - Note that enabling this property might have an impact on performance. - ''; - }; - auxDirectory = mkOption { - type = str; - default = "."; - description = '' - When not using latexmk, provides a way to define the directory containing the .aux files. - Note that you need to set the aux directory in latex.build.args too. - - When using a latexmkrc file, texlab will automatically infer the correct setting. - ''; - }; - logDirectory = mkOption { - type = str; - default = "."; - description = '' - When not using latexmk, provides a way to define the directory containing the build log files. - Note that you need to change the output directory in your build arguments too. - - When using a latexmkrc file, texlab will automatically infer the correct setting. - ''; - }; - pdfDirectory = mkOption { - type = str; - default = "."; - description = '' - When not using latexmk, provides a way to define the directory containing the output files. - Note that you need to set the output directory in latex.build.args too. - - When using a latexmkrc file, texlab will automatically infer the correct setting. - ''; - }; - filename = mkOption { - type = str; - default = ""; - description = '' - Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. - ''; - }; - }; + # forwardSearchAfter = mkOption { + # type = bool; + # default = false; + # description = "Set this property to true if you want to execute a forward search after a build."; + # }; + # onSave = mkOption { + # type = bool; + # default = false; + # description = "Set this property to true if you want to compile the project after saving a file."; + # }; + # useFileList = mkOption { + # type = bool; + # default = false; + # description = '' + # When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. + # + # Note that enabling this property might have an impact on performance. + # ''; + # }; + # auxDirectory = mkOption { + # type = str; + # default = "."; + # description = '' + # When not using latexmk, provides a way to define the directory containing the .aux files. + # Note that you need to set the aux directory in latex.build.args too. + # + # When using a latexmkrc file, texlab will automatically infer the correct setting. + # ''; + # }; + # logDirectory = mkOption { + # type = str; + # default = "."; + # description = '' + # When not using latexmk, provides a way to define the directory containing the build log files. + # Note that you need to change the output directory in your build arguments too. + # + # When using a latexmkrc file, texlab will automatically infer the correct setting. + # ''; + # }; + # pdfDirectory = mkOption { + # type = str; + # default = "."; + # description = '' + # When not using latexmk, provides a way to define the directory containing the output files. + # Note that you need to set the output directory in latex.build.args too. + # + # When using a latexmkrc file, texlab will automatically infer the correct setting. + # ''; + # }; + # filename = mkOption { + # type = str; + # default = ""; + # description = '' + # Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. + # ''; + # }; + # }; forwardSearch = { enable = mkOption { @@ -416,7 +417,7 @@ in { config = mkIf (cfg.enable && (cfg.lsp.texlab.enable)) ( let tl = cfg.lsp.texlab; - build = tl.build; + builder = cfg.build.builder; listToLua = list: nullOnEmpty: if length list == 0 @@ -443,60 +444,87 @@ in { buildConfig = let # This function will sort through the builder options of ...texlab.build and count how many # builders have been enabled and get the attrs of the last enabled builder. - getBuilder = { + # getBuilder = { + # enabledBuildersCount ? 0, + # enabledBuilderName ? "", + # index ? 0, + # builderNamesList ? ( + # filter ( + # x: let + # y = cfg.build.builders.${x}; + # in (isAttrs y && hasAttr "enable" y) + # ) (attrNames cfg.build.builders) + # ), + # }: let + # currentBuilderName = elemAt builderNamesList index; + # currentBuilder = tl.build.${currentBuilderName}; + # nextIndex = index + 1; + # currentState = { + # enabledBuildersCount = + # if currentBuilder.enable + # then enabledBuildersCount + 1 + # else enabledBuildersCount; + # enabledBuilderName = + # if currentBuilder.enable + # then currentBuilderName + # else enabledBuilderName; + # }; + # in + # if length builderNamesList > nextIndex + # then + # getBuilder ({ + # inherit builderNamesList; + # index = nextIndex; + # } + # // currentState) + # else currentState; + getEnabledBuildersCount = { enabledBuildersCount ? 0, - enabledBuilderName ? "", index ? 0, builderNamesList ? ( filter ( x: let - y = tl.build.${x}; + y = cfg.build.builders.${x}; in (isAttrs y && hasAttr "enable" y) - ) (attrNames tl.build) + ) (attrNames cfg.build.builders) ), }: let currentBuilderName = elemAt builderNamesList index; - currentBuilder = tl.build.${currentBuilderName}; + currentBuilder = cfg.build.builders.${currentBuilderName}; nextIndex = index + 1; - currentState = { - enabledBuildersCount = - if currentBuilder.enable - then enabledBuildersCount + 1 - else enabledBuildersCount; - enabledBuilderName = - if currentBuilder.enable - then currentBuilderName - else enabledBuilderName; - }; + newEnabledBuildersCount = + if currentBuilder.enable + then enabledBuildersCount + 1 + else enabledBuildersCount; in if length builderNamesList > nextIndex then - getBuilder ({ + getEnabledBuildersCount { inherit builderNamesList; + enabledBuildersCount = newEnabledBuildersCount; index = nextIndex; } - // currentState) - else currentState; + else newEnabledBuildersCount; - getBuilderResults = getBuilder {}; - builder = tl.build.${getBuilderResults.enabledBuilderName}; - builderArgs = collateArgs.lsp.texlab.build.${getBuilderResults.enabledBuilderName} tl.build; + enabledBuildersCount = getEnabledBuildersCount {}; + # builder = tl.build.${getBuilderResults.enabledBuilderName}; + # builderArgs = collateArgs.lsp.texlab.build.${getBuilderResults.enabledBuilderName} tl.build; in - if getBuilderResults.enabledBuildersCount == 0 + if enabledBuildersCount == 0 then "" - else if getBuilderResults.enabledBuildersCount > 1 + else if enabledBuildersCount > 1 then throw "Texlab does not support having more than 1 builders enabled!" else '' build = { executable = "${builder.package}/bin/${builder.executable}", - args = ${listToLua builderArgs false}, - forwardSearchAfter = ${boolToLua build.forwardSearchAfter}, - onSave = ${boolToLua build.onSave}, - useFileList = ${boolToLua build.useFileList}, - auxDirectory = ${stringToLua build.auxDirectory true}, - logDirectory = ${stringToLua build.logDirectory true}, - pdfDirectory = ${stringToLua build.pdfDirectory true}, - filename = ${stringToLua build.filename true}, + args = ${listToLua builder.args false}, + forwardSearchAfter = ${boolToLua cfg.build.forwardSearchAfter}, + onSave = ${boolToLua cfg.build.onSave}, + useFileList = ${boolToLua cfg.build.useFileList}, + auxDirectory = ${stringToLua cfg.build.auxDirectory true}, + logDirectory = ${stringToLua cfg.build.logDirectory true}, + pdfDirectory = ${stringToLua cfg.build.pdfDirectory true}, + filename = ${stringToLua cfg.build.filename true}, }, ''; in { From 9b524fbe1c5516812b6a99f893db93ce5c074c83 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 23 Jan 2025 19:44:59 -0700 Subject: [PATCH 19/76] Cleanup after makeing build module --- .../languages/tex/build/builders/custom.nix | 27 +- .../languages/tex/build/builders/default.nix | 29 +- .../languages/tex/build/builders/tectonic.nix | 18 +- .../plugins/languages/tex/build/default.nix | 36 +- modules/plugins/languages/tex/lsp/texlab.nix | 328 +----------------- 5 files changed, 15 insertions(+), 423 deletions(-) diff --git a/modules/plugins/languages/tex/build/builders/custom.nix b/modules/plugins/languages/tex/build/builders/custom.nix index 680d37a9..749bf6be 100644 --- a/modules/plugins/languages/tex/build/builders/custom.nix +++ b/modules/plugins/languages/tex/build/builders/custom.nix @@ -6,30 +6,7 @@ }: let inherit (lib.options) mkOption; inherit (lib.modules) mkIf; - inherit - (lib.types) - bool - enum - ints - listOf - package - str - ; - inherit - (builtins) - attrNames - concatLists - concatStringsSep - elem - elemAt - filter - hasAttr - isAttrs - length - map - throw - toString - ; + inherit (lib.types) bool listOf package str ; cfg = config.vim.languages.tex; @@ -81,6 +58,8 @@ in { vim.languages.tex.build.builder = { name = "custom"; args = collateArgs cfg.build; + package = cfg.build.builders.custom.package; + executable = cfg.build.builders.custom.executable; }; }; } diff --git a/modules/plugins/languages/tex/build/builders/default.nix b/modules/plugins/languages/tex/build/builders/default.nix index da00fbdb..d772bb04 100644 --- a/modules/plugins/languages/tex/build/builders/default.nix +++ b/modules/plugins/languages/tex/build/builders/default.nix @@ -1,35 +1,12 @@ { config, - pkgs, lib, ... }: let - inherit (lib.options) mkOption mkEnableOption; - inherit - (lib.types) - bool - enum - ints - listOf - package - str - ; - inherit - (builtins) - attrNames - concatLists - concatStringsSep - elem - elemAt - filter - hasAttr - isAttrs - length - map - throw - toString - ; + inherit (lib.options) mkOption; + inherit (lib.types) enum listOf package str; + inherit (builtins) attrNames; cfg = config.vim.languages.tex; in diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix b/modules/plugins/languages/tex/build/builders/tectonic.nix index 0ec8bea0..29188cf2 100644 --- a/modules/plugins/languages/tex/build/builders/tectonic.nix +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix @@ -15,21 +15,7 @@ package str ; - inherit - (builtins) - attrNames - concatLists - concatStringsSep - elem - elemAt - filter - hasAttr - isAttrs - length - map - throw - toString - ; + inherit (builtins) concatLists elem map toString; cfg = config.vim.languages.tex; @@ -40,7 +26,6 @@ example = !default; description = description; }); - mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; # --- Arg Collation Functions -- collateArgs = buildConfig: let @@ -226,6 +211,7 @@ in { name = "tectonic"; args = collateArgs cfg.build; package = cfg.build.builders.tectonic.package; + executable = cfg.build.builders.tectonic.package; }; }; } diff --git a/modules/plugins/languages/tex/build/default.nix b/modules/plugins/languages/tex/build/default.nix index 0882565e..cbc9dca7 100644 --- a/modules/plugins/languages/tex/build/default.nix +++ b/modules/plugins/languages/tex/build/default.nix @@ -1,46 +1,12 @@ { config, - pkgs, lib, ... }: let inherit (lib.options) mkOption; - inherit (lib.modules) mkIf; - inherit - (lib.types) - bool - enum - ints - listOf - package - str - ; - inherit - (builtins) - attrNames - concatLists - concatStringsSep - elem - elemAt - filter - hasAttr - isAttrs - length - map - throw - toString - ; + inherit (lib.types) bool str; cfg = config.vim.languages.tex; - - # --- Enable Options --- - mkEnableDefaultOption = default: description: (mkOption { - type = bool; - default = default; - example = !default; - description = description; - }); - mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; in { imports = [ ./builders diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index 498a6017..fd319a6d 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -22,8 +22,6 @@ inherit (lib.types) bool - enum - ints listOf package str @@ -31,9 +29,7 @@ inherit (builtins) attrNames - concatLists concatStringsSep - elem elemAt filter hasAttr @@ -54,87 +50,6 @@ description = description; }); mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; - - # --- Arg Collation Functions -- - # collateArgs.lsp.texlab.build = { - # tectonic = buildConfig: let - # selfConfig = buildConfig.tectonic; - # in ( - # # Base args - # [ - # "-X" - # "compile" - # "%f" - # ] - # # Flags - # ++ ( - # if selfConfig.keepIntermediates - # then ["--keep-intermediates"] - # else [] - # ) - # ++ ( - # if selfConfig.keepLogs - # then ["--keep-logs"] - # else [] - # ) - # ++ ( - # if selfConfig.onlyCached - # then ["--only-cached"] - # else [] - # ) - # ++ ( - # if selfConfig.synctex - # then ["--synctex"] - # else [] - # ) - # ++ ( - # if selfConfig.untrustedInput - # then ["--untrusted"] - # else [] - # ) - # # Options - # ++ ( - # if selfConfig.reruns > 0 - # then ["--reruns" "${toString selfConfig.reruns}"] - # else [] - # ) - # ++ ( - # if selfConfig.bundle != "" - # then ["--bundle" "${toString selfConfig.bundle}"] - # else [] - # ) - # ++ ( - # if selfConfig.webBundle != "" - # then ["--web-bundle" "${toString selfConfig.webBundle}"] - # else [] - # ) - # ++ ( - # if selfConfig.outfmt != "" - # then ["--outfmt" "${toString selfConfig.outfmt}"] - # else [] - # ) - # ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) - # ++ ( - # if selfConfig.format != "" - # then ["--format" "${toString selfConfig.format}"] - # else [] - # ) - # ++ ( - # if selfConfig.color != "" - # then ["--color" "${toString selfConfig.color}"] - # else [] - # ) - # # Still options but these are not defined by builder specific options but - # # instead synchronize options between the global build options and builder - # # specific options - # ++ ( - # if !(elem buildConfig.pdfDirectory ["." ""]) - # then ["--outdir" "${buildConfig.pdfDirectory}"] - # else [] - # ) - # ); - # custom = buildConfig: buildConfig.custom.args; # Moved - # }; in { options.vim.languages.tex.lsp.texlab = { enable = mkEnableLspOption "Whether to enable Tex LSP support (texlab)"; @@ -145,201 +60,6 @@ in { description = "texlab package"; }; - # build = { - # tectonic = { - # enable = mkEnableDefaultOption true "Whether to enable Tex Compilation Via Tectonic"; - # - # package = mkOption { - # type = package; - # default = pkgs.tectonic; - # description = "tectonic package"; - # }; - # - # executable = mkOption { - # type = str; - # default = "tectonic"; - # description = "The executable name from the build package that will be used to build/compile the tex."; - # }; - # - # # -- Flags -- - # keepIntermediates = mkEnableDefaultOption false '' - # Keep the intermediate files generated during processing. - # - # If texlab is reporting build errors when there shouldn't be, disable this option. - # ''; - # keepLogs = mkEnableDefaultOption true '' - # Keep the log files generated during processing. - # - # Without the keepLogs flag, texlab won't be able to report compilation warnings. - # ''; - # onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; - # synctex = mkEnableDefaultOption true "Generate SyncTeX data"; - # untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; - # - # # -- Options -- - # reruns = mkOption { - # type = ints.unsigned; - # default = 0; - # example = 2; - # description = "Rerun the TeX engine exactly this many times after the first"; - # }; - # - # bundle = mkOption { - # type = str; - # default = ""; - # description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; - # }; - # - # webBundle = mkOption { - # type = str; - # default = ""; - # description = "Use this URL to find resource files instead of the default"; - # }; - # - # outfmt = mkOption { - # type = enum [ - # "pdf" - # "html" - # "xdv" - # "aux" - # "fmt" - # "" - # ]; - # default = ""; - # description = "The kind of output to generate"; - # }; - # - # hidePaths = mkOption { - # type = listOf str; - # default = []; - # example = [ - # "./secrets.tex" - # "./passwords.tex" - # ]; - # description = "Tell the engine that no file at exists, if it tries to read it."; - # }; - # - # format = mkOption { - # type = str; - # default = ""; - # description = "The name of the \"format\" file used to initialize the TeX engine"; - # }; - # - # color = mkOption { - # type = enum [ - # "always" - # "auto" - # "never" - # "" - # ]; - # default = ""; - # example = "always"; - # description = "Enable/disable colorful log output"; - # }; - # - # extraOptions = { - # type = listOf str; - # default = []; - # description = '' - # Add extra command line options to include in the tectonic build command. - # Extra options added here will not overwrite the options set in as nvf options. - # ''; - # }; - # }; - - # # Moved - # custom = { - # enable = mkEnableDefaultOption false "Whether to enable using a custom build package"; - # package = mkOption { - # type = package; - # default = pkgs.tectonic; - # description = "build/compiler package"; - # }; - # executable = mkOption { - # type = str; - # default = "tectonic"; - # description = "The executable name from the build package that will be used to build/compile the tex."; - # }; - # args = mkOption { - # type = listOf str; - # default = [ - # "-X" - # "compile" - # "%f" - # "--synctex" - # "--keep-logs" - # "--keep-intermediates" - # ]; - # description = '' - # Defines additional arguments that are passed to the configured LaTeX build tool. - # Note that flags and their arguments need to be separate elements in this array. - # To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. - # The placeholder `%f` will be replaced by the server. - # - # Placeholders: - # - `%f`: The path of the TeX file to compile. - # ''; - # }; - # }; - - # forwardSearchAfter = mkOption { - # type = bool; - # default = false; - # description = "Set this property to true if you want to execute a forward search after a build."; - # }; - # onSave = mkOption { - # type = bool; - # default = false; - # description = "Set this property to true if you want to compile the project after saving a file."; - # }; - # useFileList = mkOption { - # type = bool; - # default = false; - # description = '' - # When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. - # - # Note that enabling this property might have an impact on performance. - # ''; - # }; - # auxDirectory = mkOption { - # type = str; - # default = "."; - # description = '' - # When not using latexmk, provides a way to define the directory containing the .aux files. - # Note that you need to set the aux directory in latex.build.args too. - # - # When using a latexmkrc file, texlab will automatically infer the correct setting. - # ''; - # }; - # logDirectory = mkOption { - # type = str; - # default = "."; - # description = '' - # When not using latexmk, provides a way to define the directory containing the build log files. - # Note that you need to change the output directory in your build arguments too. - # - # When using a latexmkrc file, texlab will automatically infer the correct setting. - # ''; - # }; - # pdfDirectory = mkOption { - # type = str; - # default = "."; - # description = '' - # When not using latexmk, provides a way to define the directory containing the output files. - # Note that you need to set the output directory in latex.build.args too. - # - # When using a latexmkrc file, texlab will automatically infer the correct setting. - # ''; - # }; - # filename = mkOption { - # type = str; - # default = ""; - # description = '' - # Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. - # ''; - # }; - # }; - forwardSearch = { enable = mkOption { type = bool; @@ -442,42 +162,8 @@ in { # -- Build -- buildConfig = let - # This function will sort through the builder options of ...texlab.build and count how many - # builders have been enabled and get the attrs of the last enabled builder. - # getBuilder = { - # enabledBuildersCount ? 0, - # enabledBuilderName ? "", - # index ? 0, - # builderNamesList ? ( - # filter ( - # x: let - # y = cfg.build.builders.${x}; - # in (isAttrs y && hasAttr "enable" y) - # ) (attrNames cfg.build.builders) - # ), - # }: let - # currentBuilderName = elemAt builderNamesList index; - # currentBuilder = tl.build.${currentBuilderName}; - # nextIndex = index + 1; - # currentState = { - # enabledBuildersCount = - # if currentBuilder.enable - # then enabledBuildersCount + 1 - # else enabledBuildersCount; - # enabledBuilderName = - # if currentBuilder.enable - # then currentBuilderName - # else enabledBuilderName; - # }; - # in - # if length builderNamesList > nextIndex - # then - # getBuilder ({ - # inherit builderNamesList; - # index = nextIndex; - # } - # // currentState) - # else currentState; + # This function will sort through the builder options and count how many + # builders have been enabled. getEnabledBuildersCount = { enabledBuildersCount ? 0, index ? 0, @@ -500,15 +186,13 @@ in { if length builderNamesList > nextIndex then getEnabledBuildersCount { - inherit builderNamesList; - enabledBuildersCount = newEnabledBuildersCount; - index = nextIndex; - } + inherit builderNamesList; + enabledBuildersCount = newEnabledBuildersCount; + index = nextIndex; + } else newEnabledBuildersCount; enabledBuildersCount = getEnabledBuildersCount {}; - # builder = tl.build.${getBuilderResults.enabledBuilderName}; - # builderArgs = collateArgs.lsp.texlab.build.${getBuilderResults.enabledBuilderName} tl.build; in if enabledBuildersCount == 0 then "" From 13da2ae7552ad974631555a99cfaff0b2f2cfd80 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 23 Jan 2025 19:50:17 -0700 Subject: [PATCH 20/76] Fixed typo --- modules/plugins/languages/tex/build/builders/tectonic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix b/modules/plugins/languages/tex/build/builders/tectonic.nix index 29188cf2..82f4b8b2 100644 --- a/modules/plugins/languages/tex/build/builders/tectonic.nix +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix @@ -211,7 +211,7 @@ in { name = "tectonic"; args = collateArgs cfg.build; package = cfg.build.builders.tectonic.package; - executable = cfg.build.builders.tectonic.package; + executable = cfg.build.builders.tectonic.executable; }; }; } From 387eb9ba27a1c2dac87eff591e3db0aea82d14a8 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Fri, 24 Jan 2025 10:28:17 -0700 Subject: [PATCH 21/76] Created builder template for making new builders that will work with existing code --- .../tex/build/builders/builderTemplate.nix | 67 ++++ .../builders/{custom.nix => custom.nix.bak} | 11 +- .../languages/tex/build/builders/default.nix | 46 ++- .../languages/tex/build/builders/tectonic.nix | 373 +++++++++--------- .../tex/build/builders/tectonic.nix.bak | 217 ++++++++++ 5 files changed, 508 insertions(+), 206 deletions(-) create mode 100644 modules/plugins/languages/tex/build/builders/builderTemplate.nix rename modules/plugins/languages/tex/build/builders/{custom.nix => custom.nix.bak} (85%) create mode 100644 modules/plugins/languages/tex/build/builders/tectonic.nix.bak diff --git a/modules/plugins/languages/tex/build/builders/builderTemplate.nix b/modules/plugins/languages/tex/build/builders/builderTemplate.nix new file mode 100644 index 00000000..3d3f607f --- /dev/null +++ b/modules/plugins/languages/tex/build/builders/builderTemplate.nix @@ -0,0 +1,67 @@ +# This function acts as a template for creating new builders. +# It enforces providing all the parameters required for creating +# a new builder for it to be able to work in the existing code. + +# The first layer requirements are as follows: +{ + # This is the name of the builder, it will only be used internally and + # should match the .nix file that the builder is implemented in. + name, + + # Module attribute set. This is the attribute set that the module that is + # defining a builder is passed as its input. + moduleInheritencePackage, + + # These are the standard options for the builder just like creating any + # other module. Some options are required and are described below but + # it will also accept any other options that are provided to it. + options, + + # These are the command line arguments that will accompany the executable + # when the build command is called. + # This is a function that will take in the cfg of its own builder. + # i.e. will be called as "args cfg.build.builders.${name}" + args, + + ... +}: let + # Inherit the necessary variables available to any module. + inherit (moduleInheritencePackage) lib config; + + # Inherit other useful functions. + inherit (lib.modules) mkIf; + + # Set the cfg variable + cfg = config.vim.languages.tex; +in { + # These are the options for the builder. It will accept any options + # provided to it but some options are mandatory: + options.vim.languages.tex.build.builders.${name} = ({ + # The enable option. This one is self explanatory. + enable, + + # This is the package option for the builder. + package, + + # This is the executable that will be used to call the builder. + # It, along with package will result in: + # "/bin/" + executable, + + # Any other options provided are accepted. + ... + } @ opts: + opts) + options; + + # Check that the language and this builder have been enabled + # before making any config. + config = mkIf (cfg.enable && cfg.build.builders.${name}.enable) { + vim.languages.tex.build.builder = { + inherit name; + package = cfg.build.builders.${name}.package; + executable = cfg.build.builders.${name}.executable; + args = args cfg.build.builders.${name}; + }; + }; +} diff --git a/modules/plugins/languages/tex/build/builders/custom.nix b/modules/plugins/languages/tex/build/builders/custom.nix.bak similarity index 85% rename from modules/plugins/languages/tex/build/builders/custom.nix rename to modules/plugins/languages/tex/build/builders/custom.nix.bak index 749bf6be..01b5913c 100644 --- a/modules/plugins/languages/tex/build/builders/custom.nix +++ b/modules/plugins/languages/tex/build/builders/custom.nix.bak @@ -6,7 +6,8 @@ }: let inherit (lib.options) mkOption; inherit (lib.modules) mkIf; - inherit (lib.types) bool listOf package str ; + inherit (lib.types) bool listOf package str; + inherit (lib) mkDefault; cfg = config.vim.languages.tex; @@ -56,10 +57,10 @@ in { config = mkIf (cfg.enable && cfg.build.builders.custom.enable) { vim.languages.tex.build.builder = { - name = "custom"; - args = collateArgs cfg.build; - package = cfg.build.builders.custom.package; - executable = cfg.build.builders.custom.executable; + name = mkDefault "custom"; + args = mkDefault (collateArgs cfg.build); + package = mkDefault (cfg.build.builders.custom.package); + executable = mkDefault (cfg.build.builders.custom.executable); }; }; } diff --git a/modules/plugins/languages/tex/build/builders/default.nix b/modules/plugins/languages/tex/build/builders/default.nix index d772bb04..3e9eca59 100644 --- a/modules/plugins/languages/tex/build/builders/default.nix +++ b/modules/plugins/languages/tex/build/builders/default.nix @@ -1,5 +1,6 @@ { config, + pkgs, lib, ... }: @@ -12,30 +13,57 @@ let in { imports = [ - ./custom.nix + # ./custom.nix ./tectonic.nix ]; options.vim.languages.tex.build.builder = { name = mkOption { type = enum (attrNames cfg.build.builders); - default = "tectonic"; - description = "The tex builder to use"; + default = "latexmk"; + description = '' + The tex builder to use. + + This is just the default custom option. By setting any of the + builders to true, this will be overwritten by that builder's + parameters. + ''; }; args = mkOption { type = listOf str; - default = []; - description = "The list of args to pass to the builder"; + default = [ + "-pdf" + "%f" + ]; + description = '' + The list of args to pass to the builder. + + This is just the default custom option. By setting any of the + builders to true, this will be overwritten by that builder's + parameters. + ''; }; package = mkOption { type = package; - default = cfg.build.builders.tectonic.package; - description = "The tex builder package to use"; + default = (pkgs.texlive.withPackages (ps: [ ps.latexmk ])); + description = '' + The tex builder package to use. + + This is just the default custom option. By setting any of the + builders to true, this will be overwritten by that builder's + parameters. + ''; }; executable = mkOption { type = str; - default = cfg.build.builders.tectonic.executable; - description = "The tex builder executable to use"; + default = "latexmk"; + description = '' + The tex builder executable to use. + + This is just the default custom option. By setting any of the + builders to true, this will be overwritten by that builder's + parameters. + ''; }; }; } diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix b/modules/plugins/languages/tex/build/builders/tectonic.nix index 82f4b8b2..71facf1e 100644 --- a/modules/plugins/languages/tex/build/builders/tectonic.nix +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix @@ -3,18 +3,15 @@ pkgs, lib, ... -}: let +} @ moduleInheritencePackage: let + # The name of the builder + name = "tectonic"; + + # The builder template + template = import ./builderTemplate.nix; + inherit (lib.options) mkOption mkEnableOption; - inherit (lib.modules) mkIf; - inherit - (lib.types) - bool - enum - ints - listOf - package - str - ; + inherit (lib.types) bool enum ints listOf package str; inherit (builtins) concatLists elem map toString; cfg = config.vim.languages.tex; @@ -26,192 +23,184 @@ example = !default; description = description; }); +in ( + template { + inherit name moduleInheritencePackage; - # --- Arg Collation Functions -- - collateArgs = buildConfig: let - selfConfig = buildConfig.builders.tectonic; - in ( - # Base args - [ - "-X" - "compile" - "%f" - ] - # Flags - ++ ( - if selfConfig.keepIntermediates - then ["--keep-intermediates"] - else [] - ) - ++ ( - if selfConfig.keepLogs - then ["--keep-logs"] - else [] - ) - ++ ( - if selfConfig.onlyCached - then ["--only-cached"] - else [] - ) - ++ ( - if selfConfig.synctex - then ["--synctex"] - else [] - ) - ++ ( - if selfConfig.untrustedInput - then ["--untrusted"] - else [] - ) - # Options - ++ ( - if selfConfig.reruns > 0 - then ["--reruns" "${toString selfConfig.reruns}"] - else [] - ) - ++ ( - if selfConfig.bundle != "" - then ["--bundle" "${toString selfConfig.bundle}"] - else [] - ) - ++ ( - if selfConfig.webBundle != "" - then ["--web-bundle" "${toString selfConfig.webBundle}"] - else [] - ) - ++ ( - if selfConfig.outfmt != "" - then ["--outfmt" "${toString selfConfig.outfmt}"] - else [] - ) - ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) - ++ ( - if selfConfig.format != "" - then ["--format" "${toString selfConfig.format}"] - else [] - ) - ++ ( - if selfConfig.color != "" - then ["--color" "${toString selfConfig.color}"] - else [] - ) - # Still options but these are not defined by builder specific options but - # instead synchronize options between the global build options and builder - # specific options - ++ ( - if !(elem buildConfig.pdfDirectory ["." ""]) - then ["--outdir" "${buildConfig.pdfDirectory}"] - else [] - ) - ); -in { - options.vim.languages.tex.build.builders.tectonic = { - enable = mkEnableOption "Whether to enable Tex Compilation Via Tectonic"; + options = { + enable = mkEnableOption "Whether to enable Tex Compilation Via Tectonic"; - package = mkOption { - type = package; - default = pkgs.tectonic; - description = "tectonic package"; - }; + package = mkOption { + type = package; + default = pkgs.tectonic; + description = "tectonic package"; + }; - executable = mkOption { - type = str; - default = "tectonic"; - description = "The executable name from the build package that will be used to build/compile the tex."; - }; + executable = mkOption { + type = str; + default = "tectonic"; + description = "The executable name from the build package that will be used to build/compile the tex."; + }; - # -- Flags -- - keepIntermediates = mkEnableDefaultOption false '' - Keep the intermediate files generated during processing. + # -- Flags -- + keepIntermediates = mkEnableDefaultOption false '' + Keep the intermediate files generated during processing. - If texlab is reporting build errors when there shouldn't be, disable this option. - ''; - keepLogs = mkEnableDefaultOption true '' - Keep the log files generated during processing. - - Without the keepLogs flag, texlab won't be able to report compilation warnings. - ''; - onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; - synctex = mkEnableDefaultOption true "Generate SyncTeX data"; - untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; - - # -- Options -- - reruns = mkOption { - type = ints.unsigned; - default = 0; - example = 2; - description = "Rerun the TeX engine exactly this many times after the first"; - }; - - bundle = mkOption { - type = str; - default = ""; - description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; - }; - - webBundle = mkOption { - type = str; - default = ""; - description = "Use this URL to find resource files instead of the default"; - }; - - outfmt = mkOption { - type = enum [ - "pdf" - "html" - "xdv" - "aux" - "fmt" - "" - ]; - default = ""; - description = "The kind of output to generate"; - }; - - hidePaths = mkOption { - type = listOf str; - default = []; - example = [ - "./secrets.tex" - "./passwords.tex" - ]; - description = "Tell the engine that no file at exists, if it tries to read it."; - }; - - format = mkOption { - type = str; - default = ""; - description = "The name of the \"format\" file used to initialize the TeX engine"; - }; - - color = mkOption { - type = enum [ - "always" - "auto" - "never" - "" - ]; - default = ""; - example = "always"; - description = "Enable/disable colorful log output"; - }; - - extraOptions = { - type = listOf str; - default = []; - description = '' - Add extra command line options to include in the tectonic build command. - Extra options added here will not overwrite the options set in as nvf options. + If texlab is reporting build errors when there shouldn't be, disable this option. ''; - }; - }; + keepLogs = mkEnableDefaultOption true '' + Keep the log files generated during processing. - config = mkIf (cfg.enable && cfg.build.builders.tectonic.enable) { - vim.languages.tex.build.builder = { - name = "tectonic"; - args = collateArgs cfg.build; - package = cfg.build.builders.tectonic.package; - executable = cfg.build.builders.tectonic.executable; + Without the keepLogs flag, texlab won't be able to report compilation warnings. + ''; + onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; + synctex = mkEnableDefaultOption true "Generate SyncTeX data"; + untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; + + # -- Options -- + reruns = mkOption { + type = ints.unsigned; + default = 0; + example = 2; + description = "Rerun the TeX engine exactly this many times after the first"; + }; + + bundle = mkOption { + type = str; + default = ""; + description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; + }; + + webBundle = mkOption { + type = str; + default = ""; + description = "Use this URL to find resource files instead of the default"; + }; + + outfmt = mkOption { + type = enum [ + "pdf" + "html" + "xdv" + "aux" + "fmt" + "" + ]; + default = ""; + description = "The kind of output to generate"; + }; + + hidePaths = mkOption { + type = listOf str; + default = []; + example = [ + "./secrets.tex" + "./passwords.tex" + ]; + description = "Tell the engine that no file at exists, if it tries to read it."; + }; + + format = mkOption { + type = str; + default = ""; + description = "The name of the \"format\" file used to initialize the TeX engine"; + }; + + color = mkOption { + type = enum [ + "always" + "auto" + "never" + "" + ]; + default = ""; + example = "always"; + description = "Enable/disable colorful log output"; + }; + + extraOptions = { + type = listOf str; + default = []; + description = '' + Add extra command line options to include in the tectonic build command. + Extra options added here will not overwrite the options set in as nvf options. + ''; + }; }; - }; -} + + args = builderCfg: ( + # Base args + [ + "-X" + "compile" + "%f" + ] + # Flags + ++ ( + if builderCfg.keepIntermediates + then ["--keep-intermediates"] + else [] + ) + ++ ( + if builderCfg.keepLogs + then ["--keep-logs"] + else [] + ) + ++ ( + if builderCfg.onlyCached + then ["--only-cached"] + else [] + ) + ++ ( + if builderCfg.synctex + then ["--synctex"] + else [] + ) + ++ ( + if builderCfg.untrustedInput + then ["--untrusted"] + else [] + ) + # Options + ++ ( + if builderCfg.reruns > 0 + then ["--reruns" "${toString builderCfg.reruns}"] + else [] + ) + ++ ( + if builderCfg.bundle != "" + then ["--bundle" "${toString builderCfg.bundle}"] + else [] + ) + ++ ( + if builderCfg.webBundle != "" + then ["--web-bundle" "${toString builderCfg.webBundle}"] + else [] + ) + ++ ( + if builderCfg.outfmt != "" + then ["--outfmt" "${toString builderCfg.outfmt}"] + else [] + ) + ++ (concatLists (map (x: ["--hide" x]) builderCfg.hidePaths)) + ++ ( + if builderCfg.format != "" + then ["--format" "${toString builderCfg.format}"] + else [] + ) + ++ ( + if builderCfg.color != "" + then ["--color" "${toString builderCfg.color}"] + else [] + ) + # Still options but these are not defined by builder specific options but + # instead synchronize options between the global build options and builder + # specific options + ++ ( + if !(elem cfg.build.pdfDirectory ["." ""]) + then ["--outdir" "${cfg.build.pdfDirectory}"] + else [] + ) + ); + } +) diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix.bak b/modules/plugins/languages/tex/build/builders/tectonic.nix.bak new file mode 100644 index 00000000..82f4b8b2 --- /dev/null +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix.bak @@ -0,0 +1,217 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.modules) mkIf; + inherit + (lib.types) + bool + enum + ints + listOf + package + str + ; + inherit (builtins) concatLists elem map toString; + + cfg = config.vim.languages.tex; + + # --- Enable Options --- + mkEnableDefaultOption = default: description: (mkOption { + type = bool; + default = default; + example = !default; + description = description; + }); + + # --- Arg Collation Functions -- + collateArgs = buildConfig: let + selfConfig = buildConfig.builders.tectonic; + in ( + # Base args + [ + "-X" + "compile" + "%f" + ] + # Flags + ++ ( + if selfConfig.keepIntermediates + then ["--keep-intermediates"] + else [] + ) + ++ ( + if selfConfig.keepLogs + then ["--keep-logs"] + else [] + ) + ++ ( + if selfConfig.onlyCached + then ["--only-cached"] + else [] + ) + ++ ( + if selfConfig.synctex + then ["--synctex"] + else [] + ) + ++ ( + if selfConfig.untrustedInput + then ["--untrusted"] + else [] + ) + # Options + ++ ( + if selfConfig.reruns > 0 + then ["--reruns" "${toString selfConfig.reruns}"] + else [] + ) + ++ ( + if selfConfig.bundle != "" + then ["--bundle" "${toString selfConfig.bundle}"] + else [] + ) + ++ ( + if selfConfig.webBundle != "" + then ["--web-bundle" "${toString selfConfig.webBundle}"] + else [] + ) + ++ ( + if selfConfig.outfmt != "" + then ["--outfmt" "${toString selfConfig.outfmt}"] + else [] + ) + ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) + ++ ( + if selfConfig.format != "" + then ["--format" "${toString selfConfig.format}"] + else [] + ) + ++ ( + if selfConfig.color != "" + then ["--color" "${toString selfConfig.color}"] + else [] + ) + # Still options but these are not defined by builder specific options but + # instead synchronize options between the global build options and builder + # specific options + ++ ( + if !(elem buildConfig.pdfDirectory ["." ""]) + then ["--outdir" "${buildConfig.pdfDirectory}"] + else [] + ) + ); +in { + options.vim.languages.tex.build.builders.tectonic = { + enable = mkEnableOption "Whether to enable Tex Compilation Via Tectonic"; + + package = mkOption { + type = package; + default = pkgs.tectonic; + description = "tectonic package"; + }; + + executable = mkOption { + type = str; + default = "tectonic"; + description = "The executable name from the build package that will be used to build/compile the tex."; + }; + + # -- Flags -- + keepIntermediates = mkEnableDefaultOption false '' + Keep the intermediate files generated during processing. + + If texlab is reporting build errors when there shouldn't be, disable this option. + ''; + keepLogs = mkEnableDefaultOption true '' + Keep the log files generated during processing. + + Without the keepLogs flag, texlab won't be able to report compilation warnings. + ''; + onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; + synctex = mkEnableDefaultOption true "Generate SyncTeX data"; + untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; + + # -- Options -- + reruns = mkOption { + type = ints.unsigned; + default = 0; + example = 2; + description = "Rerun the TeX engine exactly this many times after the first"; + }; + + bundle = mkOption { + type = str; + default = ""; + description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; + }; + + webBundle = mkOption { + type = str; + default = ""; + description = "Use this URL to find resource files instead of the default"; + }; + + outfmt = mkOption { + type = enum [ + "pdf" + "html" + "xdv" + "aux" + "fmt" + "" + ]; + default = ""; + description = "The kind of output to generate"; + }; + + hidePaths = mkOption { + type = listOf str; + default = []; + example = [ + "./secrets.tex" + "./passwords.tex" + ]; + description = "Tell the engine that no file at exists, if it tries to read it."; + }; + + format = mkOption { + type = str; + default = ""; + description = "The name of the \"format\" file used to initialize the TeX engine"; + }; + + color = mkOption { + type = enum [ + "always" + "auto" + "never" + "" + ]; + default = ""; + example = "always"; + description = "Enable/disable colorful log output"; + }; + + extraOptions = { + type = listOf str; + default = []; + description = '' + Add extra command line options to include in the tectonic build command. + Extra options added here will not overwrite the options set in as nvf options. + ''; + }; + }; + + config = mkIf (cfg.enable && cfg.build.builders.tectonic.enable) { + vim.languages.tex.build.builder = { + name = "tectonic"; + args = collateArgs cfg.build; + package = cfg.build.builders.tectonic.package; + executable = cfg.build.builders.tectonic.executable; + }; + }; +} From aef828406ddd020481e8f52be7ac7900c43ffe76 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Fri, 24 Jan 2025 10:49:26 -0700 Subject: [PATCH 22/76] Created latexmk builder --- .../tex/build/builders/builderTemplate.nix | 19 +++--- .../languages/tex/build/builders/default.nix | 2 +- .../languages/tex/build/builders/latexmk.nix | 68 +++++++++++++++++++ 3 files changed, 78 insertions(+), 11 deletions(-) create mode 100644 modules/plugins/languages/tex/build/builders/latexmk.nix diff --git a/modules/plugins/languages/tex/build/builders/builderTemplate.nix b/modules/plugins/languages/tex/build/builders/builderTemplate.nix index 3d3f607f..c9cc8163 100644 --- a/modules/plugins/languages/tex/build/builders/builderTemplate.nix +++ b/modules/plugins/languages/tex/build/builders/builderTemplate.nix @@ -1,36 +1,35 @@ # This function acts as a template for creating new builders. # It enforces providing all the parameters required for creating # a new builder for it to be able to work in the existing code. - +# # The first layer requirements are as follows: { # This is the name of the builder, it will only be used internally and # should match the .nix file that the builder is implemented in. name, - + # # Module attribute set. This is the attribute set that the module that is # defining a builder is passed as its input. moduleInheritencePackage, - + # # These are the standard options for the builder just like creating any # other module. Some options are required and are described below but # it will also accept any other options that are provided to it. options, - + # # These are the command line arguments that will accompany the executable # when the build command is called. # This is a function that will take in the cfg of its own builder. # i.e. will be called as "args cfg.build.builders.${name}" args, - ... }: let # Inherit the necessary variables available to any module. inherit (moduleInheritencePackage) lib config; - + # # Inherit other useful functions. inherit (lib.modules) mkIf; - + # # Set the cfg variable cfg = config.vim.languages.tex; in { @@ -39,15 +38,15 @@ in { options.vim.languages.tex.build.builders.${name} = ({ # The enable option. This one is self explanatory. enable, - + # # This is the package option for the builder. package, - + # # This is the executable that will be used to call the builder. # It, along with package will result in: # "/bin/" executable, - + # # Any other options provided are accepted. ... } @ opts: diff --git a/modules/plugins/languages/tex/build/builders/default.nix b/modules/plugins/languages/tex/build/builders/default.nix index 3e9eca59..0e4eb8d8 100644 --- a/modules/plugins/languages/tex/build/builders/default.nix +++ b/modules/plugins/languages/tex/build/builders/default.nix @@ -13,7 +13,7 @@ let in { imports = [ - # ./custom.nix + ./latexmk.nix ./tectonic.nix ]; diff --git a/modules/plugins/languages/tex/build/builders/latexmk.nix b/modules/plugins/languages/tex/build/builders/latexmk.nix new file mode 100644 index 00000000..1cc4eb51 --- /dev/null +++ b/modules/plugins/languages/tex/build/builders/latexmk.nix @@ -0,0 +1,68 @@ +# TODO: I need testing. +{ + config, + pkgs, + lib, + ... +} @ moduleInheritencePackage: let + # The name of the builder + name = "latexmk"; + + # The builder template + template = import ./builderTemplate.nix; + + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) bool package str; + + cfg = config.vim.languages.tex; + + # --- Enable Options --- + mkEnableDefaultOption = default: description: (mkOption { + type = bool; + default = default; + example = !default; + description = description; + }); +in ( + template { + inherit name moduleInheritencePackage; + + options = { + enable = mkEnableOption "Whether to enable Tex Compilation Via latexmk"; + + package = mkOption { + type = package; + default = (pkgs.texlive.withPackages (ps: [ ps.latexmk ])); + description = "latexmk package"; + }; + + executable = mkOption { + type = str; + default = "latexmk"; + description = "The executable name from the build package that will be used to build/compile the tex."; + }; + + # Flag options + pdfOutput = mkOption { + type = bool; + default = true; + example = false; + description = "Insure the output file is a pdf."; + }; + }; + + args = builderCfg: ( + # Flags + ( + if builderCfg.pdfOutput + then ["-pdf"] + else [] + ) + # Base args + ++ [ + "-quiet" + "%f" + ] + ); + } +) From a8cd1af2a1e381b37b6600d2b6a19662161b7a3e Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sat, 25 Jan 2025 10:08:02 -0700 Subject: [PATCH 23/76] Pinned commit hash of new-file-template.nvim --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 707c296c..4372eee4 100644 --- a/flake.nix +++ b/flake.nix @@ -746,7 +746,7 @@ plugin-new-file-template-nvim = { # (required by new-file-template.nvim) - url = "github:isaacST08/new-file-template.nvim"; + url = "github:isaacST08/new-file-template.nvim?rev=dc3a58b1f490c86075c96670b9eb81370c2f2ca1"; flake = false; }; From ca9ab4204847412d6a472bbfd90f70b75da98763 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sun, 26 Jan 2025 16:06:21 -0700 Subject: [PATCH 24/76] Switched to using lib.nvim.config.mkBool where appropriate --- .../languages/tex/build/builders/latexmk.nix | 11 -------- .../languages/tex/build/builders/tectonic.nix | 27 +++++++++---------- modules/plugins/languages/tex/lsp/texlab.nix | 25 +++-------------- 3 files changed, 16 insertions(+), 47 deletions(-) diff --git a/modules/plugins/languages/tex/build/builders/latexmk.nix b/modules/plugins/languages/tex/build/builders/latexmk.nix index 1cc4eb51..edc46584 100644 --- a/modules/plugins/languages/tex/build/builders/latexmk.nix +++ b/modules/plugins/languages/tex/build/builders/latexmk.nix @@ -1,6 +1,5 @@ # TODO: I need testing. { - config, pkgs, lib, ... @@ -13,16 +12,6 @@ inherit (lib.options) mkOption mkEnableOption; inherit (lib.types) bool package str; - - cfg = config.vim.languages.tex; - - # --- Enable Options --- - mkEnableDefaultOption = default: description: (mkOption { - type = bool; - default = default; - example = !default; - description = description; - }); in ( template { inherit name moduleInheritencePackage; diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix b/modules/plugins/languages/tex/build/builders/tectonic.nix index 71facf1e..ec6e253c 100644 --- a/modules/plugins/languages/tex/build/builders/tectonic.nix +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix @@ -11,18 +11,11 @@ template = import ./builderTemplate.nix; inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) bool enum ints listOf package str; + inherit (lib.types) enum ints listOf package str; + inherit (lib.nvim.config) mkBool; inherit (builtins) concatLists elem map toString; cfg = config.vim.languages.tex; - - # --- Enable Options --- - mkEnableDefaultOption = default: description: (mkOption { - type = bool; - default = default; - example = !default; - description = description; - }); in ( template { inherit name moduleInheritencePackage; @@ -43,26 +36,30 @@ in ( }; # -- Flags -- - keepIntermediates = mkEnableDefaultOption false '' + keepIntermediates = mkBool false '' Keep the intermediate files generated during processing. If texlab is reporting build errors when there shouldn't be, disable this option. ''; - keepLogs = mkEnableDefaultOption true '' + keepLogs = mkBool true '' Keep the log files generated during processing. Without the keepLogs flag, texlab won't be able to report compilation warnings. ''; - onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; - synctex = mkEnableDefaultOption true "Generate SyncTeX data"; - untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; + onlyCached = mkBool false "Use only resource files cached locally"; + synctex = mkBool true "Generate SyncTeX data"; + untrustedInput = mkBool false "Input is untrusted -- disable all known-insecure features"; # -- Options -- reruns = mkOption { type = ints.unsigned; default = 0; example = 2; - description = "Rerun the TeX engine exactly this many times after the first"; + description = '' + Rerun the TeX engine exactly this many times after the first. + + Setting this value to 0 will diable setting this option. + ''; }; bundle = mkOption { diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index fd319a6d..e5dea908 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -19,13 +19,7 @@ }: let inherit (lib.options) mkOption; inherit (lib.modules) mkIf; - inherit - (lib.types) - bool - listOf - package - str - ; + inherit (lib.types) listOf package str; inherit (builtins) attrNames @@ -39,20 +33,14 @@ throw toString ; + inherit (lib.nvim.config) mkBool; cfg = config.vim.languages.tex; # --- Enable Options --- - mkEnableDefaultOption = default: description: (mkOption { - type = bool; - default = default; - example = !default; - description = description; - }); - mkEnableLspOption = mkEnableDefaultOption config.vim.languages.enableLSP; in { options.vim.languages.tex.lsp.texlab = { - enable = mkEnableLspOption "Whether to enable Tex LSP support (texlab)"; + enable = mkBool config.vim.languages.enableLSP "Whether to enable Tex LSP support (texlab)"; package = mkOption { type = package; @@ -61,11 +49,7 @@ in { }; forwardSearch = { - enable = mkOption { - type = bool; - default = false; - example = true; - description = '' + enable = mkBool false '' Whether to enable forward search. Enable this option if you want to have the compiled document appear in your chosen PDF viewer. @@ -73,7 +57,6 @@ in { For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). Note this is not all the options, but can act as a guide to help you allong with custom configs. ''; - }; package = mkOption { type = package; default = pkgs.okular; From 1bebf495dc3567bdd60e8efa514110afc98882de Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sun, 26 Jan 2025 18:42:54 -0700 Subject: [PATCH 25/76] Refactored to use the nvf library toLuaObject as well as other improvements and cleanups --- .../languages/tex/build/builders/default.nix | 14 +- .../plugins/languages/tex/build/default.nix | 80 ++++++--- modules/plugins/languages/tex/lsp/texlab.nix | 154 ++++++------------ 3 files changed, 119 insertions(+), 129 deletions(-) diff --git a/modules/plugins/languages/tex/build/builders/default.nix b/modules/plugins/languages/tex/build/builders/default.nix index 0e4eb8d8..4586b768 100644 --- a/modules/plugins/languages/tex/build/builders/default.nix +++ b/modules/plugins/languages/tex/build/builders/default.nix @@ -3,15 +3,14 @@ pkgs, lib, ... -}: -let +}: let inherit (lib.options) mkOption; inherit (lib.types) enum listOf package str; - inherit (builtins) attrNames; + inherit (lib.nvim.config) mkBool; + inherit (builtins) attrNames filter isAttrs hasAttr elemAt length; cfg = config.vim.languages.tex; -in -{ +in { imports = [ ./latexmk.nix ./tectonic.nix @@ -27,6 +26,8 @@ in This is just the default custom option. By setting any of the builders to true, this will be overwritten by that builder's parameters. + Setting this parameter to the name of a declared builder will + not automatically enable that builder. ''; }; args = mkOption { @@ -45,7 +46,7 @@ in }; package = mkOption { type = package; - default = (pkgs.texlive.withPackages (ps: [ ps.latexmk ])); + default = pkgs.texlive.withPackages (ps: [ps.latexmk]); description = '' The tex builder package to use. @@ -67,4 +68,3 @@ in }; }; } - diff --git a/modules/plugins/languages/tex/build/default.nix b/modules/plugins/languages/tex/build/default.nix index cbc9dca7..fe07775b 100644 --- a/modules/plugins/languages/tex/build/default.nix +++ b/modules/plugins/languages/tex/build/default.nix @@ -4,34 +4,71 @@ ... }: let inherit (lib.options) mkOption; - inherit (lib.types) bool str; + inherit (lib.types) str nullOr; + inherit (builtins) filter isAttrs hasAttr attrNames length elemAt; + inherit (lib.nvim.config) mkBool; cfg = config.vim.languages.tex; + + enabledBuildersCount = let + # This function will sort through the builder options and count how many + # builders have been enabled. + getEnabledBuildersCount = { + enabledBuildersCount ? 0, + index ? 0, + builderNamesList ? ( + filter ( + x: let + y = cfg.build.builders.${x}; + in (isAttrs y && hasAttr "enable" y) + ) (attrNames cfg.build.builders) + ), + }: let + currentBuilderName = elemAt builderNamesList index; + currentBuilder = cfg.build.builders.${currentBuilderName}; + nextIndex = index + 1; + newEnabledBuildersCount = + if currentBuilder.enable + then enabledBuildersCount + 1 + else enabledBuildersCount; + in + if length builderNamesList > nextIndex + then + getEnabledBuildersCount { + inherit builderNamesList; + enabledBuildersCount = newEnabledBuildersCount; + index = nextIndex; + } + else newEnabledBuildersCount; + in (getEnabledBuildersCount {}); in { imports = [ ./builders ]; options.vim.languages.tex.build = { - forwardSearchAfter = mkOption { - type = bool; - default = false; - description = "Set this property to true if you want to execute a forward search after a build."; - }; - onSave = mkOption { - type = bool; - default = false; - description = "Set this property to true if you want to compile the project after saving a file."; - }; - useFileList = mkOption { - type = bool; - default = false; - description = '' - When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. + enable = + mkBool ( + if enabledBuildersCount > 1 + then throw "nvf-tex-language does not support having more than 1 builders enabled!" + else (enabledBuildersCount == 1) + ) '' + Whether to enable configuring the builder. - Note that enabling this property might have an impact on performance. + By enabling any of the builders, this option will be automatically set. + If you enable more than one builder then an error will be thrown. ''; - }; + + forwardSearchAfter = mkBool false "Set this property to true if you want to execute a forward search after a build."; + + onSave = mkBool false "Set this property to true if you want to compile the project after saving a file."; + + useFileList = mkBool false '' + When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. + + Note that enabling this property might have an impact on performance. + ''; + auxDirectory = mkOption { type = str; default = "."; @@ -42,6 +79,7 @@ in { When using a latexmkrc file, texlab will automatically infer the correct setting. ''; }; + logDirectory = mkOption { type = str; default = "."; @@ -52,6 +90,7 @@ in { When using a latexmkrc file, texlab will automatically infer the correct setting. ''; }; + pdfDirectory = mkOption { type = str; default = "."; @@ -62,9 +101,10 @@ in { When using a latexmkrc file, texlab will automatically infer the correct setting. ''; }; + filename = mkOption { - type = str; - default = ""; + type = nullOr str; + default = null; description = '' Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. ''; diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index e5dea908..dcd05615 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -19,7 +19,7 @@ }: let inherit (lib.options) mkOption; inherit (lib.modules) mkIf; - inherit (lib.types) listOf package str; + inherit (lib.types) listOf package str attrs; inherit (builtins) attrNames @@ -36,8 +36,8 @@ inherit (lib.nvim.config) mkBool; cfg = config.vim.languages.tex; - - # --- Enable Options --- + texlabCfg = cfg.lsp.texlab; + builderCfg = cfg.build.builder; in { options.vim.languages.tex.lsp.texlab = { enable = mkBool config.vim.languages.enableLSP "Whether to enable Tex LSP support (texlab)"; @@ -50,13 +50,13 @@ in { forwardSearch = { enable = mkBool false '' - Whether to enable forward search. + Whether to enable forward search. - Enable this option if you want to have the compiled document appear in your chosen PDF viewer. + Enable this option if you want to have the compiled document appear in your chosen PDF viewer. - For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). - Note this is not all the options, but can act as a guide to help you allong with custom configs. - ''; + For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). + Note this is not all the options, but can act as a guide to help you allong with custom configs. + ''; package = mkOption { type = package; default = pkgs.okular; @@ -91,11 +91,11 @@ in { }; extraLuaSettings = mkOption { - type = str; - default = ""; - example = '' - formatterLineLength = 80, - ''; + type = attrs; + default = {}; + example = { + formatterLineLength = 80; + }; description = '' For any options that do not have options provided through nvf this can be used to add them. Options already declared in nvf config will NOT be overridden. @@ -119,97 +119,47 @@ in { config = mkIf (cfg.enable && (cfg.lsp.texlab.enable)) ( let - tl = cfg.lsp.texlab; - builder = cfg.build.builder; + # ----- Setup Config ----- + # Command to start the LSP + setupConfig.cmd = ["${texlabCfg.package}/bin/texlab"]; - listToLua = list: nullOnEmpty: - if length list == 0 - then - if nullOnEmpty - then "null" - else "{ }" - else "{ ${concatStringsSep ", " (map (x: ''"${toString x}"'') list)} }"; - - stringToLua = string: nullOnEmpty: - if string == "" - then - if nullOnEmpty - then "null" - else "" - else ''"${string}"''; - - boolToLua = boolean: - if boolean - then "true" - else "false"; - - # -- Build -- - buildConfig = let - # This function will sort through the builder options and count how many - # builders have been enabled. - getEnabledBuildersCount = { - enabledBuildersCount ? 0, - index ? 0, - builderNamesList ? ( - filter ( - x: let - y = cfg.build.builders.${x}; - in (isAttrs y && hasAttr "enable" y) - ) (attrNames cfg.build.builders) - ), - }: let - currentBuilderName = elemAt builderNamesList index; - currentBuilder = cfg.build.builders.${currentBuilderName}; - nextIndex = index + 1; - newEnabledBuildersCount = - if currentBuilder.enable - then enabledBuildersCount + 1 - else enabledBuildersCount; - in - if length builderNamesList > nextIndex - then - getEnabledBuildersCount { - inherit builderNamesList; - enabledBuildersCount = newEnabledBuildersCount; - index = nextIndex; - } - else newEnabledBuildersCount; - - enabledBuildersCount = getEnabledBuildersCount {}; - in - if enabledBuildersCount == 0 - then "" - else if enabledBuildersCount > 1 - then throw "Texlab does not support having more than 1 builders enabled!" - else '' - build = { - executable = "${builder.package}/bin/${builder.executable}", - args = ${listToLua builder.args false}, - forwardSearchAfter = ${boolToLua cfg.build.forwardSearchAfter}, - onSave = ${boolToLua cfg.build.onSave}, - useFileList = ${boolToLua cfg.build.useFileList}, - auxDirectory = ${stringToLua cfg.build.auxDirectory true}, - logDirectory = ${stringToLua cfg.build.logDirectory true}, - pdfDirectory = ${stringToLua cfg.build.pdfDirectory true}, - filename = ${stringToLua cfg.build.filename true}, - }, - ''; - in { - vim.lsp.lspconfig.sources.texlab = '' - lspconfig.texlab.setup { - cmd = { "${tl.package}/bin/texlab" }, - settings = { - texlab = { - ${buildConfig} - forwardSearch = { - executable = "${tl.forwardSearch.package}/bin/${tl.forwardSearch.executable}", - args = ${listToLua tl.forwardSearch.args true} - }, - ${tl.extraLuaSettings} - } + # Create texlab settings section + setupConfig.settings.texlab = ( + {} + # -- Forward Search -- + // ( + if texlabCfg.forwardSearch.enable + then { + forwardSearch = { + executable = "${texlabCfg.forwardSearch.package}/bin/${texlabCfg.forwardSearch.executable}"; + args = texlabCfg.forwardSearch.args; + }; } - } - ''; + else {} + ) + # -- Build -- + // ( + if cfg.build.enable + then { + build = { + executable = "${builderCfg.package}/bin/${builderCfg.executable}"; + args = builderCfg.args; + forwardSearchAfter = cfg.build.forwardSearchAfter; + onSave = cfg.build.onSave; + useFileList = cfg.build.useFileList; + auxDirectory = cfg.build.auxDirectory; + logDirectory = cfg.build.logDirectory; + pdfDirectory = cfg.build.pdfDirectory; + filename = cfg.build.filename; + }; + } + else {} + ) + # -- Extra -- + // texlabCfg.extraLuaSettings + ); + in { + vim.lsp.lspconfig.sources.texlab = "lspconfig.texlab.setup(${lib.nvim.lua.toLuaObject setupConfig})"; } ); } From 934eed8181868709b1e7a2bc91cf7aa9ef8b3693 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sun, 26 Jan 2025 18:56:41 -0700 Subject: [PATCH 26/76] Added diagnostic options for texlab --- modules/plugins/languages/tex/lsp/texlab.nix | 45 ++++++++++++++++++-- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index dcd05615..714ec46c 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -1,8 +1,6 @@ # TODO: # - Add Texlab LSP settings: # - chktex -# - diagnosticsDelay -# - diagnostics # - symbols # - formatterLineLength # - bibtexFormatter @@ -19,7 +17,7 @@ }: let inherit (lib.options) mkOption; inherit (lib.modules) mkIf; - inherit (lib.types) listOf package str attrs; + inherit (lib.types) listOf package str attrs ints; inherit (builtins) attrNames @@ -90,6 +88,37 @@ in { }; }; + diagnostics = { + delay = mkOption { + type = ints.positive; + default = 300; + description = "Delay in milliseconds before reporting diagnostics."; + }; + allowedPatterns = mkOption { + type = listOf str; + default = []; + description = '' + A list of regular expressions used to filter the list of reported diagnostics. + If specified, only diagnostics that match at least one of the specified patterns are sent to the client. + + See also texlab.diagnostics.ignoredPatterns. + + Hint: If both allowedPatterns and ignoredPatterns are set, then allowed patterns are applied first. + Afterwards, the results are filtered with the ignored patterns. + ''; + }; + ignoredPatterns = mkOption { + type = listOf str; + default = []; + description = '' + A list of regular expressions used to filter the list of reported diagnostics. + If specified, only diagnostics that match none of the specified patterns are sent to the client. + + See also texlab.diagnostics.allowedPatterns. + ''; + }; + }; + extraLuaSettings = mkOption { type = attrs; default = {}; @@ -125,7 +154,15 @@ in { # Create texlab settings section setupConfig.settings.texlab = ( - {} + # -- General Settings -- + # -- Diagnostics -- + { + diagnosticsDelay = texlabCfg.diagnostics.delay; + diagnostics = { + allowedPatterns = texlabCfg.diagnostics.allowedPatterns; + ignoredPatterns = texlabCfg.diagnostics.ignoredPatterns; + }; + } # -- Forward Search -- // ( if texlabCfg.forwardSearch.enable From c2796c929f58babe4bb1237b038372468be506f7 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sun, 26 Jan 2025 19:09:35 -0700 Subject: [PATCH 27/76] Added general texlab options and some cleanup --- modules/plugins/languages/tex/lsp/texlab.nix | 53 +++++++++++++------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index 714ec46c..37b06a08 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -2,9 +2,6 @@ # - Add Texlab LSP settings: # - chktex # - symbols -# - formatterLineLength -# - bibtexFormatter -# - latexFormatter # - latexindent # - completion # - inlayHints @@ -17,20 +14,7 @@ }: let inherit (lib.options) mkOption; inherit (lib.modules) mkIf; - inherit (lib.types) listOf package str attrs ints; - inherit - (builtins) - attrNames - concatStringsSep - elemAt - filter - hasAttr - isAttrs - length - map - throw - toString - ; + inherit (lib.types) listOf package str attrs ints enum; inherit (lib.nvim.config) mkBool; cfg = config.vim.languages.tex; @@ -119,11 +103,37 @@ in { }; }; + formatterLineLength = mkOption { + type = ints.positive; + default = 80; + description = "Defines the maximum amount of characters per line (0 = disable) when formatting BibTeX files."; + }; + + bibtexFormatter = mkOption { + type = enum ["texlab" "latexindent"]; + default = "texlab"; + description = '' + Defines the formatter to use for BibTeX formatting. + Possible values are either texlab or latexindent. + ''; + }; + + latexFormatter = mkOption { + type = enum ["texlab" "latexindent"]; + default = "latexindent"; + description = '' + Defines the formatter to use for LaTeX formatting. + Possible values are either texlab or latexindent. + Note that texlab is not implemented yet. + ''; + }; + extraLuaSettings = mkOption { type = attrs; default = {}; example = { - formatterLineLength = 80; + foo = "bar"; + baz = 314; }; description = '' For any options that do not have options provided through nvf this can be used to add them. @@ -155,8 +165,13 @@ in { # Create texlab settings section setupConfig.settings.texlab = ( # -- General Settings -- - # -- Diagnostics -- { + formatterLineLength = texlabCfg.formatterLineLength; + bibtexFormatter = texlabCfg.bibtexFormatter; + latexFormatter = texlabCfg.latexFormatter; + } + # -- Diagnostics -- + // { diagnosticsDelay = texlabCfg.diagnostics.delay; diagnostics = { allowedPatterns = texlabCfg.diagnostics.allowedPatterns; From 68c3610848340c87848fe0a42f0562b7cc76155d Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sun, 26 Jan 2025 19:26:06 -0700 Subject: [PATCH 28/76] Added latexindent options to texlab --- modules/plugins/languages/tex/lsp/texlab.nix | 39 +++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index 37b06a08..2ed93229 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -2,7 +2,6 @@ # - Add Texlab LSP settings: # - chktex # - symbols -# - latexindent # - completion # - inlayHints # - experimental @@ -14,7 +13,7 @@ }: let inherit (lib.options) mkOption; inherit (lib.modules) mkIf; - inherit (lib.types) listOf package str attrs ints enum; + inherit (lib.types) listOf package str attrs ints enum either path nullOr; inherit (lib.nvim.config) mkBool; cfg = config.vim.languages.tex; @@ -103,6 +102,34 @@ in { }; }; + latexindent = { + local = mkOption { + type = nullOr (either str path); + default = null; + description = '' + Defines the path of a file containing the latexindent configuration. + This corresponds to the --local=file.yaml flag of latexindent. + By default the configuration inside the project root directory is used. + ''; + }; + modifyLineBreaks = mkBool false '' + Modifies linebreaks before, during, and at the end of code blocks when formatting with latexindent. + This corresponds to the --modifylinebreaks flag of latexindent. + ''; + replacement = mkOption { + type = nullOr (enum ["-r" "-rv" "-rr"]); + default = null; + description = '' + Defines an additional replacement flag that is added when calling latexindent. This can be one of the following: + - "-r" + - "-rv" + - "-rr" + - null + By default no replacement flag is passed. + ''; + }; + }; + formatterLineLength = mkOption { type = ints.positive; default = 80; @@ -178,6 +205,14 @@ in { ignoredPatterns = texlabCfg.diagnostics.ignoredPatterns; }; } + # -- Latex Indent -- + // { + latexindent = { + local = texlabCfg.latexindent.local; + modifyLineBreaks = texlabCfg.latexindent.modifyLineBreaks; + replacement = texlabCfg.latexindent.replacement; + }; + } # -- Forward Search -- // ( if texlabCfg.forwardSearch.enable From e518c8e629d31ac75693c8a53dc6c10e6342dca7 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sun, 26 Jan 2025 19:31:45 -0700 Subject: [PATCH 29/76] Added completion options for texlab --- modules/plugins/languages/tex/lsp/texlab.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index 2ed93229..a0173efe 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -2,7 +2,6 @@ # - Add Texlab LSP settings: # - chktex # - symbols -# - completion # - inlayHints # - experimental { @@ -130,6 +129,18 @@ in { }; }; + completion.matcher = mkOption { + type = str; + default = "fuzzy-ignore-case"; + description = '' + Modifies the algorithm used to filter the completion items returned to the client. Possibles values are: + - fuzzy: Fuzzy string matching (case sensitive) + - fuzzy-ignore-case: Fuzzy string matching (case insensitive) + - prefix: Filter out items that do not start with the search text (case sensitive) + - prefix-ignore-case: Filter out items that do not start with the search text (case insensitive) + ''; + }; + formatterLineLength = mkOption { type = ints.positive; default = 80; @@ -213,6 +224,10 @@ in { replacement = texlabCfg.latexindent.replacement; }; } + # -- Completion -- + // { + completion.matcher = texlabCfg.completion.matcher; + } # -- Forward Search -- // ( if texlabCfg.forwardSearch.enable From 6a023fc57a504b20a2835e43878b87bb618de1d3 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sun, 26 Jan 2025 19:47:50 -0700 Subject: [PATCH 30/76] Added inlayHints options for texlab and some cleanup --- modules/plugins/languages/tex/lsp/texlab.nix | 44 ++++++++++++-------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index a0173efe..0d192011 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -2,7 +2,6 @@ # - Add Texlab LSP settings: # - chktex # - symbols -# - inlayHints # - experimental { config, @@ -141,6 +140,16 @@ in { ''; }; + inlayHints = { + labelDefinitions = mkBool true "When enabled, the server will return inlay hints for `\\label-like` commands."; + labelReferences = mkBool true "When enabled, the server will return inlay hints for `\\ref``-like commands."; + maxLength = mkOption { + type = nullOr ints.positive; + default = null; + description = "When set, the server will truncate the text of the inlay hints to the specified length."; + }; + }; + formatterLineLength = mkOption { type = ints.positive; default = 80; @@ -202,32 +211,31 @@ in { # Create texlab settings section setupConfig.settings.texlab = ( - # -- General Settings -- { + # -- General Settings -- formatterLineLength = texlabCfg.formatterLineLength; + + # -- Formatters -- bibtexFormatter = texlabCfg.bibtexFormatter; latexFormatter = texlabCfg.latexFormatter; - } - # -- Diagnostics -- - // { + + # -- Diagnostics -- diagnosticsDelay = texlabCfg.diagnostics.delay; diagnostics = { allowedPatterns = texlabCfg.diagnostics.allowedPatterns; ignoredPatterns = texlabCfg.diagnostics.ignoredPatterns; }; - } - # -- Latex Indent -- - // { - latexindent = { - local = texlabCfg.latexindent.local; - modifyLineBreaks = texlabCfg.latexindent.modifyLineBreaks; - replacement = texlabCfg.latexindent.replacement; - }; - } - # -- Completion -- - // { + + # -- Latex Indent -- + latexindent = texlabCfg.latexindent; + + # -- Completion -- completion.matcher = texlabCfg.completion.matcher; + + # -- Inlay Hints -- + inlayHints = texlabCfg.inlayHints; } + # # -- Forward Search -- // ( if texlabCfg.forwardSearch.enable @@ -239,6 +247,7 @@ in { } else {} ) + # # -- Build -- // ( if cfg.build.enable @@ -257,7 +266,8 @@ in { } else {} ) - # -- Extra -- + # + # -- Extra Settings -- // texlabCfg.extraLuaSettings ); in { From 83bfc2877f614877f0f2a8108231ab49645e099d Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sun, 26 Jan 2025 20:05:48 -0700 Subject: [PATCH 31/76] Added experimental options for texlab --- modules/plugins/languages/tex/lsp/texlab.nix | 100 ++++++++++++++++++- 1 file changed, 99 insertions(+), 1 deletion(-) diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index 0d192011..2ce47dc7 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -2,7 +2,6 @@ # - Add Texlab LSP settings: # - chktex # - symbols -# - experimental { config, pkgs, @@ -36,6 +35,7 @@ in { For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). Note this is not all the options, but can act as a guide to help you allong with custom configs. ''; + package = mkOption { type = package; default = pkgs.okular; @@ -44,6 +44,7 @@ in { This viewer needs to support Synctex. ''; }; + executable = mkOption { type = str; default = "okular"; @@ -51,6 +52,7 @@ in { Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. ''; }; + args = mkOption { type = listOf str; default = [ @@ -75,6 +77,7 @@ in { default = 300; description = "Delay in milliseconds before reporting diagnostics."; }; + allowedPatterns = mkOption { type = listOf str; default = []; @@ -88,6 +91,7 @@ in { Afterwards, the results are filtered with the ignored patterns. ''; }; + ignoredPatterns = mkOption { type = listOf str; default = []; @@ -110,10 +114,12 @@ in { By default the configuration inside the project root directory is used. ''; }; + modifyLineBreaks = mkBool false '' Modifies linebreaks before, during, and at the end of code blocks when formatting with latexindent. This corresponds to the --modifylinebreaks flag of latexindent. ''; + replacement = mkOption { type = nullOr (enum ["-r" "-rv" "-rr"]); default = null; @@ -142,7 +148,9 @@ in { inlayHints = { labelDefinitions = mkBool true "When enabled, the server will return inlay hints for `\\label-like` commands."; + labelReferences = mkBool true "When enabled, the server will return inlay hints for `\\ref``-like commands."; + maxLength = mkOption { type = nullOr ints.positive; default = null; @@ -150,6 +158,93 @@ in { }; }; + experimental = { + followPackageLinks = mkBool false "If set to true, dependencies of custom packages are resolved and included in the dependency graph."; + + mathEnvironments = mkOption { + type = listOf str; + default = []; + description = "Allows extending the list of environments which the server considers as math environments (for example `align*` or `equation`)."; + }; + + enumEnvironments = mkOption { + type = listOf str; + default = []; + description = "Allows extending the list of environments which the server considers as enumeration environments (for example `enumerate` or `itemize`)."; + }; + + verbatimEnvironments = mkOption { + type = listOf str; + default = []; + description = '' + Allows extending the list of environments which the server considers as verbatim environments (for example `minted` or `lstlisting`). + This can be used to suppress diagnostics from environments that do not contain LaTeX code. + ''; + }; + + citationCommands = mkOption { + type = listOf str; + default = []; + description = '' + Allows extending the list of commands which the server considers as citation commands (for example `\cite`). + + Hint: Additional commands need to be written without a leading `\` (e. g. `foo` instead of `\foo`). + ''; + }; + labelDefinitionCommands = mkOption { + type = listOf str; + default = []; + description = '' + Allows extending the list of `\label`-like commands. + + Hint: Additional commands need to be written without a leading `\` (e. g. `foo` instead of `\foo`). + ''; + }; + + labelReferenceCommands = mkOption { + type = listOf str; + default = []; + description = '' + Allows extending the list of `\ref`-like commands. + + Hint: Additional commands need to be written without a leading `\` (e. g. `foo` instead of `\foo`). + ''; + }; + + labelReferenceRangeCommands = mkOption { + type = listOf str; + default = []; + description = '' + Allows extending the list of `\crefrange`-like commands. + + Hint: Additional commands need to be written without a leading `\` (e. g. `foo` instead of `\foo`). + ''; + }; + + labelDefinitionPrefixes = mkOption { + type = listOf (listOf str); + default = []; + description = '' + Allows associating a label definition command with a custom prefix. Consider, + ``` + \newcommand{\thm}[1]{\label{thm:#1}} + \thm{foo} + ``` + Then setting `texlab.experimental.labelDefinitionPrefixes` to `[["thm", "thm:"]]` and adding "thm" + to `texlab.experimental.labelDefinitionCommands` will make the server recognize the `thm:foo` label. + ''; + }; + + labelReferencePrefixes = mkOption { + type = listOf (listOf str); + default = []; + description = '' + Allows associating a label reference command with a custom prefix. + See `texlab.experimental.labelDefinitionPrefixes` for more details. + ''; + }; + }; + formatterLineLength = mkOption { type = ints.positive; default = 80; @@ -234,6 +329,9 @@ in { # -- Inlay Hints -- inlayHints = texlabCfg.inlayHints; + + # -- Experimental -- + experimental = texlabCfg.experimental; } # # -- Forward Search -- From 8f333139d38883a30bb4b0f670500603ef700171 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sun, 26 Jan 2025 20:11:20 -0700 Subject: [PATCH 32/76] Removed old files --- .../tex/build/builders/custom.nix.bak | 66 ------ .../tex/build/builders/tectonic.nix.bak | 217 ------------------ 2 files changed, 283 deletions(-) delete mode 100644 modules/plugins/languages/tex/build/builders/custom.nix.bak delete mode 100644 modules/plugins/languages/tex/build/builders/tectonic.nix.bak diff --git a/modules/plugins/languages/tex/build/builders/custom.nix.bak b/modules/plugins/languages/tex/build/builders/custom.nix.bak deleted file mode 100644 index 01b5913c..00000000 --- a/modules/plugins/languages/tex/build/builders/custom.nix.bak +++ /dev/null @@ -1,66 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: let - inherit (lib.options) mkOption; - inherit (lib.modules) mkIf; - inherit (lib.types) bool listOf package str; - inherit (lib) mkDefault; - - cfg = config.vim.languages.tex; - - # --- Enable Options --- - mkEnableDefaultOption = default: description: (mkOption { - type = bool; - default = default; - example = !default; - description = description; - }); - - collateArgs = buildConfig: buildConfig.builders.custom.args; -in { - options.vim.languages.tex.build.builders.custom = { - enable = mkEnableDefaultOption false "Whether to enable using a custom build package"; - package = mkOption { - type = package; - default = pkgs.tectonic; - description = "build/compiler package"; - }; - executable = mkOption { - type = str; - default = "tectonic"; - description = "The executable name from the build package that will be used to build/compile the tex."; - }; - args = mkOption { - type = listOf str; - default = [ - "-X" - "compile" - "%f" - "--synctex" - "--keep-logs" - "--keep-intermediates" - ]; - description = '' - Defines additional arguments that are passed to the configured LaTeX build tool. - Note that flags and their arguments need to be separate elements in this array. - To pass the arguments -foo bar to a build tool, args needs to be ["-foo" "bar"]. - The placeholder `%f` will be replaced by the server. - - Placeholders: - - `%f`: The path of the TeX file to compile. - ''; - }; - }; - - config = mkIf (cfg.enable && cfg.build.builders.custom.enable) { - vim.languages.tex.build.builder = { - name = mkDefault "custom"; - args = mkDefault (collateArgs cfg.build); - package = mkDefault (cfg.build.builders.custom.package); - executable = mkDefault (cfg.build.builders.custom.executable); - }; - }; -} diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix.bak b/modules/plugins/languages/tex/build/builders/tectonic.nix.bak deleted file mode 100644 index 82f4b8b2..00000000 --- a/modules/plugins/languages/tex/build/builders/tectonic.nix.bak +++ /dev/null @@ -1,217 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: let - inherit (lib.options) mkOption mkEnableOption; - inherit (lib.modules) mkIf; - inherit - (lib.types) - bool - enum - ints - listOf - package - str - ; - inherit (builtins) concatLists elem map toString; - - cfg = config.vim.languages.tex; - - # --- Enable Options --- - mkEnableDefaultOption = default: description: (mkOption { - type = bool; - default = default; - example = !default; - description = description; - }); - - # --- Arg Collation Functions -- - collateArgs = buildConfig: let - selfConfig = buildConfig.builders.tectonic; - in ( - # Base args - [ - "-X" - "compile" - "%f" - ] - # Flags - ++ ( - if selfConfig.keepIntermediates - then ["--keep-intermediates"] - else [] - ) - ++ ( - if selfConfig.keepLogs - then ["--keep-logs"] - else [] - ) - ++ ( - if selfConfig.onlyCached - then ["--only-cached"] - else [] - ) - ++ ( - if selfConfig.synctex - then ["--synctex"] - else [] - ) - ++ ( - if selfConfig.untrustedInput - then ["--untrusted"] - else [] - ) - # Options - ++ ( - if selfConfig.reruns > 0 - then ["--reruns" "${toString selfConfig.reruns}"] - else [] - ) - ++ ( - if selfConfig.bundle != "" - then ["--bundle" "${toString selfConfig.bundle}"] - else [] - ) - ++ ( - if selfConfig.webBundle != "" - then ["--web-bundle" "${toString selfConfig.webBundle}"] - else [] - ) - ++ ( - if selfConfig.outfmt != "" - then ["--outfmt" "${toString selfConfig.outfmt}"] - else [] - ) - ++ (concatLists (map (x: ["--hide" x]) selfConfig.hidePaths)) - ++ ( - if selfConfig.format != "" - then ["--format" "${toString selfConfig.format}"] - else [] - ) - ++ ( - if selfConfig.color != "" - then ["--color" "${toString selfConfig.color}"] - else [] - ) - # Still options but these are not defined by builder specific options but - # instead synchronize options between the global build options and builder - # specific options - ++ ( - if !(elem buildConfig.pdfDirectory ["." ""]) - then ["--outdir" "${buildConfig.pdfDirectory}"] - else [] - ) - ); -in { - options.vim.languages.tex.build.builders.tectonic = { - enable = mkEnableOption "Whether to enable Tex Compilation Via Tectonic"; - - package = mkOption { - type = package; - default = pkgs.tectonic; - description = "tectonic package"; - }; - - executable = mkOption { - type = str; - default = "tectonic"; - description = "The executable name from the build package that will be used to build/compile the tex."; - }; - - # -- Flags -- - keepIntermediates = mkEnableDefaultOption false '' - Keep the intermediate files generated during processing. - - If texlab is reporting build errors when there shouldn't be, disable this option. - ''; - keepLogs = mkEnableDefaultOption true '' - Keep the log files generated during processing. - - Without the keepLogs flag, texlab won't be able to report compilation warnings. - ''; - onlyCached = mkEnableDefaultOption false "Use only resource files cached locally"; - synctex = mkEnableDefaultOption true "Generate SyncTeX data"; - untrustedInput = mkEnableDefaultOption false "Input is untrusted -- disable all known-insecure features"; - - # -- Options -- - reruns = mkOption { - type = ints.unsigned; - default = 0; - example = 2; - description = "Rerun the TeX engine exactly this many times after the first"; - }; - - bundle = mkOption { - type = str; - default = ""; - description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; - }; - - webBundle = mkOption { - type = str; - default = ""; - description = "Use this URL to find resource files instead of the default"; - }; - - outfmt = mkOption { - type = enum [ - "pdf" - "html" - "xdv" - "aux" - "fmt" - "" - ]; - default = ""; - description = "The kind of output to generate"; - }; - - hidePaths = mkOption { - type = listOf str; - default = []; - example = [ - "./secrets.tex" - "./passwords.tex" - ]; - description = "Tell the engine that no file at exists, if it tries to read it."; - }; - - format = mkOption { - type = str; - default = ""; - description = "The name of the \"format\" file used to initialize the TeX engine"; - }; - - color = mkOption { - type = enum [ - "always" - "auto" - "never" - "" - ]; - default = ""; - example = "always"; - description = "Enable/disable colorful log output"; - }; - - extraOptions = { - type = listOf str; - default = []; - description = '' - Add extra command line options to include in the tectonic build command. - Extra options added here will not overwrite the options set in as nvf options. - ''; - }; - }; - - config = mkIf (cfg.enable && cfg.build.builders.tectonic.enable) { - vim.languages.tex.build.builder = { - name = "tectonic"; - args = collateArgs cfg.build; - package = cfg.build.builders.tectonic.package; - executable = cfg.build.builders.tectonic.executable; - }; - }; -} From 637170bc32bb64f507571c24ecfe3f65177da345 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 30 Jan 2025 12:25:19 -0700 Subject: [PATCH 33/76] Added enum options for completion matcher option --- modules/plugins/languages/tex/lsp/texlab.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index 2ce47dc7..c05dcfaa 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -135,7 +135,7 @@ in { }; completion.matcher = mkOption { - type = str; + type = enum ["fuzzy" "fuzzy-ignore-case" "prefix" "prefix-ignore-case"]; default = "fuzzy-ignore-case"; description = '' Modifies the algorithm used to filter the completion items returned to the client. Possibles values are: From 19bbdef6a5b020c8b843145299f6a13702e364b8 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 30 Jan 2025 13:03:48 -0700 Subject: [PATCH 34/76] Added chktex options for texlab --- modules/plugins/languages/tex/lsp/texlab.nix | 54 +++++++++++++++++--- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index c05dcfaa..cde4ed17 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -1,6 +1,5 @@ # TODO: # - Add Texlab LSP settings: -# - chktex # - symbols { config, @@ -9,7 +8,7 @@ ... }: let inherit (lib.options) mkOption; - inherit (lib.modules) mkIf; + inherit (lib.modules) mkIf mkMerge; inherit (lib.types) listOf package str attrs ints enum either path nullOr; inherit (lib.nvim.config) mkBool; @@ -104,6 +103,32 @@ in { }; }; + chktex = { + enable = mkBool false "Whether to enable linting via chktex"; + + package = mkOption { + type = package; + default = pkgs.texlive.withPackages (ps: [ps.chktex]); + description = '' + The chktex package to use. + Must have the `chktex` executable. + ''; + }; + + onOpenAndSave = mkBool false "Lint using chktex after opening and saving a file."; + + onEdit = mkBool false "Lint using chktex after editing a file."; + + additionalArgs = mkOption { + type = listOf str; + default = []; + description = '' + Additional command line arguments that are passed to chktex after editing a file. + Don't redefine the `-I` and `-f` flags as they are set by the server. + ''; + }; + }; + latexindent = { local = mkOption { type = nullOr (either str path); @@ -298,7 +323,7 @@ in { }; }; - config = mkIf (cfg.enable && (cfg.lsp.texlab.enable)) ( + config = mkIf cfg.enable ( let # ----- Setup Config ----- # Command to start the LSP @@ -346,6 +371,17 @@ in { else {} ) # + # -- Chktex -- + // ( + if texlabCfg.chktex.enable + then { + chktex = { + inherit (texlabCfg.chktex) onOpenAndSave onEdit additionalArgs; + }; + } + else {} + ) + # # -- Build -- // ( if cfg.build.enable @@ -368,8 +404,14 @@ in { # -- Extra Settings -- // texlabCfg.extraLuaSettings ); - in { - vim.lsp.lspconfig.sources.texlab = "lspconfig.texlab.setup(${lib.nvim.lua.toLuaObject setupConfig})"; - } + in (mkMerge [ + (mkIf texlabCfg.enable { + vim.lsp.lspconfig.sources.texlab = "lspconfig.texlab.setup(${lib.nvim.lua.toLuaObject setupConfig})"; + }) + + (mkIf texlabCfg.chktex.enable { + vim.extraPackages = [texlabCfg.chktex.package]; + }) + ]) ); } From 08283679ff42e2d1a23eefab51fe8bc54ffa7420 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 30 Jan 2025 13:56:38 -0700 Subject: [PATCH 35/76] Added symbol options for texlab --- modules/plugins/languages/tex/lsp/texlab.nix | 107 ++++++++++++++++++- 1 file changed, 103 insertions(+), 4 deletions(-) diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index cde4ed17..bf7d61dc 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -1,6 +1,3 @@ -# TODO: -# - Add Texlab LSP settings: -# - symbols { config, pkgs, @@ -9,8 +6,9 @@ }: let inherit (lib.options) mkOption; inherit (lib.modules) mkIf mkMerge; - inherit (lib.types) listOf package str attrs ints enum either path nullOr; + inherit (lib.types) listOf package str attrs ints enum either path nullOr submodule; inherit (lib.nvim.config) mkBool; + inherit (builtins) isString map; cfg = config.vim.languages.tex; texlabCfg = cfg.lsp.texlab; @@ -129,6 +127,86 @@ in { }; }; + symbols = { + enable = mkBool false "Whether to enable setting symbols config."; + + allowedPatterns = mkOption { + type = listOf str; + default = []; + description = '' + A list of regular expressions used to filter the list of reported document symbols. + If specified, only symbols that match at least one of the specified patterns are sent to the client. + Symbols are filtered recursively so nested symbols can still be sent to the client even though the + parent node is removed from the results. + + See also `texlab.symbols.ignoredPatterns`. + + Hint: If both allowedPatterns and ignoredPatterns are set, then allowed patterns are applied first. + Afterwards, the results are filtered with the ignored patterns. + ''; + }; + + ignoredPatterns = mkOption { + type = listOf str; + default = []; + description = '' + A list of regular expressions used to filter the list of reported document symbols. + If specified, only symbols that match none of the specified patterns are sent to the client. + + See also `texlab.symbols.allowedPatterns`. + ''; + }; + + customEnvironments = mkOption { + type = listOf (submodule { + options = { + name = mkOption { + type = str; + description = "The name of the environment."; + }; + displayName = mkOption { + type = nullOr str; + default = null; + description = "The name shown in the document symbols. Defaults to the value of `name`."; + }; + label = mkBool false '' + If set, the server will try to match a label to environment and append its number. + ''; + }; + }); + default = []; + example = [ + { + name = "foo"; + displayName = "bar"; + label = false; + } + ]; + description = '' + A list of objects that allows extending the list of environments that are part of the document symbols. + + See also texlab.symbols.allowedPatterns. + + Type: listOf submodule: + - name: + - type: str + - description: The name of the environment. + - required + - displayName: + - type: nullOr str + - description: The name shown in the document symbols. + - default: + - label: + - type: boolean + - description: If set, the server will try to match a label to environment and append its number. + - default: false + + Note: This functionallity may not be working, please follow https://github.com/latex-lsp/texlab/pull/1311 + for status updates. + ''; + }; + }; + latexindent = { local = mkOption { type = nullOr (either str path); @@ -382,6 +460,27 @@ in { else {} ) # + # -- Symbols -- + // ( + if texlabCfg.symbols.enable + then { + symbols = { + inherit (texlabCfg.symbols) allowedPatterns ignoredPatterns; + + customEnvironments = + map (x: { + inherit (x) name label; + displayName = + if isString x.displayName + then x.displayName + else x.name; + }) + texlabCfg.symbols.customEnvironments; + }; + } + else {} + ) + # # -- Build -- // ( if cfg.build.enable From 650775ec527c10d546c472a657b3e044ecf87156 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 30 Jan 2025 14:37:30 -0700 Subject: [PATCH 36/76] Cleanup: Sorted sections alphabetically, utilized inherrits where appropriate --- modules/plugins/languages/tex/lsp/texlab.nix | 508 +++++++++---------- 1 file changed, 254 insertions(+), 254 deletions(-) diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index bf7d61dc..fca7c759 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -23,51 +23,44 @@ in { description = "texlab package"; }; - forwardSearch = { - enable = mkBool false '' - Whether to enable forward search. - - Enable this option if you want to have the compiled document appear in your chosen PDF viewer. - - For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). - Note this is not all the options, but can act as a guide to help you allong with custom configs. - ''; + chktex = { + enable = mkBool false "Whether to enable linting via chktex"; package = mkOption { type = package; - default = pkgs.okular; + default = pkgs.texlive.withPackages (ps: [ps.chktex]); description = '' - The package to use as your PDF viewer. - This viewer needs to support Synctex. + The chktex package to use. + Must have the `chktex` executable. ''; }; - executable = mkOption { - type = str; - default = "okular"; - description = '' - Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. - ''; - }; + onOpenAndSave = mkBool false "Lint using chktex after opening and saving a file."; - args = mkOption { + onEdit = mkBool false "Lint using chktex after editing a file."; + + additionalArgs = mkOption { type = listOf str; - default = [ - "--unique" - "file:%p#src:%l%f" - ]; + default = []; description = '' - Defines additional arguments that are passed to the configured previewer to perform the forward search. - The placeholders %f, %p, %l will be replaced by the server. - - Placeholders: - - %f: The path of the current TeX file. - - %p: The path of the current PDF file. - - %l: The current line number. + Additional command line arguments that are passed to chktex after editing a file. + Don't redefine the `-I` and `-f` flags as they are set by the server. ''; }; }; + completion.matcher = mkOption { + type = enum ["fuzzy" "fuzzy-ignore-case" "prefix" "prefix-ignore-case"]; + default = "fuzzy-ignore-case"; + description = '' + Modifies the algorithm used to filter the completion items returned to the client. Possibles values are: + - fuzzy: Fuzzy string matching (case sensitive) + - fuzzy-ignore-case: Fuzzy string matching (case insensitive) + - prefix: Filter out items that do not start with the search text (case sensitive) + - prefix-ignore-case: Filter out items that do not start with the search text (case insensitive) + ''; + }; + diagnostics = { delay = mkOption { type = ints.positive; @@ -101,166 +94,6 @@ in { }; }; - chktex = { - enable = mkBool false "Whether to enable linting via chktex"; - - package = mkOption { - type = package; - default = pkgs.texlive.withPackages (ps: [ps.chktex]); - description = '' - The chktex package to use. - Must have the `chktex` executable. - ''; - }; - - onOpenAndSave = mkBool false "Lint using chktex after opening and saving a file."; - - onEdit = mkBool false "Lint using chktex after editing a file."; - - additionalArgs = mkOption { - type = listOf str; - default = []; - description = '' - Additional command line arguments that are passed to chktex after editing a file. - Don't redefine the `-I` and `-f` flags as they are set by the server. - ''; - }; - }; - - symbols = { - enable = mkBool false "Whether to enable setting symbols config."; - - allowedPatterns = mkOption { - type = listOf str; - default = []; - description = '' - A list of regular expressions used to filter the list of reported document symbols. - If specified, only symbols that match at least one of the specified patterns are sent to the client. - Symbols are filtered recursively so nested symbols can still be sent to the client even though the - parent node is removed from the results. - - See also `texlab.symbols.ignoredPatterns`. - - Hint: If both allowedPatterns and ignoredPatterns are set, then allowed patterns are applied first. - Afterwards, the results are filtered with the ignored patterns. - ''; - }; - - ignoredPatterns = mkOption { - type = listOf str; - default = []; - description = '' - A list of regular expressions used to filter the list of reported document symbols. - If specified, only symbols that match none of the specified patterns are sent to the client. - - See also `texlab.symbols.allowedPatterns`. - ''; - }; - - customEnvironments = mkOption { - type = listOf (submodule { - options = { - name = mkOption { - type = str; - description = "The name of the environment."; - }; - displayName = mkOption { - type = nullOr str; - default = null; - description = "The name shown in the document symbols. Defaults to the value of `name`."; - }; - label = mkBool false '' - If set, the server will try to match a label to environment and append its number. - ''; - }; - }); - default = []; - example = [ - { - name = "foo"; - displayName = "bar"; - label = false; - } - ]; - description = '' - A list of objects that allows extending the list of environments that are part of the document symbols. - - See also texlab.symbols.allowedPatterns. - - Type: listOf submodule: - - name: - - type: str - - description: The name of the environment. - - required - - displayName: - - type: nullOr str - - description: The name shown in the document symbols. - - default: - - label: - - type: boolean - - description: If set, the server will try to match a label to environment and append its number. - - default: false - - Note: This functionallity may not be working, please follow https://github.com/latex-lsp/texlab/pull/1311 - for status updates. - ''; - }; - }; - - latexindent = { - local = mkOption { - type = nullOr (either str path); - default = null; - description = '' - Defines the path of a file containing the latexindent configuration. - This corresponds to the --local=file.yaml flag of latexindent. - By default the configuration inside the project root directory is used. - ''; - }; - - modifyLineBreaks = mkBool false '' - Modifies linebreaks before, during, and at the end of code blocks when formatting with latexindent. - This corresponds to the --modifylinebreaks flag of latexindent. - ''; - - replacement = mkOption { - type = nullOr (enum ["-r" "-rv" "-rr"]); - default = null; - description = '' - Defines an additional replacement flag that is added when calling latexindent. This can be one of the following: - - "-r" - - "-rv" - - "-rr" - - null - By default no replacement flag is passed. - ''; - }; - }; - - completion.matcher = mkOption { - type = enum ["fuzzy" "fuzzy-ignore-case" "prefix" "prefix-ignore-case"]; - default = "fuzzy-ignore-case"; - description = '' - Modifies the algorithm used to filter the completion items returned to the client. Possibles values are: - - fuzzy: Fuzzy string matching (case sensitive) - - fuzzy-ignore-case: Fuzzy string matching (case insensitive) - - prefix: Filter out items that do not start with the search text (case sensitive) - - prefix-ignore-case: Filter out items that do not start with the search text (case insensitive) - ''; - }; - - inlayHints = { - labelDefinitions = mkBool true "When enabled, the server will return inlay hints for `\\label-like` commands."; - - labelReferences = mkBool true "When enabled, the server will return inlay hints for `\\ref``-like commands."; - - maxLength = mkOption { - type = nullOr ints.positive; - default = null; - description = "When set, the server will truncate the text of the inlay hints to the specified length."; - }; - }; - experimental = { followPackageLinks = mkBool false "If set to true, dependencies of custom packages are resolved and included in the dependency graph."; @@ -348,31 +181,6 @@ in { }; }; - formatterLineLength = mkOption { - type = ints.positive; - default = 80; - description = "Defines the maximum amount of characters per line (0 = disable) when formatting BibTeX files."; - }; - - bibtexFormatter = mkOption { - type = enum ["texlab" "latexindent"]; - default = "texlab"; - description = '' - Defines the formatter to use for BibTeX formatting. - Possible values are either texlab or latexindent. - ''; - }; - - latexFormatter = mkOption { - type = enum ["texlab" "latexindent"]; - default = "latexindent"; - description = '' - Defines the formatter to use for LaTeX formatting. - Possible values are either texlab or latexindent. - Note that texlab is not implemented yet. - ''; - }; - extraLuaSettings = mkOption { type = attrs; default = {}; @@ -399,6 +207,200 @@ in { ``` ''; }; + + forwardSearch = { + enable = mkBool false '' + Whether to enable forward search. + + Enable this option if you want to have the compiled document appear in your chosen PDF viewer. + + For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). + Note this is not all the options, but can act as a guide to help you allong with custom configs. + ''; + + package = mkOption { + type = package; + default = pkgs.okular; + description = '' + The package to use as your PDF viewer. + This viewer needs to support Synctex. + ''; + }; + + executable = mkOption { + type = str; + default = "okular"; + description = '' + Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. + ''; + }; + + args = mkOption { + type = listOf str; + default = [ + "--unique" + "file:%p#src:%l%f" + ]; + description = '' + Defines additional arguments that are passed to the configured previewer to perform the forward search. + The placeholders %f, %p, %l will be replaced by the server. + + Placeholders: + - %f: The path of the current TeX file. + - %p: The path of the current PDF file. + - %l: The current line number. + ''; + }; + }; + + formatter = { + formatterLineLength = mkOption { + type = ints.positive; + default = 80; + description = "Defines the maximum amount of characters per line (0 = disable) when formatting BibTeX files."; + }; + + bibtexFormatter = mkOption { + type = enum ["texlab" "latexindent"]; + default = "texlab"; + description = '' + Defines the formatter to use for BibTeX formatting. + Possible values are either texlab or latexindent. + ''; + }; + + latexFormatter = mkOption { + type = enum ["texlab" "latexindent"]; + default = "latexindent"; + description = '' + Defines the formatter to use for LaTeX formatting. + Possible values are either texlab or latexindent. + Note that texlab is not implemented yet. + ''; + }; + }; + + inlayHints = { + labelDefinitions = mkBool true "When enabled, the server will return inlay hints for `\\label-like` commands."; + + labelReferences = mkBool true "When enabled, the server will return inlay hints for `\\ref``-like commands."; + + maxLength = mkOption { + type = nullOr ints.positive; + default = null; + description = "When set, the server will truncate the text of the inlay hints to the specified length."; + }; + }; + + latexindent = { + local = mkOption { + type = nullOr (either str path); + default = null; + description = '' + Defines the path of a file containing the latexindent configuration. + This corresponds to the --local=file.yaml flag of latexindent. + By default the configuration inside the project root directory is used. + ''; + }; + + modifyLineBreaks = mkBool false '' + Modifies linebreaks before, during, and at the end of code blocks when formatting with latexindent. + This corresponds to the --modifylinebreaks flag of latexindent. + ''; + + replacement = mkOption { + type = nullOr (enum ["-r" "-rv" "-rr"]); + default = null; + description = '' + Defines an additional replacement flag that is added when calling latexindent. This can be one of the following: + - "-r" + - "-rv" + - "-rr" + - null + By default no replacement flag is passed. + ''; + }; + }; + + symbols = { + enable = mkBool false "Whether to enable setting symbols config."; + + allowedPatterns = mkOption { + type = listOf str; + default = []; + description = '' + A list of regular expressions used to filter the list of reported document symbols. + If specified, only symbols that match at least one of the specified patterns are sent to the client. + Symbols are filtered recursively so nested symbols can still be sent to the client even though the + parent node is removed from the results. + + See also `texlab.symbols.ignoredPatterns`. + + Hint: If both allowedPatterns and ignoredPatterns are set, then allowed patterns are applied first. + Afterwards, the results are filtered with the ignored patterns. + ''; + }; + + ignoredPatterns = mkOption { + type = listOf str; + default = []; + description = '' + A list of regular expressions used to filter the list of reported document symbols. + If specified, only symbols that match none of the specified patterns are sent to the client. + + See also `texlab.symbols.allowedPatterns`. + ''; + }; + + customEnvironments = mkOption { + type = listOf (submodule { + options = { + name = mkOption { + type = str; + description = "The name of the environment."; + }; + displayName = mkOption { + type = nullOr str; + default = null; + description = "The name shown in the document symbols. Defaults to the value of `name`."; + }; + label = mkBool false '' + If set, the server will try to match a label to environment and append its number. + ''; + }; + }); + default = []; + example = [ + { + name = "foo"; + displayName = "bar"; + label = false; + } + ]; + description = '' + A list of objects that allows extending the list of environments that are part of the document symbols. + + See also texlab.symbols.allowedPatterns. + + Type: listOf submodule: + - name: + - type: str + - description: The name of the environment. + - required + - displayName: + - type: nullOr str + - description: The name shown in the document symbols. + - default: + - label: + - type: boolean + - description: If set, the server will try to match a label to environment and append its number. + - default: false + + Note: This functionallity may not be working, please follow https://github.com/latex-lsp/texlab/pull/1311 + for status updates. + ''; + }; + }; }; config = mkIf cfg.enable ( @@ -410,40 +412,45 @@ in { # Create texlab settings section setupConfig.settings.texlab = ( { - # -- General Settings -- - formatterLineLength = texlabCfg.formatterLineLength; - - # -- Formatters -- - bibtexFormatter = texlabCfg.bibtexFormatter; - latexFormatter = texlabCfg.latexFormatter; + # -- Completion -- + completion.matcher = texlabCfg.completion.matcher; # -- Diagnostics -- diagnosticsDelay = texlabCfg.diagnostics.delay; diagnostics = { - allowedPatterns = texlabCfg.diagnostics.allowedPatterns; - ignoredPatterns = texlabCfg.diagnostics.ignoredPatterns; + inherit (texlabCfg.diagnostics) allowedPatterns ignoredPatterns; }; - # -- Latex Indent -- - latexindent = texlabCfg.latexindent; + # -- Experimental -- + experimental = texlabCfg.experimental; - # -- Completion -- - completion.matcher = texlabCfg.completion.matcher; + # -- Formatters -- + inherit (texlabCfg.formatter) formatterLineLength bibtexFormatter latexFormatter; # -- Inlay Hints -- inlayHints = texlabCfg.inlayHints; - # -- Experimental -- - experimental = texlabCfg.experimental; + # -- Latex Indent -- + latexindent = texlabCfg.latexindent; } # - # -- Forward Search -- + # -- Build -- // ( - if texlabCfg.forwardSearch.enable + if cfg.build.enable then { - forwardSearch = { - executable = "${texlabCfg.forwardSearch.package}/bin/${texlabCfg.forwardSearch.executable}"; - args = texlabCfg.forwardSearch.args; + build = { + inherit + (cfg.build) + onSave + useFileList + auxDirectory + logDirectory + pdfDirectory + filename + forwardSearchAfter + ; + inherit (builderCfg) args; + executable = "${builderCfg.package}/bin/${builderCfg.executable}"; }; } else {} @@ -460,6 +467,18 @@ in { else {} ) # + # -- Forward Search -- + // ( + if texlabCfg.forwardSearch.enable + then { + forwardSearch = { + executable = "${texlabCfg.forwardSearch.package}/bin/${texlabCfg.forwardSearch.executable}"; + args = texlabCfg.forwardSearch.args; + }; + } + else {} + ) + # # -- Symbols -- // ( if texlabCfg.symbols.enable @@ -481,25 +500,6 @@ in { else {} ) # - # -- Build -- - // ( - if cfg.build.enable - then { - build = { - executable = "${builderCfg.package}/bin/${builderCfg.executable}"; - args = builderCfg.args; - forwardSearchAfter = cfg.build.forwardSearchAfter; - onSave = cfg.build.onSave; - useFileList = cfg.build.useFileList; - auxDirectory = cfg.build.auxDirectory; - logDirectory = cfg.build.logDirectory; - pdfDirectory = cfg.build.pdfDirectory; - filename = cfg.build.filename; - }; - } - else {} - ) - # # -- Extra Settings -- // texlabCfg.extraLuaSettings ); From 00c356844a8b9c3916b281661990bc5b90e2a8a1 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 30 Jan 2025 14:52:44 -0700 Subject: [PATCH 37/76] Further Cleanup --- modules/plugins/languages/tex/lsp/texlab.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index fca7c759..58c55f5a 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -6,7 +6,7 @@ }: let inherit (lib.options) mkOption; inherit (lib.modules) mkIf mkMerge; - inherit (lib.types) listOf package str attrs ints enum either path nullOr submodule; + inherit (lib.types) attrs either enum ints listOf nullOr package path str submodule; inherit (lib.nvim.config) mkBool; inherit (builtins) isString map; @@ -50,7 +50,12 @@ in { }; completion.matcher = mkOption { - type = enum ["fuzzy" "fuzzy-ignore-case" "prefix" "prefix-ignore-case"]; + type = enum [ + "fuzzy" + "fuzzy-ignore-case" + "prefix" + "prefix-ignore-case" + ]; default = "fuzzy-ignore-case"; description = '' Modifies the algorithm used to filter the completion items returned to the client. Possibles values are: @@ -127,6 +132,7 @@ in { Hint: Additional commands need to be written without a leading `\` (e. g. `foo` instead of `\foo`). ''; }; + labelDefinitionCommands = mkOption { type = listOf str; default = []; @@ -281,7 +287,7 @@ in { }; inlayHints = { - labelDefinitions = mkBool true "When enabled, the server will return inlay hints for `\\label-like` commands."; + labelDefinitions = mkBool true "When enabled, the server will return inlay hints for `\\label`-like commands."; labelReferences = mkBool true "When enabled, the server will return inlay hints for `\\ref``-like commands."; @@ -472,8 +478,8 @@ in { if texlabCfg.forwardSearch.enable then { forwardSearch = { + inherit (texlabCfg.forwardSearch) args; executable = "${texlabCfg.forwardSearch.package}/bin/${texlabCfg.forwardSearch.executable}"; - args = texlabCfg.forwardSearch.args; }; } else {} From 9524d93bd2638c4b31256526f25ccdc8fbd41a2e Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 30 Jan 2025 17:15:00 -0700 Subject: [PATCH 38/76] Created PDF viewer framework --- modules/plugins/languages/tex/default.nix | 1 + .../languages/tex/pdfViewer/default.nix | 141 ++++++++++++++++++ .../tex/pdfViewer/viewers/default.nix | 6 + .../tex/pdfViewer/viewers/okular.nix | 42 ++++++ .../tex/pdfViewer/viewers/viewerTemplate.nix | 68 +++++++++ 5 files changed, 258 insertions(+) create mode 100644 modules/plugins/languages/tex/pdfViewer/default.nix create mode 100644 modules/plugins/languages/tex/pdfViewer/viewers/default.nix create mode 100644 modules/plugins/languages/tex/pdfViewer/viewers/okular.nix create mode 100644 modules/plugins/languages/tex/pdfViewer/viewers/viewerTemplate.nix diff --git a/modules/plugins/languages/tex/default.nix b/modules/plugins/languages/tex/default.nix index 98ac5f1c..518361d7 100644 --- a/modules/plugins/languages/tex/default.nix +++ b/modules/plugins/languages/tex/default.nix @@ -13,6 +13,7 @@ in { ./treesitter.nix ./lsp ./build + ./pdfViewer ]; options.vim.languages.tex = { diff --git a/modules/plugins/languages/tex/pdfViewer/default.nix b/modules/plugins/languages/tex/pdfViewer/default.nix new file mode 100644 index 00000000..890031dc --- /dev/null +++ b/modules/plugins/languages/tex/pdfViewer/default.nix @@ -0,0 +1,141 @@ +{ + config, + lib, + pkgs, + ... +}: let + defaultPdfViewerName = "okular"; + + inherit (lib) mkOverride; + inherit (lib.options) mkOption; + inherit (lib.modules) mkIf; + inherit (lib.types) str package listOf; + inherit (builtins) filter isAttrs hasAttr attrNames length elemAt; + inherit (lib.nvim.config) mkBool; + + cfg = config.vim.languages.tex; + viewersCfg = cfg.pdfViewer.viewers; + + enabledPdfViewersInfo = let + # This function will sort through the pdf viewer options and count how many + # pdf viewers have been enabled. + # If no viewers have been enabled, the count will be 0 and the name of the + # enabled viewer will be the default pdf viewer defined above. + getEnabledPdfViewersInfo = { + enabledPdfViewersCount ? 0, + index ? 0, + pdfViewerNamesList ? ( + filter ( + x: let + y = viewersCfg.${x}; + in ( + isAttrs y + && hasAttr "enable" y + && hasAttr "package" y + && hasAttr "executable" y + && hasAttr "args" y + ) + ) (attrNames viewersCfg) + ), + currentEnabledPdfViewerName ? defaultPdfViewerName, + }: let + # Get the name of the current pdf viewer being checked if it is enabled + currentPdfViewerName = elemAt pdfViewerNamesList index; + + # Get the current pdf viewer object + currentPdfViewer = viewersCfg.${currentPdfViewerName}; + + # Get the index that will be used for the next iteration + nextIndex = index + 1; + + # Increment the count that is recording the number of enabled pdf viewers if + # this viewer is enabled, otherwise leave it as is. + newEnabledPdfViewersCount = + if currentPdfViewer.enable + then enabledPdfViewersCount + 1 + else enabledPdfViewersCount; + + # If this pdf viewer is enabled, set is as the enabled viewer. + newEnabledPdfViewerName = + if currentPdfViewer.enable + then currentPdfViewerName + else currentEnabledPdfViewerName; + in + # Check that the end of the list of viewers has not been reached + if length pdfViewerNamesList > nextIndex + # If the end of the viewers list has not been reached, call the next iteration + # of the function to process the next viewer + then + getEnabledPdfViewersInfo { + inherit pdfViewerNamesList; + enabledPdfViewersCount = newEnabledPdfViewersCount; + index = nextIndex; + currentEnabledPdfViewerName = newEnabledPdfViewerName; + } + # If the end of the viewers list has been reached, then return the total number + # of viewers that have been enabled and the name of the last viewer that was enabled. + else { + count = newEnabledPdfViewersCount; + enabledViewerName = newEnabledPdfViewerName; + }; + in (getEnabledPdfViewersInfo {}); + + enabledPdfViewerCfg = viewersCfg.${enabledPdfViewersInfo.enabledViewerName}; + +in { + imports = [ + ./viewers + ]; + + options.vim.languages.tex.pdfViewer = { + enable = + mkBool ( + if enabledPdfViewersInfo.count > 1 + then throw "nvf-tex-language does not support having more than 1 pdf viewer enabled!" + else (enabledPdfViewersInfo.count == 1) + ) '' + Whether to enable configuring the pdf viewer. + + By enabling any of the pdfViewers, this option will be automatically set. + If you enable more than one pdf viewer then an error will be thrown. + ''; + + name = mkOption { + type = str; + default = enabledPdfViewerCfg.name; + description = '' + TODO + ''; + }; + + package = mkOption { + type = package; + default = enabledPdfViewerCfg.package; + description = '' + The package to set to use a custom viewer. + ''; + }; + + executable = mkOption { + type = str; + default = enabledPdfViewerCfg.executable; + description = '' + TODO + ''; + }; + + args = mkOption { + type = listOf str; + default = enabledPdfViewerCfg.args; + description = '' + TODO + ''; + }; + }; + + # If the pdf viewer has been enabled, but none of the individual viewers have been enabled, + # then enable the default viewer. + config = mkIf (cfg.enable && cfg.pdfViewer.enable && enabledPdfViewersInfo.count == 0) { + vim.languages.tex.pdfViewer.viewers.${defaultPdfViewerName}.enable = mkOverride 75 true; + }; +} diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/default.nix b/modules/plugins/languages/tex/pdfViewer/viewers/default.nix new file mode 100644 index 00000000..8874fc12 --- /dev/null +++ b/modules/plugins/languages/tex/pdfViewer/viewers/default.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ./okular.nix + ]; +} diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/okular.nix b/modules/plugins/languages/tex/pdfViewer/viewers/okular.nix new file mode 100644 index 00000000..4d0d90d4 --- /dev/null +++ b/modules/plugins/languages/tex/pdfViewer/viewers/okular.nix @@ -0,0 +1,42 @@ +{ + pkgs, + lib, + ... +} @ moduleInheritencePackage: let + # The name of the pdf viewer + name = "okular"; + + # The viewer template + template = import ./viewerTemplate.nix; + + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) package str listOf; +in ( + template { + inherit name moduleInheritencePackage; + + options = { + enable = mkEnableOption "enable okular as the pdf file previewer."; + + package = mkOption { + type = package; + default = pkgs.okular; + description = "okular package"; + }; + + executable = mkOption { + type = str; + default = "okular"; + description = "The executable name to call the viewer."; + }; + + args = mkOption { + type = listOf str; + default = [ "--unique" "file:%p#src:%l%f" ]; + description = "Arguments to pass to the viewer."; + }; + }; + + args = viewerCfg: ( viewerCfg.args ); + } +) diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/viewerTemplate.nix b/modules/plugins/languages/tex/pdfViewer/viewers/viewerTemplate.nix new file mode 100644 index 00000000..64cb2ca2 --- /dev/null +++ b/modules/plugins/languages/tex/pdfViewer/viewers/viewerTemplate.nix @@ -0,0 +1,68 @@ +# This function acts as a template for creating new pdf viewers. +# It enforces providing all the parameters required for creating +# a new pdf viewer for it to be able to work in the existing code. +# +# The first layer requirements are as follows: +{ + # This is the name of the pdf viewer, it will only be used internally and + # MUST match the .nix file that the pdf viewer is implemented in. + name, + # + # Module attribute set. This is the attribute set that the module that is + # defining a pdf viewer is passed as its input. + moduleInheritencePackage, + # + # These are the standard options for the pdf viewer just like creating any + # other module. Some options are required and are described below but + # it will also accept any other options that are provided to it. + options, + # + # These are the command line arguments that will accompany the executable + # when the view command is called. + # This is a function that will take in the cfg of its own pdf viewer. + # i.e. it will be called as "args cfg.pdfViewer.viewers.${name}" + args, + ... +}: let + # Inherit the necessary variables available to any module. + inherit (moduleInheritencePackage) lib config; + # + # Inherit other useful functions. + inherit (lib.modules) mkIf; + # + # Set the cfg variable + cfg = config.vim.languages.tex; + # + # Set the cfg of the viewer itself + viewerCfg = cfg.pdfViewer.viewers.${name}; +in { + # These are the options for the pdf viewer. It will accept any options + # provided to it but some options are mandatory: + options.vim.languages.tex.pdfViewer.viewers.${name} = ({ + # The enable option. This one is self explanatory. + enable, + # + # This is the package option for the pdf viewer. + package, + # + # This is the executable that will be used to call the pdf viewer. + # It, along with package will result in: + # "/bin/" + executable, + # + # Any other options provided are accepted. + ... + } @ opts: + opts) + options; + + # Check that the language, overall pdf viewing, and this pdf viewer have been enabled before making any + # config. + config = mkIf (cfg.enable && viewerCfg.enable) { + vim.languages.tex.pdfViewer = { + inherit name; + inherit (viewerCfg) package executable; + args = args viewerCfg; + }; + }; +} From 95a0125ce082697ae2abef7cfe5664b54df34450 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 30 Jan 2025 18:14:51 -0700 Subject: [PATCH 39/76] PDF Viewer framework bug fixes and integrated functionallity into texlab lsp implementation --- modules/plugins/languages/tex/lsp/texlab.nix | 15 +++-- .../languages/tex/pdfViewer/default.nix | 56 +++++++++---------- .../tex/pdfViewer/viewers/okular.nix | 4 +- .../tex/pdfViewer/viewers/viewerTemplate.nix | 5 +- 4 files changed, 42 insertions(+), 38 deletions(-) diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index 58c55f5a..06b8819e 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -226,31 +226,34 @@ in { package = mkOption { type = package; - default = pkgs.okular; + default = cfg.pdfViewer.package; description = '' The package to use as your PDF viewer. This viewer needs to support Synctex. + + By default it is set to the package of the pdfViewer option. ''; }; executable = mkOption { type = str; - default = "okular"; + default = cfg.pdfViewer.executable; description = '' Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. + + By default it is set to the executable of the pdfViewer option. ''; }; args = mkOption { type = listOf str; - default = [ - "--unique" - "file:%p#src:%l%f" - ]; + default = cfg.pdfViewer.args; description = '' Defines additional arguments that are passed to the configured previewer to perform the forward search. The placeholders %f, %p, %l will be replaced by the server. + By default it is set to the args of the pdfViewer option. + Placeholders: - %f: The path of the current TeX file. - %p: The path of the current PDF file. diff --git a/modules/plugins/languages/tex/pdfViewer/default.nix b/modules/plugins/languages/tex/pdfViewer/default.nix index 890031dc..e27b26a0 100644 --- a/modules/plugins/languages/tex/pdfViewer/default.nix +++ b/modules/plugins/languages/tex/pdfViewer/default.nix @@ -1,17 +1,13 @@ { config, lib, - pkgs, ... }: let defaultPdfViewerName = "okular"; - inherit (lib) mkOverride; inherit (lib.options) mkOption; - inherit (lib.modules) mkIf; inherit (lib.types) str package listOf; inherit (builtins) filter isAttrs hasAttr attrNames length elemAt; - inherit (lib.nvim.config) mkBool; cfg = config.vim.languages.tex; viewersCfg = cfg.pdfViewer.viewers; @@ -52,7 +48,10 @@ # this viewer is enabled, otherwise leave it as is. newEnabledPdfViewersCount = if currentPdfViewer.enable - then enabledPdfViewersCount + 1 + then + if enabledPdfViewersCount > 0 + then throw "nvf-tex-language does not support having more than 1 pdf viewer enabled!" + else enabledPdfViewersCount + 1 else enabledPdfViewersCount; # If this pdf viewer is enabled, set is as the enabled viewer. @@ -81,30 +80,22 @@ in (getEnabledPdfViewersInfo {}); enabledPdfViewerCfg = viewersCfg.${enabledPdfViewersInfo.enabledViewerName}; - in { imports = [ ./viewers ]; options.vim.languages.tex.pdfViewer = { - enable = - mkBool ( - if enabledPdfViewersInfo.count > 1 - then throw "nvf-tex-language does not support having more than 1 pdf viewer enabled!" - else (enabledPdfViewersInfo.count == 1) - ) '' - Whether to enable configuring the pdf viewer. - - By enabling any of the pdfViewers, this option will be automatically set. - If you enable more than one pdf viewer then an error will be thrown. - ''; - name = mkOption { type = str; default = enabledPdfViewerCfg.name; description = '' - TODO + The name of the pdf viewer to use. + + This value will be automatically set when any of the viewers are enabled. + + Setting this option option manually is not recommended but can be used for some very technical nix-ing. + If you wish to use a custom viewer, please use the `custom` entry provided under `viewers`. ''; }; @@ -112,7 +103,12 @@ in { type = package; default = enabledPdfViewerCfg.package; description = '' - The package to set to use a custom viewer. + The package of the pdf viewer to use. + + This value will be automatically set when any of the viewers are enabled. + + Setting this option option manually is not recommended but can be used for some very technical nix-ing. + If you wish to use a custom viewer, please use the `custom` entry provided under `viewers`. ''; }; @@ -120,7 +116,12 @@ in { type = str; default = enabledPdfViewerCfg.executable; description = '' - TODO + The executable for the pdf viewer to use. + + This value will be automatically set when any of the viewers are enabled. + + Setting this option option manually is not recommended but can be used for some very technical nix-ing. + If you wish to use a custom viewer, please use the `custom` entry provided under `viewers`. ''; }; @@ -128,14 +129,13 @@ in { type = listOf str; default = enabledPdfViewerCfg.args; description = '' - TODO + The command line arguments to use when calling the pdf viewer command. + + This value will be automatically set when any of the viewers are enabled. + + Setting this option option manually is not recommended but can be used for some very technical nix-ing. + If you wish to use a custom viewer, please use the `custom` entry provided under `viewers`. ''; }; }; - - # If the pdf viewer has been enabled, but none of the individual viewers have been enabled, - # then enable the default viewer. - config = mkIf (cfg.enable && cfg.pdfViewer.enable && enabledPdfViewersInfo.count == 0) { - vim.languages.tex.pdfViewer.viewers.${defaultPdfViewerName}.enable = mkOverride 75 true; - }; } diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/okular.nix b/modules/plugins/languages/tex/pdfViewer/viewers/okular.nix index 4d0d90d4..74cb88b7 100644 --- a/modules/plugins/languages/tex/pdfViewer/viewers/okular.nix +++ b/modules/plugins/languages/tex/pdfViewer/viewers/okular.nix @@ -32,11 +32,11 @@ in ( args = mkOption { type = listOf str; - default = [ "--unique" "file:%p#src:%l%f" ]; + default = ["--unique" "file:%p#src:%l%f"]; description = "Arguments to pass to the viewer."; }; }; - args = viewerCfg: ( viewerCfg.args ); + argsFunction = viewerCfg: (viewerCfg.args); } ) diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/viewerTemplate.nix b/modules/plugins/languages/tex/pdfViewer/viewers/viewerTemplate.nix index 64cb2ca2..280cf483 100644 --- a/modules/plugins/languages/tex/pdfViewer/viewers/viewerTemplate.nix +++ b/modules/plugins/languages/tex/pdfViewer/viewers/viewerTemplate.nix @@ -21,7 +21,7 @@ # when the view command is called. # This is a function that will take in the cfg of its own pdf viewer. # i.e. it will be called as "args cfg.pdfViewer.viewers.${name}" - args, + argsFunction, ... }: let # Inherit the necessary variables available to any module. @@ -59,10 +59,11 @@ in { # Check that the language, overall pdf viewing, and this pdf viewer have been enabled before making any # config. config = mkIf (cfg.enable && viewerCfg.enable) { + # vim.languages.tex.pdfViewer.viewers.${name} = { vim.languages.tex.pdfViewer = { inherit name; inherit (viewerCfg) package executable; - args = args viewerCfg; + args = argsFunction viewerCfg; }; }; } From 821cefec2758af8cd05bc0f23fe478024f2470cb Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 30 Jan 2025 18:56:32 -0700 Subject: [PATCH 40/76] Added more pdf viewer options --- .../tex/pdfViewer/viewers/custom.nix | 42 +++++++++++++ .../tex/pdfViewer/viewers/default.nix | 4 ++ .../tex/pdfViewer/viewers/qpdfview.nix | 42 +++++++++++++ .../tex/pdfViewer/viewers/sioyek.nix | 59 +++++++++++++++++++ .../tex/pdfViewer/viewers/zathura.nix | 42 +++++++++++++ 5 files changed, 189 insertions(+) create mode 100644 modules/plugins/languages/tex/pdfViewer/viewers/custom.nix create mode 100644 modules/plugins/languages/tex/pdfViewer/viewers/qpdfview.nix create mode 100644 modules/plugins/languages/tex/pdfViewer/viewers/sioyek.nix create mode 100644 modules/plugins/languages/tex/pdfViewer/viewers/zathura.nix diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/custom.nix b/modules/plugins/languages/tex/pdfViewer/viewers/custom.nix new file mode 100644 index 00000000..ec4b331b --- /dev/null +++ b/modules/plugins/languages/tex/pdfViewer/viewers/custom.nix @@ -0,0 +1,42 @@ +{ + pkgs, + lib, + ... +} @ moduleInheritencePackage: let + # The name of the pdf viewer + name = "custom"; + + # The viewer template + template = import ./viewerTemplate.nix; + + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) package str listOf; +in ( + template { + inherit name moduleInheritencePackage; + + options = { + enable = mkEnableOption "enable using a custom pdf viewer."; + + package = mkOption { + type = package; + example = pkgs.okular; + description = "custom viewer package"; + }; + + executable = mkOption { + type = str; + example = "okular"; + description = "The executable name to call the viewer."; + }; + + args = mkOption { + type = listOf str; + example = ["--unique" "file:%p#src:%l%f"]; + description = "Arguments to pass to the viewer."; + }; + }; + + argsFunction = viewerCfg: (viewerCfg.args); + } +) diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/default.nix b/modules/plugins/languages/tex/pdfViewer/viewers/default.nix index 8874fc12..36a0338d 100644 --- a/modules/plugins/languages/tex/pdfViewer/viewers/default.nix +++ b/modules/plugins/languages/tex/pdfViewer/viewers/default.nix @@ -1,6 +1,10 @@ { ... }: { imports = [ + ./custom.nix ./okular.nix + ./sioyek.nix + ./qpdfview.nix + ./zathura.nix ]; } diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/qpdfview.nix b/modules/plugins/languages/tex/pdfViewer/viewers/qpdfview.nix new file mode 100644 index 00000000..dafe93f4 --- /dev/null +++ b/modules/plugins/languages/tex/pdfViewer/viewers/qpdfview.nix @@ -0,0 +1,42 @@ +{ + pkgs, + lib, + ... +} @ moduleInheritencePackage: let + # The name of the pdf viewer + name = "qpdfview"; + + # The viewer template + template = import ./viewerTemplate.nix; + + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) package str listOf; +in ( + template { + inherit name moduleInheritencePackage; + + options = { + enable = mkEnableOption "enable qpdfview as the pdf file previewer."; + + package = mkOption { + type = package; + default = pkgs.qpdfview; + description = "qpdfview package"; + }; + + executable = mkOption { + type = str; + default = "qpdfview"; + description = "The executable name to call the viewer."; + }; + + args = mkOption { + type = listOf str; + default = ["--unique" "%p#src:%f:%l:1"]; + description = "Arguments to pass to the viewer."; + }; + }; + + argsFunction = viewerCfg: (viewerCfg.args); + } +) diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/sioyek.nix b/modules/plugins/languages/tex/pdfViewer/viewers/sioyek.nix new file mode 100644 index 00000000..9ea9f3f8 --- /dev/null +++ b/modules/plugins/languages/tex/pdfViewer/viewers/sioyek.nix @@ -0,0 +1,59 @@ +{ + pkgs, + lib, + ... +} @ moduleInheritencePackage: let + # The name of the pdf viewer + name = "sioyek"; + + # The viewer template + template = import ./viewerTemplate.nix; + + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) package str listOf; +in ( + template { + inherit name moduleInheritencePackage; + + options = { + enable = mkEnableOption "enable sioyek as the pdf file previewer."; + + package = mkOption { + type = package; + default = pkgs.sioyek; + description = "sioyek package"; + }; + + executable = mkOption { + type = str; + default = "sioyek"; + description = "The executable name to call the viewer."; + }; + + args = mkOption { + type = listOf str; + default = [ + "--reuse-window" + "--execute-command" + "toggle_synctex" + "--inverse-search" + "texlab inverse-search -i \"%%1\" -l %%2" + "--forward-search-file" + "%f" + "--forward-search-line" + "%l" + "%p" + ]; + description = '' + Arguments to pass to the viewer. + + By default, this is the only viewer that supports the inverse search feature by + command line arguments and doesn't explicitly require extra tinkering else where + in your config. + ''; + }; + }; + + argsFunction = viewerCfg: (viewerCfg.args); + } +) diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/zathura.nix b/modules/plugins/languages/tex/pdfViewer/viewers/zathura.nix new file mode 100644 index 00000000..b1589b5a --- /dev/null +++ b/modules/plugins/languages/tex/pdfViewer/viewers/zathura.nix @@ -0,0 +1,42 @@ +{ + pkgs, + lib, + ... +} @ moduleInheritencePackage: let + # The name of the pdf viewer + name = "zathura"; + + # The viewer template + template = import ./viewerTemplate.nix; + + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) package str listOf; +in ( + template { + inherit name moduleInheritencePackage; + + options = { + enable = mkEnableOption "enable zathura as the pdf file previewer."; + + package = mkOption { + type = package; + default = pkgs.zathura; + description = "zathura package"; + }; + + executable = mkOption { + type = str; + default = "zathura"; + description = "The executable name to call the viewer."; + }; + + args = mkOption { + type = listOf str; + default = ["--synctex-forward" "%l:1:%f" "%p"]; + description = "Arguments to pass to the viewer."; + }; + }; + + argsFunction = viewerCfg: (viewerCfg.args); + } +) From e08d0b5a4e79c00500ae7b6240dde44ff5c898c8 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Thu, 30 Jan 2025 19:15:22 -0700 Subject: [PATCH 41/76] Reorganized file and options structure for more intuitive use --- .../tex/pdfViewer/{viewers => }/custom.nix | 0 .../plugins/languages/tex/pdfViewer/default.nix | 16 ++++++++++------ .../tex/pdfViewer/{viewers => }/okular.nix | 0 .../tex/pdfViewer/{viewers => }/qpdfview.nix | 0 .../tex/pdfViewer/{viewers => }/sioyek.nix | 0 .../pdfViewer/{viewers => }/viewerTemplate.nix | 10 ++++------ .../languages/tex/pdfViewer/viewers/default.nix | 10 ---------- .../tex/pdfViewer/{viewers => }/zathura.nix | 0 8 files changed, 14 insertions(+), 22 deletions(-) rename modules/plugins/languages/tex/pdfViewer/{viewers => }/custom.nix (100%) rename modules/plugins/languages/tex/pdfViewer/{viewers => }/okular.nix (100%) rename modules/plugins/languages/tex/pdfViewer/{viewers => }/qpdfview.nix (100%) rename modules/plugins/languages/tex/pdfViewer/{viewers => }/sioyek.nix (100%) rename modules/plugins/languages/tex/pdfViewer/{viewers => }/viewerTemplate.nix (85%) delete mode 100644 modules/plugins/languages/tex/pdfViewer/viewers/default.nix rename modules/plugins/languages/tex/pdfViewer/{viewers => }/zathura.nix (100%) diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/custom.nix b/modules/plugins/languages/tex/pdfViewer/custom.nix similarity index 100% rename from modules/plugins/languages/tex/pdfViewer/viewers/custom.nix rename to modules/plugins/languages/tex/pdfViewer/custom.nix diff --git a/modules/plugins/languages/tex/pdfViewer/default.nix b/modules/plugins/languages/tex/pdfViewer/default.nix index e27b26a0..43a16907 100644 --- a/modules/plugins/languages/tex/pdfViewer/default.nix +++ b/modules/plugins/languages/tex/pdfViewer/default.nix @@ -10,7 +10,7 @@ inherit (builtins) filter isAttrs hasAttr attrNames length elemAt; cfg = config.vim.languages.tex; - viewersCfg = cfg.pdfViewer.viewers; + viewerCfg = cfg.pdfViewer; enabledPdfViewersInfo = let # This function will sort through the pdf viewer options and count how many @@ -23,7 +23,7 @@ pdfViewerNamesList ? ( filter ( x: let - y = viewersCfg.${x}; + y = viewerCfg.${x}; in ( isAttrs y && hasAttr "enable" y @@ -31,7 +31,7 @@ && hasAttr "executable" y && hasAttr "args" y ) - ) (attrNames viewersCfg) + ) (attrNames viewerCfg) ), currentEnabledPdfViewerName ? defaultPdfViewerName, }: let @@ -39,7 +39,7 @@ currentPdfViewerName = elemAt pdfViewerNamesList index; # Get the current pdf viewer object - currentPdfViewer = viewersCfg.${currentPdfViewerName}; + currentPdfViewer = viewerCfg.${currentPdfViewerName}; # Get the index that will be used for the next iteration nextIndex = index + 1; @@ -79,10 +79,14 @@ }; in (getEnabledPdfViewersInfo {}); - enabledPdfViewerCfg = viewersCfg.${enabledPdfViewersInfo.enabledViewerName}; + enabledPdfViewerCfg = viewerCfg.${enabledPdfViewersInfo.enabledViewerName}; in { imports = [ - ./viewers + ./custom.nix + ./okular.nix + ./sioyek.nix + ./qpdfview.nix + ./zathura.nix ]; options.vim.languages.tex.pdfViewer = { diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/okular.nix b/modules/plugins/languages/tex/pdfViewer/okular.nix similarity index 100% rename from modules/plugins/languages/tex/pdfViewer/viewers/okular.nix rename to modules/plugins/languages/tex/pdfViewer/okular.nix diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/qpdfview.nix b/modules/plugins/languages/tex/pdfViewer/qpdfview.nix similarity index 100% rename from modules/plugins/languages/tex/pdfViewer/viewers/qpdfview.nix rename to modules/plugins/languages/tex/pdfViewer/qpdfview.nix diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/sioyek.nix b/modules/plugins/languages/tex/pdfViewer/sioyek.nix similarity index 100% rename from modules/plugins/languages/tex/pdfViewer/viewers/sioyek.nix rename to modules/plugins/languages/tex/pdfViewer/sioyek.nix diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/viewerTemplate.nix b/modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix similarity index 85% rename from modules/plugins/languages/tex/pdfViewer/viewers/viewerTemplate.nix rename to modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix index 280cf483..7b2ba93b 100644 --- a/modules/plugins/languages/tex/pdfViewer/viewers/viewerTemplate.nix +++ b/modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix @@ -20,7 +20,7 @@ # These are the command line arguments that will accompany the executable # when the view command is called. # This is a function that will take in the cfg of its own pdf viewer. - # i.e. it will be called as "args cfg.pdfViewer.viewers.${name}" + # i.e. it will be called as "args cfg.pdfViewer.${name}" argsFunction, ... }: let @@ -34,11 +34,11 @@ cfg = config.vim.languages.tex; # # Set the cfg of the viewer itself - viewerCfg = cfg.pdfViewer.viewers.${name}; + viewerCfg = cfg.pdfViewer.${name}; in { # These are the options for the pdf viewer. It will accept any options # provided to it but some options are mandatory: - options.vim.languages.tex.pdfViewer.viewers.${name} = ({ + options.vim.languages.tex.pdfViewer.${name} = ({ # The enable option. This one is self explanatory. enable, # @@ -56,10 +56,8 @@ in { opts) options; - # Check that the language, overall pdf viewing, and this pdf viewer have been enabled before making any - # config. + # Check that the language and this pdf viewer have been enabled before making any config. config = mkIf (cfg.enable && viewerCfg.enable) { - # vim.languages.tex.pdfViewer.viewers.${name} = { vim.languages.tex.pdfViewer = { inherit name; inherit (viewerCfg) package executable; diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/default.nix b/modules/plugins/languages/tex/pdfViewer/viewers/default.nix deleted file mode 100644 index 36a0338d..00000000 --- a/modules/plugins/languages/tex/pdfViewer/viewers/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ ... }: -{ - imports = [ - ./custom.nix - ./okular.nix - ./sioyek.nix - ./qpdfview.nix - ./zathura.nix - ]; -} diff --git a/modules/plugins/languages/tex/pdfViewer/viewers/zathura.nix b/modules/plugins/languages/tex/pdfViewer/zathura.nix similarity index 100% rename from modules/plugins/languages/tex/pdfViewer/viewers/zathura.nix rename to modules/plugins/languages/tex/pdfViewer/zathura.nix From fe84f0e56fe1f616c4f9f82b8af1758553660310 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Mon, 10 Feb 2025 15:24:39 -0700 Subject: [PATCH 42/76] Fixed typos and formatting --- .../languages/tex/build/builders/builderTemplate.nix | 4 ++-- .../plugins/languages/tex/build/builders/latexmk.nix | 6 +++--- .../languages/tex/build/builders/tectonic.nix | 6 +++--- modules/plugins/languages/tex/default.nix | 2 +- modules/plugins/languages/tex/lsp/texlab.nix | 12 ++++++------ modules/plugins/languages/tex/pdfViewer/custom.nix | 4 ++-- modules/plugins/languages/tex/pdfViewer/okular.nix | 4 ++-- modules/plugins/languages/tex/pdfViewer/qpdfview.nix | 4 ++-- modules/plugins/languages/tex/pdfViewer/sioyek.nix | 4 ++-- .../languages/tex/pdfViewer/viewerTemplate.nix | 4 ++-- modules/plugins/languages/tex/pdfViewer/zathura.nix | 4 ++-- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/modules/plugins/languages/tex/build/builders/builderTemplate.nix b/modules/plugins/languages/tex/build/builders/builderTemplate.nix index c9cc8163..02d20412 100644 --- a/modules/plugins/languages/tex/build/builders/builderTemplate.nix +++ b/modules/plugins/languages/tex/build/builders/builderTemplate.nix @@ -10,7 +10,7 @@ # # Module attribute set. This is the attribute set that the module that is # defining a builder is passed as its input. - moduleInheritencePackage, + moduleInheritancePackage, # # These are the standard options for the builder just like creating any # other module. Some options are required and are described below but @@ -25,7 +25,7 @@ ... }: let # Inherit the necessary variables available to any module. - inherit (moduleInheritencePackage) lib config; + inherit (moduleInheritancePackage) lib config; # # Inherit other useful functions. inherit (lib.modules) mkIf; diff --git a/modules/plugins/languages/tex/build/builders/latexmk.nix b/modules/plugins/languages/tex/build/builders/latexmk.nix index edc46584..4d024eb3 100644 --- a/modules/plugins/languages/tex/build/builders/latexmk.nix +++ b/modules/plugins/languages/tex/build/builders/latexmk.nix @@ -3,7 +3,7 @@ pkgs, lib, ... -} @ moduleInheritencePackage: let +} @ moduleInheritancePackage: let # The name of the builder name = "latexmk"; @@ -14,14 +14,14 @@ inherit (lib.types) bool package str; in ( template { - inherit name moduleInheritencePackage; + inherit name moduleInheritancePackage; options = { enable = mkEnableOption "Whether to enable Tex Compilation Via latexmk"; package = mkOption { type = package; - default = (pkgs.texlive.withPackages (ps: [ ps.latexmk ])); + default = pkgs.texlive.withPackages (ps: [ps.latexmk]); description = "latexmk package"; }; diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix b/modules/plugins/languages/tex/build/builders/tectonic.nix index ec6e253c..1b131b33 100644 --- a/modules/plugins/languages/tex/build/builders/tectonic.nix +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix @@ -3,7 +3,7 @@ pkgs, lib, ... -} @ moduleInheritencePackage: let +} @ moduleInheritancePackage: let # The name of the builder name = "tectonic"; @@ -18,7 +18,7 @@ cfg = config.vim.languages.tex; in ( template { - inherit name moduleInheritencePackage; + inherit name moduleInheritancePackage; options = { enable = mkEnableOption "Whether to enable Tex Compilation Via Tectonic"; @@ -58,7 +58,7 @@ in ( description = '' Rerun the TeX engine exactly this many times after the first. - Setting this value to 0 will diable setting this option. + Setting this value to 0 will disable setting this option. ''; }; diff --git a/modules/plugins/languages/tex/default.nix b/modules/plugins/languages/tex/default.nix index 518361d7..252e8615 100644 --- a/modules/plugins/languages/tex/default.nix +++ b/modules/plugins/languages/tex/default.nix @@ -35,7 +35,7 @@ in { If no filetype can be determined automatically then by default it will fallback to plaintex. This option will enable setting the tex flavor in your lua config and you can set its value - useing the `vim.languages.tex.lsp.extraOpts.texFlavor.flavor = ` in your nvf config. + using the `vim.languages.tex.lsp.extraOpts.texFlavor.flavor = ` in your nvf config. Setting this option to `false` will omit the `vim.g.tex_flavor = ` line from your lua config entirely (unless you manually set it elsewhere of course). diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index 06b8819e..5677d958 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -169,11 +169,11 @@ in { description = '' Allows associating a label definition command with a custom prefix. Consider, ``` - \newcommand{\thm}[1]{\label{thm:#1}} - \thm{foo} + \newcommand{\theorem}[1]{\label{theorem:#1}} + \theorem{foo} ``` - Then setting `texlab.experimental.labelDefinitionPrefixes` to `[["thm", "thm:"]]` and adding "thm" - to `texlab.experimental.labelDefinitionCommands` will make the server recognize the `thm:foo` label. + Then setting `texlab.experimental.labelDefinitionPrefixes` to `[["theorem", "theorem:"]]` and adding "theorem" + to `texlab.experimental.labelDefinitionCommands` will make the server recognize the `theorem:foo` label. ''; }; @@ -221,7 +221,7 @@ in { Enable this option if you want to have the compiled document appear in your chosen PDF viewer. For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). - Note this is not all the options, but can act as a guide to help you allong with custom configs. + Note this is not all the options, but can act as a guide to help you along with custom configs. ''; package = mkOption { @@ -405,7 +405,7 @@ in { - description: If set, the server will try to match a label to environment and append its number. - default: false - Note: This functionallity may not be working, please follow https://github.com/latex-lsp/texlab/pull/1311 + Note: This functionality may not be working, please follow https://github.com/latex-lsp/texlab/pull/1311 for status updates. ''; }; diff --git a/modules/plugins/languages/tex/pdfViewer/custom.nix b/modules/plugins/languages/tex/pdfViewer/custom.nix index ec4b331b..189663fe 100644 --- a/modules/plugins/languages/tex/pdfViewer/custom.nix +++ b/modules/plugins/languages/tex/pdfViewer/custom.nix @@ -2,7 +2,7 @@ pkgs, lib, ... -} @ moduleInheritencePackage: let +} @ moduleInheritancePackage: let # The name of the pdf viewer name = "custom"; @@ -13,7 +13,7 @@ inherit (lib.types) package str listOf; in ( template { - inherit name moduleInheritencePackage; + inherit name moduleInheritancePackage; options = { enable = mkEnableOption "enable using a custom pdf viewer."; diff --git a/modules/plugins/languages/tex/pdfViewer/okular.nix b/modules/plugins/languages/tex/pdfViewer/okular.nix index 74cb88b7..e341fa4d 100644 --- a/modules/plugins/languages/tex/pdfViewer/okular.nix +++ b/modules/plugins/languages/tex/pdfViewer/okular.nix @@ -2,7 +2,7 @@ pkgs, lib, ... -} @ moduleInheritencePackage: let +} @ moduleInheritancePackage: let # The name of the pdf viewer name = "okular"; @@ -13,7 +13,7 @@ inherit (lib.types) package str listOf; in ( template { - inherit name moduleInheritencePackage; + inherit name moduleInheritancePackage; options = { enable = mkEnableOption "enable okular as the pdf file previewer."; diff --git a/modules/plugins/languages/tex/pdfViewer/qpdfview.nix b/modules/plugins/languages/tex/pdfViewer/qpdfview.nix index dafe93f4..ef294bcf 100644 --- a/modules/plugins/languages/tex/pdfViewer/qpdfview.nix +++ b/modules/plugins/languages/tex/pdfViewer/qpdfview.nix @@ -2,7 +2,7 @@ pkgs, lib, ... -} @ moduleInheritencePackage: let +} @ moduleInheritancePackage: let # The name of the pdf viewer name = "qpdfview"; @@ -13,7 +13,7 @@ inherit (lib.types) package str listOf; in ( template { - inherit name moduleInheritencePackage; + inherit name moduleInheritancePackage; options = { enable = mkEnableOption "enable qpdfview as the pdf file previewer."; diff --git a/modules/plugins/languages/tex/pdfViewer/sioyek.nix b/modules/plugins/languages/tex/pdfViewer/sioyek.nix index 9ea9f3f8..a4c647b1 100644 --- a/modules/plugins/languages/tex/pdfViewer/sioyek.nix +++ b/modules/plugins/languages/tex/pdfViewer/sioyek.nix @@ -2,7 +2,7 @@ pkgs, lib, ... -} @ moduleInheritencePackage: let +} @ moduleInheritancePackage: let # The name of the pdf viewer name = "sioyek"; @@ -13,7 +13,7 @@ inherit (lib.types) package str listOf; in ( template { - inherit name moduleInheritencePackage; + inherit name moduleInheritancePackage; options = { enable = mkEnableOption "enable sioyek as the pdf file previewer."; diff --git a/modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix b/modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix index 7b2ba93b..dd81b7a4 100644 --- a/modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix +++ b/modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix @@ -10,7 +10,7 @@ # # Module attribute set. This is the attribute set that the module that is # defining a pdf viewer is passed as its input. - moduleInheritencePackage, + moduleInheritancePackage, # # These are the standard options for the pdf viewer just like creating any # other module. Some options are required and are described below but @@ -25,7 +25,7 @@ ... }: let # Inherit the necessary variables available to any module. - inherit (moduleInheritencePackage) lib config; + inherit (moduleInheritancePackage) lib config; # # Inherit other useful functions. inherit (lib.modules) mkIf; diff --git a/modules/plugins/languages/tex/pdfViewer/zathura.nix b/modules/plugins/languages/tex/pdfViewer/zathura.nix index b1589b5a..99d95498 100644 --- a/modules/plugins/languages/tex/pdfViewer/zathura.nix +++ b/modules/plugins/languages/tex/pdfViewer/zathura.nix @@ -2,7 +2,7 @@ pkgs, lib, ... -} @ moduleInheritencePackage: let +} @ moduleInheritancePackage: let # The name of the pdf viewer name = "zathura"; @@ -13,7 +13,7 @@ inherit (lib.types) package str listOf; in ( template { - inherit name moduleInheritencePackage; + inherit name moduleInheritancePackage; options = { enable = mkEnableOption "enable zathura as the pdf file previewer."; From 0b85f56868ab62c2994af8c0bed68ae491c751ea Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Mon, 10 Feb 2025 17:35:57 -0700 Subject: [PATCH 43/76] Created mkEnableTreesitterOption in the extendend library --- lib/types/default.nix | 2 +- lib/types/languages.nix | 11 +++++++++-- modules/plugins/languages/tex/treesitter.nix | 12 +++++++----- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/lib/types/default.nix b/lib/types/default.nix index c1c16715..98fcaec5 100644 --- a/lib/types/default.nix +++ b/lib/types/default.nix @@ -10,6 +10,6 @@ in { inherit (typesDag) dagOf; inherit (typesPlugin) pluginsOpt extraPluginType mkPluginSetupOption luaInline pluginType borderType; - inherit (typesLanguage) diagnostics mkGrammarOption; + inherit (typesLanguage) diagnostics mkGrammarOption mkEnableTreesitterOption; inherit (customTypes) char hexColor mergelessListOf; } diff --git a/lib/types/languages.nix b/lib/types/languages.nix index b1865c41..29639047 100644 --- a/lib/types/languages.nix +++ b/lib/types/languages.nix @@ -1,7 +1,7 @@ {lib}: let inherit (lib.options) mkOption mkPackageOption; inherit (lib.attrsets) attrNames; - inherit (lib.types) listOf either enum submodule package; + inherit (lib.types) listOf either enum submodule package bool; diagnosticSubmodule = _: { options = { @@ -32,6 +32,13 @@ mkPackageOption pkgs ["${grammar} treesitter"] { default = ["vimPlugins" "nvim-treesitter" "builtGrammars" grammar]; }; + + mkEnableTreesitterOption = config: language: + mkOption { + type = bool; + default = config.vim.languages.enableTreesitter; + description = "Whether to enable ${language} treesitter"; + }; in { - inherit diagnostics diagnosticSubmodule mkGrammarOption; + inherit diagnostics diagnosticSubmodule mkGrammarOption mkEnableTreesitterOption; } diff --git a/modules/plugins/languages/tex/treesitter.nix b/modules/plugins/languages/tex/treesitter.nix index 44459afb..98185ba8 100644 --- a/modules/plugins/languages/tex/treesitter.nix +++ b/modules/plugins/languages/tex/treesitter.nix @@ -4,21 +4,23 @@ lib, ... }: let - inherit (lib.options) mkEnableOption; + # inherit (lib.options) mkEnableOption; inherit (lib.modules) mkIf mkMerge; - inherit (lib.nvim.types) mkGrammarOption; + inherit (lib.nvim.types) mkGrammarOption mkEnableTreesitterOption; cfg = config.vim.languages.tex; - mkEnableTreesitterOption = description: mkEnableOption description // {default = config.vim.languages.enableTreesitter;}; + # mkEnableTreesitterOption = description: mkEnableOption description // {default = config.vim.languages.enableTreesitter;}; in { options.vim.languages.tex.treesitter = { latex = { - enable = mkEnableTreesitterOption "Whether to enable Latex treesitter"; + # enable = mkEnableTreesitterOption "Whether to enable Latex treesitter"; + enable = mkEnableTreesitterOption config "latex"; package = mkGrammarOption pkgs "latex"; }; bibtex = { - enable = mkEnableTreesitterOption "Whether to enable Bibtex treesitter"; + # enable = mkEnableTreesitterOption "Whether to enable Bibtex treesitter"; + enable = mkEnableTreesitterOption config "bibtex"; package = mkGrammarOption pkgs "bibtex"; }; }; From 2bb8154827e0875aa72e6d82befad457b1010131 Mon Sep 17 00:00:00 2001 From: Lin Xianyi Date: Fri, 7 Feb 2025 10:59:42 +0800 Subject: [PATCH 44/76] languages/nix: add lsp options support for nixd --- docs/release-notes/rl-0.8.md | 5 +++++ modules/plugins/languages/nix.nix | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 3ceef93f..9ffd68fd 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -149,3 +149,8 @@ [nezia1](https://github.com/nezia1) - Add support for [nixd](https://github.com/nix-community/nixd) language server. + +[iynaix](https://github.com/iynaix) + +- Add lsp options support for [nixd](https://github.com/nix-community/nixd) + language server. diff --git a/modules/plugins/languages/nix.nix b/modules/plugins/languages/nix.nix index d6ca6d32..1ae2693e 100644 --- a/modules/plugins/languages/nix.nix +++ b/modules/plugins/languages/nix.nix @@ -10,9 +10,9 @@ inherit (lib.modules) mkIf mkMerge; inherit (lib.lists) isList; inherit (lib.strings) optionalString; - inherit (lib.types) enum either listOf package str; + inherit (lib.types) anything attrsOf enum either listOf nullOr package str; inherit (lib.nvim.types) mkGrammarOption diagnostics; - inherit (lib.nvim.lua) expToLua; + inherit (lib.nvim.lua) expToLua toLuaObject; inherit (lib.nvim.languages) diagnosticsToLua; cfg = config.vim.languages.nix; @@ -87,6 +87,7 @@ command = {"${cfg.format.package}/bin/nixfmt"}, }, ''} + options = ${toLuaObject cfg.lsp.options}, }, }, ''} @@ -173,6 +174,12 @@ in { type = either package (listOf str); default = servers.${cfg.lsp.server}.package; }; + + options = mkOption { + type = nullOr (attrsOf anything); + default = null; + description = "Options to pass to nixd LSP server"; + }; }; format = { From 06cb9eb19b7219e3aed1dbf4269d1a8536544623 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 1 Feb 2025 07:31:07 +0300 Subject: [PATCH 45/76] flake: add conform-nvim and nvim-lint --- flake.lock | 34 ++++++++++++++++++++++++++++++++++ flake.nix | 12 ++++++++++++ 2 files changed, 46 insertions(+) diff --git a/flake.lock b/flake.lock index 457ec862..87476e17 100644 --- a/flake.lock +++ b/flake.lock @@ -423,6 +423,22 @@ "type": "github" } }, + "plugin-conform-nvim": { + "flake": false, + "locked": { + "lastModified": 1737787854, + "narHash": "sha256-k/m2gmups5DWChd/vg7X3/3qkcEvfeKS9mc8MFZRx9E=", + "owner": "stevearc", + "repo": "conform.nvim", + "rev": "363243c03102a531a8203311d4f2ae704c620d9b", + "type": "github" + }, + "original": { + "owner": "stevearc", + "repo": "conform.nvim", + "type": "github" + } + }, "plugin-copilot-cmp": { "flake": false, "locked": { @@ -1977,6 +1993,22 @@ "type": "github" } }, + "plugin-nvim-lint": { + "flake": false, + "locked": { + "lastModified": 1737487916, + "narHash": "sha256-DKfivSjBFra/iXIuYQa7Mv5f2LglNbQTr8bQ+sCm8to=", + "owner": "mfussenegger", + "repo": "nvim-lint", + "rev": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87", + "type": "github" + }, + "original": { + "owner": "mfussenegger", + "repo": "nvim-lint", + "type": "github" + } + }, "plugin-nvim-lspconfig": { "flake": false, "locked": { @@ -2836,6 +2868,7 @@ "plugin-cmp-treesitter": "plugin-cmp-treesitter", "plugin-codewindow-nvim": "plugin-codewindow-nvim", "plugin-comment-nvim": "plugin-comment-nvim", + "plugin-conform-nvim": "plugin-conform-nvim", "plugin-copilot-cmp": "plugin-copilot-cmp", "plugin-copilot-lua": "plugin-copilot-lua", "plugin-crates-nvim": "plugin-crates-nvim", @@ -2933,6 +2966,7 @@ "plugin-nvim-dap-ui": "plugin-nvim-dap-ui", "plugin-nvim-docs-view": "plugin-nvim-docs-view", "plugin-nvim-lightbulb": "plugin-nvim-lightbulb", + "plugin-nvim-lint": "plugin-nvim-lint", "plugin-nvim-lspconfig": "plugin-nvim-lspconfig", "plugin-nvim-metals": "plugin-nvim-metals", "plugin-nvim-navbuddy": "plugin-nvim-navbuddy", diff --git a/flake.nix b/flake.nix index 56ff5dd8..c0b01939 100644 --- a/flake.nix +++ b/flake.nix @@ -227,6 +227,18 @@ flake = false; }; + # Formatters + plugin-conform-nvim = { + url = "github:stevearc/conform.nvim"; + flake = false; + }; + + # Diagnostics + plugin-nvim-lint = { + url = "github:mfussenegger/nvim-lint"; + flake = false; + }; + # Copying/Registers plugin-registers = { url = "github:tversteeg/registers.nvim"; From ca17c54b2b79273f900dae81d63953e9e598fae9 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 1 Feb 2025 07:31:29 +0300 Subject: [PATCH 46/76] diagnostics/nvim-lint: init --- modules/plugins/diagnostics/default.nix | 3 +++ .../plugins/diagnostics/nvim-lint/config.nix | 20 ++++++++++++++ .../plugins/diagnostics/nvim-lint/default.nix | 6 +++++ .../diagnostics/nvim-lint/nvim-lint.nix | 27 +++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 modules/plugins/diagnostics/default.nix create mode 100644 modules/plugins/diagnostics/nvim-lint/config.nix create mode 100644 modules/plugins/diagnostics/nvim-lint/default.nix create mode 100644 modules/plugins/diagnostics/nvim-lint/nvim-lint.nix diff --git a/modules/plugins/diagnostics/default.nix b/modules/plugins/diagnostics/default.nix new file mode 100644 index 00000000..3789640d --- /dev/null +++ b/modules/plugins/diagnostics/default.nix @@ -0,0 +1,3 @@ +{ + imports = [./nvim-lint]; +} diff --git a/modules/plugins/diagnostics/nvim-lint/config.nix b/modules/plugins/diagnostics/nvim-lint/config.nix new file mode 100644 index 00000000..dac2c2f4 --- /dev/null +++ b/modules/plugins/diagnostics/nvim-lint/config.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.diagnostics.nvim-lint; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = ["nvim-lint"]; + pluginRC.nvim-lint = entryAnywhere '' + require("lint").setup(${toLuaObject cfg.setupOpts}) + ''; + }; + }; +} diff --git a/modules/plugins/diagnostics/nvim-lint/default.nix b/modules/plugins/diagnostics/nvim-lint/default.nix new file mode 100644 index 00000000..00c526f1 --- /dev/null +++ b/modules/plugins/diagnostics/nvim-lint/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./nvim-lint.nix + ./config.nix + ]; +} diff --git a/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix b/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix new file mode 100644 index 00000000..2211211e --- /dev/null +++ b/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix @@ -0,0 +1,27 @@ +{lib, ...}: let + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) attrsOf listOf str; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.diagnostics.nvim-lint = { + enable = mkEnableOption "asynchronous linter plugin for Neovim [nvim-lint]"; + setupOpts = mkPluginSetupOption "nvim-lint" { + linters_by_ft = mkOption { + type = attrsOf (listOf str); + default = {}; + example = { + text = ["vale"]; + markdown = ["vale"]; + }; + + description = '' + Map of filetype to formatters. This option takes a set of + `key = value` format where the `value` will be converted + to its Lua equivalent. You are responsible for passing the + correct Nix data types to generate a correct Lua value that + conform is able to accept. + ''; + }; + }; + }; +} From 1ca434d1fbd3d60063a113be825f96e089c90d98 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 1 Feb 2025 07:31:51 +0300 Subject: [PATCH 47/76] formatter/conform-nvim: init --- .../plugins/formatter/conform-nvim/config.nix | 20 +++++++ .../formatter/conform-nvim/conform-nvim.nix | 56 +++++++++++++++++++ .../formatter/conform-nvim/default.nix | 6 ++ modules/plugins/formatter/default.nix | 3 + 4 files changed, 85 insertions(+) create mode 100644 modules/plugins/formatter/conform-nvim/config.nix create mode 100644 modules/plugins/formatter/conform-nvim/conform-nvim.nix create mode 100644 modules/plugins/formatter/conform-nvim/default.nix create mode 100644 modules/plugins/formatter/default.nix diff --git a/modules/plugins/formatter/conform-nvim/config.nix b/modules/plugins/formatter/conform-nvim/config.nix new file mode 100644 index 00000000..0b83d813 --- /dev/null +++ b/modules/plugins/formatter/conform-nvim/config.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.formatter.conform-nvim; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = ["conform-nvim"]; + pluginRC.conform-nvim = entryAnywhere '' + require("conform").setup(${toLuaObject cfg.setupOpts}) + ''; + }; + }; +} diff --git a/modules/plugins/formatter/conform-nvim/conform-nvim.nix b/modules/plugins/formatter/conform-nvim/conform-nvim.nix new file mode 100644 index 00000000..423a4f44 --- /dev/null +++ b/modules/plugins/formatter/conform-nvim/conform-nvim.nix @@ -0,0 +1,56 @@ +{ + pkgs, + lib, + ... +}: let + inherit (lib.options) mkOption mkEnableOption literalExpression; + inherit (lib.types) attrs enum; + inherit (lib.nvim.types) mkPluginSetupOption; + inherit (lib.nvim.lua) mkLuaInline; +in { + options.vim.formatter.conform-nvim = { + enable = mkEnableOption "lightweight yet powerful formatter plugin for Neovim [conform-nvim]"; + setupOpts = mkPluginSetupOption "conform.nvim" { + formatters_by_ft = mkOption { + type = attrs; + default = {}; + example = {lua = ["stylua"];}; + description = '' + Map of filetype to formatters. This option takes a set of + `key = value` format where the `value will` be converted + to its Lua equivalent. You are responsible for passing the + correct Nix data types to generate a correct Lua value that + conform is able to accept. + ''; + }; + + default_format_opts = mkOption { + type = attrs; + default = {lsp_format = "fallback";}; + description = "Default values when calling `conform.format()`"; + }; + + format_on_save = mkOption { + type = attrs; + default = { + lsp_format = "fallback"; + timeout_ms = 500; + }; + description = '' + Table that will be passed to `conform.format()`. If this + is set, Conform will run the formatter on save. + ''; + }; + + format_after_save = mkOption { + type = attrs; + default = {lsp_format = "fallback";}; + description = '' + Table that will be passed to `conform.format()`. If this + is set, Conform will run the formatter asynchronously after + save. + ''; + }; + }; + }; +} diff --git a/modules/plugins/formatter/conform-nvim/default.nix b/modules/plugins/formatter/conform-nvim/default.nix new file mode 100644 index 00000000..56c90f3f --- /dev/null +++ b/modules/plugins/formatter/conform-nvim/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./conform-nvim.nix + ./config.nix + ]; +} diff --git a/modules/plugins/formatter/default.nix b/modules/plugins/formatter/default.nix new file mode 100644 index 00000000..f57ad66a --- /dev/null +++ b/modules/plugins/formatter/default.nix @@ -0,0 +1,3 @@ +{ + imports = [./conform-nvim]; +} From 6155e6aad901bfe4132433e16b6ce86b83bebf17 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 1 Feb 2025 07:32:11 +0300 Subject: [PATCH 48/76] modules: import diagnostics and formatter modules --- modules/modules.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/modules.nix b/modules/modules.nix index 65b0c966..c7e198dd 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -23,7 +23,9 @@ "completion" "dashboard" "debugger" + "diagnostics" "filetree" + "formatter" "git" "languages" "lsp" From bd29a5ad64af47f9d404da7124e0a4bfaa360880 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Wed, 5 Feb 2025 06:52:24 +0300 Subject: [PATCH 49/76] flake: move all plugin inputs to npins --- flake.lock | 2892 -------------------------------------------- flake.nix | 895 +------------- npins/default.nix | 80 ++ npins/sources.json | 2015 ++++++++++++++++++++++++++++++ 4 files changed, 2097 insertions(+), 3785 deletions(-) create mode 100644 npins/default.nix create mode 100644 npins/sources.json diff --git a/flake.lock b/flake.lock index 87476e17..c1cda841 100644 --- a/flake.lock +++ b/flake.lock @@ -119,2728 +119,6 @@ "type": "sourcehut" } }, - "plugin-aerial-nvim": { - "flake": false, - "locked": { - "lastModified": 1736064692, - "narHash": "sha256-7YQtkUTACTMfAGoqoFDPmRrqtw+ypxDbeLCTB3sy4Us=", - "owner": "stevearc", - "repo": "aerial.nvim", - "rev": "b3ec25ca8c347fafa976484a6cace162239112e1", - "type": "github" - }, - "original": { - "owner": "stevearc", - "repo": "aerial.nvim", - "type": "github" - } - }, - "plugin-alpha-nvim": { - "flake": false, - "locked": { - "lastModified": 1731604504, - "narHash": "sha256-sNi5qarejYqM4/J7lBZI3gjVLxer5FBPq8K6qjqcMjA=", - "owner": "goolord", - "repo": "alpha-nvim", - "rev": "de72250e054e5e691b9736ee30db72c65d560771", - "type": "github" - }, - "original": { - "owner": "goolord", - "repo": "alpha-nvim", - "type": "github" - } - }, - "plugin-base16": { - "flake": false, - "locked": { - "lastModified": 1716483968, - "narHash": "sha256-GRF/6AobXHamw8TZ3FjL7SI6ulcpwpcohsIuZeCSh2A=", - "owner": "rrethy", - "repo": "base16-nvim", - "rev": "6ac181b5733518040a33017dde654059cd771b7c", - "type": "github" - }, - "original": { - "owner": "rrethy", - "repo": "base16-nvim", - "type": "github" - } - }, - "plugin-blink-cmp": { - "flake": false, - "locked": { - "lastModified": 1736295934, - "narHash": "sha256-MfHI4efAdaoCU8si6YFdznZmSTprthDq3YKuF91z7ss=", - "owner": "saghen", - "repo": "blink.cmp", - "rev": "1cc3b1a908fbcfd15451c4772759549724f38524", - "type": "github" - }, - "original": { - "owner": "saghen", - "repo": "blink.cmp", - "type": "github" - } - }, - "plugin-blink-compat": { - "flake": false, - "locked": { - "lastModified": 1734896240, - "narHash": "sha256-Rrrh+O3FbBnaAnCHwPuQyfhH+XueSkQp6ipEkn6esGY=", - "owner": "saghen", - "repo": "blink.compat", - "rev": "74b251a1e9478c4fa6d7c6bc2921d7124e6f6cbb", - "type": "github" - }, - "original": { - "owner": "saghen", - "repo": "blink.compat", - "type": "github" - } - }, - "plugin-bufdelete-nvim": { - "flake": false, - "locked": { - "lastModified": 1708814161, - "narHash": "sha256-ljUNfmpImtxFCS19HC9kFlaLlqaPDltKtnx1+/6Y33U=", - "owner": "famiu", - "repo": "bufdelete.nvim", - "rev": "f6bcea78afb3060b198125256f897040538bcb81", - "type": "github" - }, - "original": { - "owner": "famiu", - "repo": "bufdelete.nvim", - "type": "github" - } - }, - "plugin-catppuccin": { - "flake": false, - "locked": { - "lastModified": 1735299190, - "narHash": "sha256-lwQLmqm01FihJdad4QRMK23MTrouyOokyuX/3enWjzs=", - "owner": "catppuccin", - "repo": "nvim", - "rev": "f67b886d65a029f12ffa298701fb8f1efd89295d", - "type": "github" - }, - "original": { - "owner": "catppuccin", - "repo": "nvim", - "type": "github" - } - }, - "plugin-ccc": { - "flake": false, - "locked": { - "lastModified": 1727935067, - "narHash": "sha256-OhdR2sAQV5PvlhaKQ6rYneMmvQiN3QfymOeanpAs9wY=", - "owner": "uga-rosa", - "repo": "ccc.nvim", - "rev": "7c639042583c7bdc7ce2e37e5a0e0aa6d0659c6a", - "type": "github" - }, - "original": { - "owner": "uga-rosa", - "repo": "ccc.nvim", - "type": "github" - } - }, - "plugin-cellular-automaton": { - "flake": false, - "locked": { - "lastModified": 1719777869, - "narHash": "sha256-nIv7ISRk0+yWd1lGEwAV6u1U7EFQj/T9F8pU6O0Wf0s=", - "owner": "Eandrju", - "repo": "cellular-automaton.nvim", - "rev": "11aea08aa084f9d523b0142c2cd9441b8ede09ed", - "type": "github" - }, - "original": { - "owner": "Eandrju", - "repo": "cellular-automaton.nvim", - "type": "github" - } - }, - "plugin-chatgpt": { - "flake": false, - "locked": { - "lastModified": 1728720509, - "narHash": "sha256-+YVXAkG4pp7RGs8lGnNFc0kQcUV3O3kYBQaQ5Qa4wB0=", - "owner": "jackMort", - "repo": "ChatGPT.nvim", - "rev": "5b6d296eefc75331e2ff9f0adcffbd7d27862dd6", - "type": "github" - }, - "original": { - "owner": "jackMort", - "repo": "ChatGPT.nvim", - "type": "github" - } - }, - "plugin-cheatsheet-nvim": { - "flake": false, - "locked": { - "lastModified": 1640255456, - "narHash": "sha256-TYkGB7cON2t4GwMaR9H1MDG2j3btBv2AR37ade8kqTY=", - "owner": "sudormrfbin", - "repo": "cheatsheet.nvim", - "rev": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef", - "type": "github" - }, - "original": { - "owner": "sudormrfbin", - "repo": "cheatsheet.nvim", - "type": "github" - } - }, - "plugin-cinnamon-nvim": { - "flake": false, - "locked": { - "lastModified": 1722992123, - "narHash": "sha256-kccQ4iFMSQ8kvE7hYz90hBrsDLo7VohFj/6lEZZiAO8=", - "owner": "declancm", - "repo": "cinnamon.nvim", - "rev": "450cb3247765fed7871b41ef4ce5fa492d834215", - "type": "github" - }, - "original": { - "owner": "declancm", - "repo": "cinnamon.nvim", - "type": "github" - } - }, - "plugin-cmp-buffer": { - "flake": false, - "locked": { - "lastModified": 1660101488, - "narHash": "sha256-dG4U7MtnXThoa/PD+qFtCt76MQ14V1wX8GMYcvxEnbM=", - "owner": "hrsh7th", - "repo": "cmp-buffer", - "rev": "3022dbc9166796b644a841a02de8dd1cc1d311fa", - "type": "github" - }, - "original": { - "owner": "hrsh7th", - "repo": "cmp-buffer", - "type": "github" - } - }, - "plugin-cmp-luasnip": { - "flake": false, - "locked": { - "lastModified": 1730707109, - "narHash": "sha256-86lKQPPyqFz8jzuLajjHMKHrYnwW6+QOcPyQEx6B+gw=", - "owner": "saadparwaiz1", - "repo": "cmp_luasnip", - "rev": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90", - "type": "github" - }, - "original": { - "owner": "saadparwaiz1", - "repo": "cmp_luasnip", - "type": "github" - } - }, - "plugin-cmp-nvim-lsp": { - "flake": false, - "locked": { - "lastModified": 1733823748, - "narHash": "sha256-iaihXNCF5bB5MdeoosD/kc3QtpA/QaIDZVLiLIurBSM=", - "owner": "hrsh7th", - "repo": "cmp-nvim-lsp", - "rev": "99290b3ec1322070bcfb9e846450a46f6efa50f0", - "type": "github" - }, - "original": { - "owner": "hrsh7th", - "repo": "cmp-nvim-lsp", - "type": "github" - } - }, - "plugin-cmp-path": { - "flake": false, - "locked": { - "lastModified": 1664784283, - "narHash": "sha256-thppiiV3wjIaZnAXmsh7j3DUc6ceSCvGzviwFUnoPaI=", - "owner": "hrsh7th", - "repo": "cmp-path", - "rev": "91ff86cd9c29299a64f968ebb45846c485725f23", - "type": "github" - }, - "original": { - "owner": "hrsh7th", - "repo": "cmp-path", - "type": "github" - } - }, - "plugin-cmp-treesitter": { - "flake": false, - "locked": { - "lastModified": 1715596479, - "narHash": "sha256-8WAk9S+/7vSz7bVHdEzjbKUokU144fvnByIeJ1gAWhU=", - "owner": "ray-x", - "repo": "cmp-treesitter", - "rev": "958fcfa0d8ce46d215e19cc3992c542f576c4123", - "type": "github" - }, - "original": { - "owner": "ray-x", - "repo": "cmp-treesitter", - "type": "github" - } - }, - "plugin-codewindow-nvim": { - "flake": false, - "locked": { - "lastModified": 1717593052, - "narHash": "sha256-HAqVTAkFZ1/vBiBP/QDE1fmwOl/PbznAxz/jmUFxs88=", - "owner": "gorbit99", - "repo": "codewindow.nvim", - "rev": "dd7017617962943eb1d152fc58940f11c6775a4a", - "type": "github" - }, - "original": { - "owner": "gorbit99", - "repo": "codewindow.nvim", - "type": "github" - } - }, - "plugin-comment-nvim": { - "flake": false, - "locked": { - "lastModified": 1717957420, - "narHash": "sha256-h0kPue5Eqd5aeu4VoLH45pF0DmWWo1d8SnLICSQ63zc=", - "owner": "numToStr", - "repo": "Comment.nvim", - "rev": "e30b7f2008e52442154b66f7c519bfd2f1e32acb", - "type": "github" - }, - "original": { - "owner": "numToStr", - "repo": "Comment.nvim", - "type": "github" - } - }, - "plugin-conform-nvim": { - "flake": false, - "locked": { - "lastModified": 1737787854, - "narHash": "sha256-k/m2gmups5DWChd/vg7X3/3qkcEvfeKS9mc8MFZRx9E=", - "owner": "stevearc", - "repo": "conform.nvim", - "rev": "363243c03102a531a8203311d4f2ae704c620d9b", - "type": "github" - }, - "original": { - "owner": "stevearc", - "repo": "conform.nvim", - "type": "github" - } - }, - "plugin-copilot-cmp": { - "flake": false, - "locked": { - "lastModified": 1733947099, - "narHash": "sha256-erRL8bY/zuwuCZfttw+avTrFV7pjv2H6v73NzY2bymM=", - "owner": "zbirenbaum", - "repo": "copilot-cmp", - "rev": "15fc12af3d0109fa76b60b5cffa1373697e261d1", - "type": "github" - }, - "original": { - "owner": "zbirenbaum", - "repo": "copilot-cmp", - "type": "github" - } - }, - "plugin-copilot-lua": { - "flake": false, - "locked": { - "lastModified": 1734926641, - "narHash": "sha256-c2UE0dLBtoYMvMxg+jXzfsD+wN9sZLvftJq4gGmooZU=", - "owner": "zbirenbaum", - "repo": "copilot.lua", - "rev": "886ee73b6d464b2b3e3e6a7ff55ce87feac423a9", - "type": "github" - }, - "original": { - "owner": "zbirenbaum", - "repo": "copilot.lua", - "type": "github" - } - }, - "plugin-crates-nvim": { - "flake": false, - "locked": { - "lastModified": 1727384188, - "narHash": "sha256-DIG0MXRTit4iEVoLlgsTK4znjam/QDjeZEpIDn6KHiE=", - "owner": "Saecki", - "repo": "crates.nvim", - "rev": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785", - "type": "github" - }, - "original": { - "owner": "Saecki", - "repo": "crates.nvim", - "type": "github" - } - }, - "plugin-csharpls-extended": { - "flake": false, - "locked": { - "lastModified": 1734491815, - "narHash": "sha256-jO/vuNgP8JAOIturzPFvxMLL5y+6YTYsUxjWwX6Nyso=", - "owner": "Decodetalkers", - "repo": "csharpls-extended-lsp.nvim", - "rev": "4f56c06215d10c4fcfee8a7f04ba766c114aece0", - "type": "github" - }, - "original": { - "owner": "Decodetalkers", - "repo": "csharpls-extended-lsp.nvim", - "type": "github" - } - }, - "plugin-dashboard-nvim": { - "flake": false, - "locked": { - "lastModified": 1730526793, - "narHash": "sha256-Qi8kmC3U8Tvxh0pWIBtN3DuWJioEGWn7FqQ8lQwauRo=", - "owner": "glepnir", - "repo": "dashboard-nvim", - "rev": "ae309606940d26d8c9df8b048a6e136b6bbec478", - "type": "github" - }, - "original": { - "owner": "glepnir", - "repo": "dashboard-nvim", - "type": "github" - } - }, - "plugin-diffview-nvim": { - "flake": false, - "locked": { - "lastModified": 1718279802, - "narHash": "sha256-SX+ybIzL/w6uyCy4iZKnWnzTFwqB1oXSgyYVAdpdKi8=", - "owner": "sindrets", - "repo": "diffview.nvim", - "rev": "4516612fe98ff56ae0415a259ff6361a89419b0a", - "type": "github" - }, - "original": { - "owner": "sindrets", - "repo": "diffview.nvim", - "type": "github" - } - }, - "plugin-dracula": { - "flake": false, - "locked": { - "lastModified": 1734597715, - "narHash": "sha256-9iRI5NW3mcVzduitY4sr679dRWAWVbZuCAEfgM1OIOs=", - "owner": "Mofiqul", - "repo": "dracula.nvim", - "rev": "515acae4fd294fcefa5b15237a333c2606e958d1", - "type": "github" - }, - "original": { - "owner": "Mofiqul", - "repo": "dracula.nvim", - "type": "github" - } - }, - "plugin-dressing-nvim": { - "flake": false, - "locked": { - "lastModified": 1734804193, - "narHash": "sha256-N4hB5wDgoqXrXxSfzDCrqmdDtdVvq+PtOS7FBPH7qXE=", - "owner": "stevearc", - "repo": "dressing.nvim", - "rev": "3a45525bb182730fe462325c99395529308f431e", - "type": "github" - }, - "original": { - "owner": "stevearc", - "repo": "dressing.nvim", - "type": "github" - } - }, - "plugin-elixir-tools": { - "flake": false, - "locked": { - "lastModified": 1735076861, - "narHash": "sha256-CoGTVSKifjqshk8hYaQfFYTYgEGsIb1hKdz6fIS81iU=", - "owner": "elixir-tools", - "repo": "elixir-tools.nvim", - "rev": "803fa69dbb457305cff98e3997bed2c4b51aea7c", - "type": "github" - }, - "original": { - "owner": "elixir-tools", - "repo": "elixir-tools.nvim", - "type": "github" - } - }, - "plugin-fastaction-nvim": { - "flake": false, - "locked": { - "lastModified": 1734546047, - "narHash": "sha256-1GSxTyXqufjkRtNK3drWlCn/mGJ9mM9bHMR6ZwWT6X8=", - "owner": "Chaitanyabsprip", - "repo": "fastaction.nvim", - "rev": "886e22d85e13115808e81ca367d5aaba02d9a25b", - "type": "github" - }, - "original": { - "owner": "Chaitanyabsprip", - "repo": "fastaction.nvim", - "type": "github" - } - }, - "plugin-fidget-nvim": { - "flake": false, - "locked": { - "lastModified": 1734334336, - "narHash": "sha256-o0za2NxFtzHZa7PRIm9U/P1/fwJrxS1G79ukdGLhJ4Q=", - "owner": "j-hui", - "repo": "fidget.nvim", - "rev": "9238947645ce17d96f30842e61ba81147185b657", - "type": "github" - }, - "original": { - "owner": "j-hui", - "repo": "fidget.nvim", - "type": "github" - } - }, - "plugin-flutter-tools": { - "flake": false, - "locked": { - "lastModified": 1735420417, - "narHash": "sha256-xfSdPhrSUwBYdE9ZA8GgwFvR70nOp+snbNrFHeIfwOM=", - "owner": "akinsho", - "repo": "flutter-tools.nvim", - "rev": "a526c30f1941a7472509aaedda13758f943c968e", - "type": "github" - }, - "original": { - "owner": "akinsho", - "repo": "flutter-tools.nvim", - "type": "github" - } - }, - "plugin-friendly-snippets": { - "flake": false, - "locked": { - "lastModified": 1733106470, - "narHash": "sha256-I8SRZxnoNC6SOWW+scoA77Jwyxcb4eUczppLdyOiZe0=", - "owner": "rafamadriz", - "repo": "friendly-snippets", - "rev": "efff286dd74c22f731cdec26a70b46e5b203c619", - "type": "github" - }, - "original": { - "owner": "rafamadriz", - "repo": "friendly-snippets", - "type": "github" - } - }, - "plugin-fzf-lua": { - "flake": false, - "locked": { - "lastModified": 1737131132, - "narHash": "sha256-0IdADUsIr+SZ0ort92jPPfGIH1EdcwELYz+TCmDCPPI=", - "owner": "ibhagwan", - "repo": "fzf-lua", - "rev": "fbe21aeb147b3dc8b188b5753a8e288ecedcee5e", - "type": "github" - }, - "original": { - "owner": "ibhagwan", - "repo": "fzf-lua", - "type": "github" - } - }, - "plugin-gesture-nvim": { - "flake": false, - "locked": { - "lastModified": 1731669851, - "narHash": "sha256-LTkttlDmKO9ngzrJrMWeeG9R0Bz/PoroCAF2URhUEbM=", - "owner": "notomo", - "repo": "gesture.nvim", - "rev": "dbd839bda337cb73911aeef06897eb29cb99f76f", - "type": "github" - }, - "original": { - "owner": "notomo", - "repo": "gesture.nvim", - "type": "github" - } - }, - "plugin-gitsigns-nvim": { - "flake": false, - "locked": { - "lastModified": 1732361574, - "narHash": "sha256-H7A+AxioiedSuC+jqRwP4c7DjZR/0j4o/fTUasT2urc=", - "owner": "lewis6991", - "repo": "gitsigns.nvim", - "rev": "5f808b5e4fef30bd8aca1b803b4e555da07fc412", - "type": "github" - }, - "original": { - "owner": "lewis6991", - "repo": "gitsigns.nvim", - "type": "github" - } - }, - "plugin-glow-nvim": { - "flake": false, - "locked": { - "lastModified": 1703345545, - "narHash": "sha256-GsNcASzVvY0066kak2nvUY5luzanoBclqcUOsODww8g=", - "owner": "ellisonleao", - "repo": "glow.nvim", - "rev": "238070a686c1da3bccccf1079700eb4b5e19aea4", - "type": "github" - }, - "original": { - "owner": "ellisonleao", - "repo": "glow.nvim", - "type": "github" - } - }, - "plugin-gruvbox": { - "flake": false, - "locked": { - "lastModified": 1732485864, - "narHash": "sha256-qasIg1nvAlUWUUzSZLF36jnoNm8PmQa3owgh0tKGgHk=", - "owner": "ellisonleao", - "repo": "gruvbox.nvim", - "rev": "68c3460a5d1d1a362318960035c9f3466d5011f5", - "type": "github" - }, - "original": { - "owner": "ellisonleao", - "repo": "gruvbox.nvim", - "type": "github" - } - }, - "plugin-haskell-tools-nvim": { - "flake": false, - "locked": { - "lastModified": 1734222260, - "narHash": "sha256-gZVN9ADPO5wFOaf19FydCneb7aKTT9K1vcLoBURPEjk=", - "owner": "mrcjkb", - "repo": "haskell-tools.nvim", - "rev": "943b77b68a79d3991523ba4d373063c9355c6f55", - "type": "github" - }, - "original": { - "owner": "mrcjkb", - "repo": "haskell-tools.nvim", - "type": "github" - } - }, - "plugin-highlight-undo": { - "flake": false, - "locked": { - "lastModified": 1732378966, - "narHash": "sha256-b0JrMu3vbbYgyHPs9hyayMzUypFwugEAxvZOcuRMc/o=", - "owner": "tzachar", - "repo": "highlight-undo.nvim", - "rev": "5f588b420179a31d7073854bfd07ed9d5f364645", - "type": "github" - }, - "original": { - "owner": "tzachar", - "repo": "highlight-undo.nvim", - "type": "github" - } - }, - "plugin-hop-nvim": { - "flake": false, - "locked": { - "lastModified": 1694283445, - "narHash": "sha256-SnuFeD/lrMxKtpBRPgIwdG0kVF7BWe02PiV7URVDASI=", - "owner": "phaazon", - "repo": "hop.nvim", - "rev": "1a1eceafe54b5081eae4cb91c723abd1d450f34b", - "type": "github" - }, - "original": { - "owner": "phaazon", - "repo": "hop.nvim", - "type": "github" - } - }, - "plugin-icon-picker-nvim": { - "flake": false, - "locked": { - "lastModified": 1704321319, - "narHash": "sha256-VZKsVeSmPR3AA8267Mtd5sSTZl2CAqnbgqceCptgp4w=", - "owner": "ziontee113", - "repo": "icon-picker.nvim", - "rev": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3", - "type": "github" - }, - "original": { - "owner": "ziontee113", - "repo": "icon-picker.nvim", - "type": "github" - } - }, - "plugin-image-nvim": { - "flake": false, - "locked": { - "lastModified": 1735173549, - "narHash": "sha256-Sjbmf4BmjkjAorT3tojbC7JivJagFamAVgzwcCipa8k=", - "owner": "3rd", - "repo": "image.nvim", - "rev": "b991fc7f845bc6ab40c6ec00b39750dcd5190010", - "type": "github" - }, - "original": { - "owner": "3rd", - "repo": "image.nvim", - "type": "github" - } - }, - "plugin-indent-blankline": { - "flake": false, - "locked": { - "lastModified": 1733296464, - "narHash": "sha256-H3lUQZDvgj3a2STYeMUDiOYPe7rfsy08tJ4SlDd+LuE=", - "owner": "lukas-reineke", - "repo": "indent-blankline.nvim", - "rev": "259357fa4097e232730341fa60988087d189193a", - "type": "github" - }, - "original": { - "owner": "lukas-reineke", - "repo": "indent-blankline.nvim", - "type": "github" - } - }, - "plugin-leap-nvim": { - "flake": false, - "locked": { - "lastModified": 1722337962, - "narHash": "sha256-PFD/UliAHKk2ga+7p/GmoZGqZFWenIVLkzmO+FkhvrY=", - "owner": "ggandor", - "repo": "leap.nvim", - "rev": "c6bfb191f1161fbabace1f36f578a20ac6c7642c", - "type": "github" - }, - "original": { - "owner": "ggandor", - "repo": "leap.nvim", - "type": "github" - } - }, - "plugin-lsp-lines": { - "flake": false, - "locked": { - "lastModified": 1734793049, - "narHash": "sha256-jHiIZemneQACTDYZXBJqX2/PRTBoxq403ILvt1Ej1ZM=", - "owner": "~whynothugo", - "repo": "lsp_lines.nvim", - "rev": "a92c755f182b89ea91bd8a6a2227208026f27b4d", - "type": "sourcehut" - }, - "original": { - "owner": "~whynothugo", - "repo": "lsp_lines.nvim", - "type": "sourcehut" - } - }, - "plugin-lsp-signature": { - "flake": false, - "locked": { - "lastModified": 1726445971, - "narHash": "sha256-W6bN3R10B84noK7MOzvUOIc82WwyojIS97iFL/dO5yk=", - "owner": "ray-x", - "repo": "lsp_signature.nvim", - "rev": "fc38521ea4d9ec8dbd4c2819ba8126cea743943b", - "type": "github" - }, - "original": { - "owner": "ray-x", - "repo": "lsp_signature.nvim", - "type": "github" - } - }, - "plugin-lspkind": { - "flake": false, - "locked": { - "lastModified": 1733408701, - "narHash": "sha256-OCvKUBGuzwy8OWOL1x3Z3fo+0+GyBMI9TX41xSveqvE=", - "owner": "onsails", - "repo": "lspkind-nvim", - "rev": "d79a1c3299ad0ef94e255d045bed9fa26025dab6", - "type": "github" - }, - "original": { - "owner": "onsails", - "repo": "lspkind-nvim", - "type": "github" - } - }, - "plugin-lspsaga": { - "flake": false, - "locked": { - "lastModified": 1670360222, - "narHash": "sha256-7ENInq3LAPPTdm0Fb7klOc630j8m4LRj1kLZZFYLh68=", - "owner": "tami5", - "repo": "lspsaga.nvim", - "rev": "5faeec9f2508d2d49a66c0ac0d191096b4e3fa81", - "type": "github" - }, - "original": { - "owner": "tami5", - "repo": "lspsaga.nvim", - "type": "github" - } - }, - "plugin-lua-utils-nvim": { - "flake": false, - "locked": { - "lastModified": 1708177208, - "narHash": "sha256-9ildzQEMkXKZ3LHq+khGFgRQFxlIXQclQ7QU3fcU1C4=", - "owner": "nvim-neorg", - "repo": "lua-utils.nvim", - "rev": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd", - "type": "github" - }, - "original": { - "owner": "nvim-neorg", - "repo": "lua-utils.nvim", - "type": "github" - } - }, - "plugin-lualine": { - "flake": false, - "locked": { - "lastModified": 1731050126, - "narHash": "sha256-IN6Qz3jGxUcylYiRTyd8j6me3pAoqJsJXtFUvph/6EI=", - "owner": "hoob3rt", - "repo": "lualine.nvim", - "rev": "2a5bae925481f999263d6f5ed8361baef8df4f83", - "type": "github" - }, - "original": { - "owner": "hoob3rt", - "repo": "lualine.nvim", - "type": "github" - } - }, - "plugin-luasnip": { - "flake": false, - "locked": { - "lastModified": 1733162004, - "narHash": "sha256-efDe3RXncnNVkj37AmIv8oj0DKurB50Dziao5FGTLP4=", - "owner": "L3MON4D3", - "repo": "LuaSnip", - "rev": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d", - "type": "github" - }, - "original": { - "owner": "L3MON4D3", - "repo": "LuaSnip", - "type": "github" - } - }, - "plugin-lz-n": { - "flake": false, - "locked": { - "lastModified": 1735437369, - "narHash": "sha256-6NIXqwmX7RgwiZVEzmTnkJgmrPqFNx12ayIcRgNIaEs=", - "owner": "nvim-neorocks", - "repo": "lz.n", - "rev": "32be28a221b9c98e56841458e4b20c150a4169c4", - "type": "github" - }, - "original": { - "owner": "nvim-neorocks", - "repo": "lz.n", - "type": "github" - } - }, - "plugin-lzn-auto-require": { - "flake": false, - "locked": { - "lastModified": 1731009187, - "narHash": "sha256-KC1z+zC9vKODllZVpBu+udzM12oYJaS8e6LdXWtQ89U=", - "owner": "horriblename", - "repo": "lzn-auto-require", - "rev": "a075ed51976323fd7fc44ccfca89fe0449a08cca", - "type": "github" - }, - "original": { - "owner": "horriblename", - "ref": "require-rewrite", - "repo": "lzn-auto-require", - "type": "github" - } - }, - "plugin-mind-nvim": { - "flake": false, - "locked": { - "lastModified": 1679526071, - "narHash": "sha256-JIhAhQYGLLRucwlhzfckQYU5qjqbHtNH52JlGS5a79w=", - "owner": "phaazon", - "repo": "mind.nvim", - "rev": "002137dd7cf97865ebd01b6a260209d2daf2da66", - "type": "github" - }, - "original": { - "owner": "phaazon", - "repo": "mind.nvim", - "type": "github" - } - }, - "plugin-mini-ai": { - "flake": false, - "locked": { - "lastModified": 1733662803, - "narHash": "sha256-b/776l9nYM9e2atzXrvOk9dCxjzIuW/+iINC/yPv88Y=", - "owner": "echasnovski", - "repo": "mini.ai", - "rev": "ebb04799794a7f94628153991e6334c3304961b8", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.ai", - "type": "github" - } - }, - "plugin-mini-align": { - "flake": false, - "locked": { - "lastModified": 1735582248, - "narHash": "sha256-oHub8dEihIx4kcP3CD9GXG1SUObJUVpH4bg2Z6PmadQ=", - "owner": "echasnovski", - "repo": "mini.align", - "rev": "e715137aece7d05734403d793b8b6b64486bc812", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.align", - "type": "github" - } - }, - "plugin-mini-animate": { - "flake": false, - "locked": { - "lastModified": 1733078395, - "narHash": "sha256-ZePmJuHCCymTgaK46nSg5tRloxs+UKrVgVmT++rGKpc=", - "owner": "echasnovski", - "repo": "mini.animate", - "rev": "d14190ac3040116540889e2ebc25f488b195799e", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.animate", - "type": "github" - } - }, - "plugin-mini-base16": { - "flake": false, - "locked": { - "lastModified": 1734960100, - "narHash": "sha256-VGs4k/xDujPcA0Nv5T18ybSv1iqnzg0AFmaweRdhvDM=", - "owner": "echasnovski", - "repo": "mini.base16", - "rev": "23453dacc1606e5d42238d82f0b42a2985386b62", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.base16", - "type": "github" - } - }, - "plugin-mini-basics": { - "flake": false, - "locked": { - "lastModified": 1730194519, - "narHash": "sha256-R8POaMcgb6SBOxIpanZsswieywapnU7zDNjQMRTkR8U=", - "owner": "echasnovski", - "repo": "mini.basics", - "rev": "67c10b3436d5d3b892715137f4773e71c6753b13", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.basics", - "type": "github" - } - }, - "plugin-mini-bracketed": { - "flake": false, - "locked": { - "lastModified": 1737036218, - "narHash": "sha256-y+tGFF1H37ES/hnEtr3GJK3GeB6D5s8ZdSpvzl+lh3s=", - "owner": "echasnovski", - "repo": "mini.bracketed", - "rev": "0091e11fabe34973fc038a8d0d0485202742e403", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.bracketed", - "type": "github" - } - }, - "plugin-mini-bufremove": { - "flake": false, - "locked": { - "lastModified": 1730726192, - "narHash": "sha256-CB6ZIlrCQlh2W44Knnb10REDcvj4jcYkW/9CiOaoH2E=", - "owner": "echasnovski", - "repo": "mini.bufremove", - "rev": "285bdac9596ee7375db50c0f76ed04336dcd2685", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.bufremove", - "type": "github" - } - }, - "plugin-mini-clue": { - "flake": false, - "locked": { - "lastModified": 1737130586, - "narHash": "sha256-/0DpZV/jXuhaqBz5j4JN3xmofATlwPMHNSm/uTXALg0=", - "owner": "echasnovski", - "repo": "mini.clue", - "rev": "63e42dad781b9ed4845d90ef1da8c52dfb6dce3f", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.clue", - "type": "github" - } - }, - "plugin-mini-colors": { - "flake": false, - "locked": { - "lastModified": 1730726192, - "narHash": "sha256-B2JahCUhKpYwOJrl+BhSp3UQFiyyMGJAYKGK+uMv3fk=", - "owner": "echasnovski", - "repo": "mini.colors", - "rev": "d64b1c0f520579d905f97208eca85329e664ab88", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.colors", - "type": "github" - } - }, - "plugin-mini-comment": { - "flake": false, - "locked": { - "lastModified": 1736611383, - "narHash": "sha256-vAgBDSVtXCP+rlu+cmXdoZQBGShyH7KfL8E/gvDMfnM=", - "owner": "echasnovski", - "repo": "mini.comment", - "rev": "6e1f9a8ebbf6f693fa3787ceda8ca3bf3cb6aec7", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.comment", - "type": "github" - } - }, - "plugin-mini-completion": { - "flake": false, - "locked": { - "lastModified": 1732271068, - "narHash": "sha256-dlQCfHUQX9rPiSYZSRipezHX0CG/redbV2g7cpwwExY=", - "owner": "echasnovski", - "repo": "mini.completion", - "rev": "6eb9546685c4e1c4af2365b87166d4afa39d8a1b", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.completion", - "type": "github" - } - }, - "plugin-mini-diff": { - "flake": false, - "locked": { - "lastModified": 1735324663, - "narHash": "sha256-dRvW/1lfVShiHmRU0mQA5g5xDyQ0EVtVLLZ0y6WSedg=", - "owner": "echasnovski", - "repo": "mini.diff", - "rev": "00f072250061ef498f91ed226918c9ec31a416a4", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.diff", - "type": "github" - } - }, - "plugin-mini-doc": { - "flake": false, - "locked": { - "lastModified": 1723308950, - "narHash": "sha256-Q3DAEV1ZHS+lFhZKFCNoIjn41ksk7WRrVP2b2d6uSss=", - "owner": "echasnovski", - "repo": "mini.doc", - "rev": "bb73a3d1ff390f7e2740027ea2567017099a237c", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.doc", - "type": "github" - } - }, - "plugin-mini-extra": { - "flake": false, - "locked": { - "lastModified": 1736279066, - "narHash": "sha256-lUJrviUjAmJ70g2y93aNw3e1mHGHoB9lbh44HGP7zQs=", - "owner": "echasnovski", - "repo": "mini.extra", - "rev": "477e3dda7b597b49bc1373951ea7da4da834c352", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.extra", - "type": "github" - } - }, - "plugin-mini-files": { - "flake": false, - "locked": { - "lastModified": 1736535707, - "narHash": "sha256-UHW78m4BiYMMrABwdkyyzQUENgQrVFbWJnmNdRMtr0w=", - "owner": "echasnovski", - "repo": "mini.files", - "rev": "d0f03a5c38836fd2cce3dc80734124959002078c", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.files", - "type": "github" - } - }, - "plugin-mini-fuzzy": { - "flake": false, - "locked": { - "lastModified": 1730726192, - "narHash": "sha256-XvDkDfwPcBxySuz58f2mpWTeo8EsOnMvZUcNI8HNZg8=", - "owner": "echasnovski", - "repo": "mini.fuzzy", - "rev": "faa5a6c0d29c28012c90bd011162963a58715428", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.fuzzy", - "type": "github" - } - }, - "plugin-mini-git": { - "flake": false, - "locked": { - "lastModified": 1736535710, - "narHash": "sha256-rXuKopyZBCBbpKuytCdm8keruSNK1ohk2NdeZv1wifI=", - "owner": "echasnovski", - "repo": "mini-git", - "rev": "fc13dde6cfe87cf25a4fd1ee177c0d157468436b", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini-git", - "type": "github" - } - }, - "plugin-mini-hipatterns": { - "flake": false, - "locked": { - "lastModified": 1733141274, - "narHash": "sha256-zJ8OMzfcBh9NtSg2FHDjB5DFX9C2qZRo8t8lc097sCI=", - "owner": "echasnovski", - "repo": "mini.hipatterns", - "rev": "f34975103a38b3f608219a1324cdfc58ea660b8b", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.hipatterns", - "type": "github" - } - }, - "plugin-mini-hues": { - "flake": false, - "locked": { - "lastModified": 1734960100, - "narHash": "sha256-4y79ejOkRL/fajZ4jC8t4K6EgNbnTsH++mIjmo6G3q0=", - "owner": "echasnovski", - "repo": "mini.hues", - "rev": "ae6ad4c666ff42c1102344fe1eba18bb486f2e46", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.hues", - "type": "github" - } - }, - "plugin-mini-icons": { - "flake": false, - "locked": { - "lastModified": 1737036219, - "narHash": "sha256-w0PxiTj9uiUffZXkMM18IO/b/zPpdRKW9ydyhvXRoqE=", - "owner": "echasnovski", - "repo": "mini.icons", - "rev": "910db5df9724d65371182948f921fce23c2c881e", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.icons", - "type": "github" - } - }, - "plugin-mini-indentscope": { - "flake": false, - "locked": { - "lastModified": 1737036220, - "narHash": "sha256-Mrzc7oHXxyEGqdE003qiC9unScyb7i5A6+l8Do7yxws=", - "owner": "echasnovski", - "repo": "mini.indentscope", - "rev": "613df2830d7faeae7483ba2e736683154b95921e", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.indentscope", - "type": "github" - } - }, - "plugin-mini-jump": { - "flake": false, - "locked": { - "lastModified": 1733662809, - "narHash": "sha256-qMP9ezk4xZov5S4vrUFM62lnc4YkEaZL1EVzdXwDq1Q=", - "owner": "echasnovski", - "repo": "mini.jump", - "rev": "bb93d998c9db6936697746330411f5fb9957145e", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.jump", - "type": "github" - } - }, - "plugin-mini-jump2d": { - "flake": false, - "locked": { - "lastModified": 1733662811, - "narHash": "sha256-+DihKCh6GYwin3H9YD+q30MLMRNXvvb1GtKnfBinGjc=", - "owner": "echasnovski", - "repo": "mini.jump2d", - "rev": "88077058297e80f1c76a18ed801ae9d7064187c6", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.jump2d", - "type": "github" - } - }, - "plugin-mini-map": { - "flake": false, - "locked": { - "lastModified": 1725613927, - "narHash": "sha256-dL+d92+GLAILQ/A1JVCwoe3B5WtwVK01tPuC+fOTB5A=", - "owner": "echasnovski", - "repo": "mini.map", - "rev": "4c58e755d75f9999abcd3b3c6e934734b6a8b098", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.map", - "type": "github" - } - }, - "plugin-mini-misc": { - "flake": false, - "locked": { - "lastModified": 1734103112, - "narHash": "sha256-qnYa4IZk14MGZArmVpn15l+P9cwtFWomBVxRuYHVyXc=", - "owner": "echasnovski", - "repo": "mini.misc", - "rev": "645fb9367c19bb485902e54e5451425981498601", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.misc", - "type": "github" - } - }, - "plugin-mini-move": { - "flake": false, - "locked": { - "lastModified": 1723711319, - "narHash": "sha256-nX0eAlhMnKhAftgM6qeHUuawagumLQMPKDkqZNPLljg=", - "owner": "echasnovski", - "repo": "mini.move", - "rev": "4caa1c212f5ca3d1633d21cfb184808090ed74b1", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.move", - "type": "github" - } - }, - "plugin-mini-notify": { - "flake": false, - "locked": { - "lastModified": 1736790793, - "narHash": "sha256-q27j14OV6LAfoxeqBG75GSiqtqmW37GOPHpmA2fD4gs=", - "owner": "echasnovski", - "repo": "mini.notify", - "rev": "05e598d5b349bd66404d576e6a4d4340aea5f194", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.notify", - "type": "github" - } - }, - "plugin-mini-operators": { - "flake": false, - "locked": { - "lastModified": 1731776514, - "narHash": "sha256-+Zhy0AhuMPSHnM6dqbV45Aa7dS7XJ4mpfcHApSbuy8A=", - "owner": "echasnovski", - "repo": "mini.operators", - "rev": "7cb4dc66c51a3d736d347bbc517dc73dc7d28888", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.operators", - "type": "github" - } - }, - "plugin-mini-pairs": { - "flake": false, - "locked": { - "lastModified": 1728656795, - "narHash": "sha256-PtHxLKU1smVTx655r5SINxuz5CJmZWnBW70T8zJ/oxM=", - "owner": "echasnovski", - "repo": "mini.pairs", - "rev": "7e834c5937d95364cc1740e20d673afe2d034cdb", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.pairs", - "type": "github" - } - }, - "plugin-mini-pick": { - "flake": false, - "locked": { - "lastModified": 1736696004, - "narHash": "sha256-Q4GD0WzUYNtoBMx8pIl6fX5glKn1oflS4HZVC+w/eAM=", - "owner": "echasnovski", - "repo": "mini.pick", - "rev": "09ade94d2c9c5133db9ae00f3693d82eae78e9be", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.pick", - "type": "github" - } - }, - "plugin-mini-sessions": { - "flake": false, - "locked": { - "lastModified": 1735582250, - "narHash": "sha256-vyn8MGyOWFgJ5QVvjYb7K1cKDtg9qWnWYMNf80+kpHk=", - "owner": "echasnovski", - "repo": "mini.sessions", - "rev": "71c9ae596664ac110560d27eb928fc24e22bc53d", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.sessions", - "type": "github" - } - }, - "plugin-mini-snippets": { - "flake": false, - "locked": { - "lastModified": 1736611383, - "narHash": "sha256-How9m7KTo66FrwjZQlgZRmJ5toFKn/+GnUbx/0va3lM=", - "owner": "echasnovski", - "repo": "mini.snippets", - "rev": "72920f62e3dd1330720e94e8f5d42592f3a1ecf8", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.snippets", - "type": "github" - } - }, - "plugin-mini-splitjoin": { - "flake": false, - "locked": { - "lastModified": 1719822504, - "narHash": "sha256-LDIbh5KfupTI4zkYOlLmVCd3DuZRhx5lTASN53VG34g=", - "owner": "echasnovski", - "repo": "mini.splitjoin", - "rev": "3e92f6764e770ba392325cad3a4497adcada695f", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.splitjoin", - "type": "github" - } - }, - "plugin-mini-starter": { - "flake": false, - "locked": { - "lastModified": 1736858747, - "narHash": "sha256-pJYkZUo+L3IeGCRdTipqTzMv+HatpNnyRxshaygKtIw=", - "owner": "echasnovski", - "repo": "mini.starter", - "rev": "4b257cfc93241e8c8cde3f9302d1616ad4e0d036", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.starter", - "type": "github" - } - }, - "plugin-mini-statusline": { - "flake": false, - "locked": { - "lastModified": 1735582251, - "narHash": "sha256-AQ2N93JDjtFpgerWTzRspmxrl9oQuALbeCUxBO4ZPqo=", - "owner": "echasnovski", - "repo": "mini.statusline", - "rev": "1b0edf76fe2af015f8c989385ff949f1db7aade2", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.statusline", - "type": "github" - } - }, - "plugin-mini-surround": { - "flake": false, - "locked": { - "lastModified": 1733662812, - "narHash": "sha256-okWJlG0KOdg1ShvkIIMnPSoOzGd7K84eDcp5kx6eVP8=", - "owner": "echasnovski", - "repo": "mini.surround", - "rev": "aa5e245829dd12d8ff0c96ef11da28681d6049aa", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.surround", - "type": "github" - } - }, - "plugin-mini-tabline": { - "flake": false, - "locked": { - "lastModified": 1729176541, - "narHash": "sha256-nucUqSN8w2xBnDp1dFBgRVVvfVoqZMdx7Zj78wdFAP0=", - "owner": "echasnovski", - "repo": "mini.tabline", - "rev": "06ef4ecaeca2e362c7d31113435d86d144b3cbbe", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.tabline", - "type": "github" - } - }, - "plugin-mini-test": { - "flake": false, - "locked": { - "lastModified": 1729520957, - "narHash": "sha256-NtsX441k84owAAJywq4G2rMvV6d7UR2K75G8oKam+gs=", - "owner": "echasnovski", - "repo": "mini.test", - "rev": "86a64d5a4bf9d73ebf5875edaae0d878f64f5e48", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.test", - "type": "github" - } - }, - "plugin-mini-trailspace": { - "flake": false, - "locked": { - "lastModified": 1725613928, - "narHash": "sha256-JKYvFz8g8kVZvxE44RhwoHXQykghXx7ebW/Mj1ZdJIw=", - "owner": "echasnovski", - "repo": "mini.trailspace", - "rev": "3a328e62559c33014e422fb9ae97afc4208208b1", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.trailspace", - "type": "github" - } - }, - "plugin-mini-visits": { - "flake": false, - "locked": { - "lastModified": 1737036221, - "narHash": "sha256-Q+m1gZ5Obu6Zzo87Djt6VCX76ZjdOiLb0j771jP8uQE=", - "owner": "echasnovski", - "repo": "mini.visits", - "rev": "90f20ba6ab7d3d7cb984fffddd82f5f6c7a6bea7", - "type": "github" - }, - "original": { - "owner": "echasnovski", - "repo": "mini.visits", - "type": "github" - } - }, - "plugin-minimap-vim": { - "flake": false, - "locked": { - "lastModified": 1710689313, - "narHash": "sha256-GR8VAHla5HWry1TAZQv0Xp7iG256vIGeQcBGMxyt310=", - "owner": "wfxr", - "repo": "minimap.vim", - "rev": "395378137e6180762d5b963ca9ad5ac2db5d3283", - "type": "github" - }, - "original": { - "owner": "wfxr", - "repo": "minimap.vim", - "type": "github" - } - }, - "plugin-modes-nvim": { - "flake": false, - "locked": { - "lastModified": 1734414076, - "narHash": "sha256-ShIK8ROowT1yFHgSIVHUFnnQOEMr3YPIqw4ixzR8w8M=", - "owner": "mvllow", - "repo": "modes.nvim", - "rev": "c7a4b1b383606832aab150902719bd5eb5cdb2b0", - "type": "github" - }, - "original": { - "owner": "mvllow", - "repo": "modes.nvim", - "type": "github" - } - }, - "plugin-neo-tree-nvim": { - "flake": false, - "locked": { - "lastModified": 1735302061, - "narHash": "sha256-tZMneZsEbB5bgZgYq4ZWwK25B3vcnn80Q7diKcRoEv4=", - "owner": "nvim-neo-tree", - "repo": "neo-tree.nvim", - "rev": "a9f8943b4c31f8460d25c71e0f463d65e9775f1c", - "type": "github" - }, - "original": { - "owner": "nvim-neo-tree", - "repo": "neo-tree.nvim", - "type": "github" - } - }, - "plugin-neocord": { - "flake": false, - "locked": { - "lastModified": 1733429637, - "narHash": "sha256-g/pq6hFo7duonIl1wWoxbJUTh/IRTH3hHEoQUdoiqKE=", - "owner": "IogaMaster", - "repo": "neocord", - "rev": "4d55d8dab2d5f2f272192add7a2c21982039c699", - "type": "github" - }, - "original": { - "owner": "IogaMaster", - "repo": "neocord", - "type": "github" - } - }, - "plugin-neodev-nvim": { - "flake": false, - "locked": { - "lastModified": 1720260306, - "narHash": "sha256-hOjzlo/IqmV8tYjGwfmcCPEmHYsWnEIwtHZdhpwA1kM=", - "owner": "folke", - "repo": "neodev.nvim", - "rev": "46aa467dca16cf3dfe27098042402066d2ae242d", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "neodev.nvim", - "type": "github" - } - }, - "plugin-neorg": { - "flake": false, - "locked": { - "lastModified": 1734188232, - "narHash": "sha256-xH87caxEebrWLwY/v3xyyOy6PTG/ZqX2OfCdwg/RqDY=", - "owner": "nvim-neorg", - "repo": "neorg", - "rev": "6b945909d84b5aeadc875f9b3f529ec44b9bc60f", - "type": "github" - }, - "original": { - "owner": "nvim-neorg", - "repo": "neorg", - "type": "github" - } - }, - "plugin-neorg-telescope": { - "flake": false, - "locked": { - "lastModified": 1722358034, - "narHash": "sha256-ei4uUqpIQjGKzu5ryu0Hlmis9TS9FJsYnjt4J4QdWlw=", - "owner": "nvim-neorg", - "repo": "neorg-telescope", - "rev": "ddb2556644cae922699a239bbb0fe16e25b084b7", - "type": "github" - }, - "original": { - "owner": "nvim-neorg", - "repo": "neorg-telescope", - "type": "github" - } - }, - "plugin-new-file-template-nvim": { - "flake": false, - "locked": { - "lastModified": 1721518222, - "narHash": "sha256-g0IjJrHRXw7U9goVLzVYUyHBSsDZGHMpi3YZPhg64zA=", - "owner": "otavioschwanck", - "repo": "new-file-template.nvim", - "rev": "6ac66669dbf2dc5cdee184a4fe76d22465ca67e8", - "type": "github" - }, - "original": { - "owner": "otavioschwanck", - "repo": "new-file-template.nvim", - "type": "github" - } - }, - "plugin-noice-nvim": { - "flake": false, - "locked": { - "lastModified": 1734026622, - "narHash": "sha256-OpwgNTGunmy6Y7D/k0T+DFK/WJ8MeVTGWwjiPTQlvEY=", - "owner": "folke", - "repo": "noice.nvim", - "rev": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "noice.nvim", - "type": "github" - } - }, - "plugin-none-ls": { - "flake": false, - "locked": { - "lastModified": 1708525772, - "narHash": "sha256-VCDUKiy9C3Bu9suf2bI6XSis1+j01oFC3GFPyQxi74c=", - "owner": "nvimtools", - "repo": "none-ls.nvim", - "rev": "bb680d752cec37949faca7a1f509e2fe67ab418a", - "type": "github" - }, - "original": { - "owner": "nvimtools", - "repo": "none-ls.nvim", - "rev": "bb680d752cec37949faca7a1f509e2fe67ab418a", - "type": "github" - } - }, - "plugin-nord": { - "flake": false, - "locked": { - "lastModified": 1737019140, - "narHash": "sha256-ZhDS7Y90DKp+jkUqcoQRf/zHy4DVgSDQXrnl3sBYJXs=", - "owner": "gbprod", - "repo": "nord.nvim", - "rev": "b0f3ed242fd8e5bafa7231367821d46c6c835dd8", - "type": "github" - }, - "original": { - "owner": "gbprod", - "repo": "nord.nvim", - "type": "github" - } - }, - "plugin-nui-nvim": { - "flake": false, - "locked": { - "lastModified": 1733856815, - "narHash": "sha256-6U7E/i5FuNXQy+sF4C5DVxuTPqNKD5wxUgFohpOjm9Q=", - "owner": "MunifTanjim", - "repo": "nui.nvim", - "rev": "53e907ffe5eedebdca1cd503b00aa8692068ca46", - "type": "github" - }, - "original": { - "owner": "MunifTanjim", - "repo": "nui.nvim", - "type": "github" - } - }, - "plugin-nvim-autopairs": { - "flake": false, - "locked": { - "lastModified": 1731803843, - "narHash": "sha256-LbaxiU3ienVBcMKrug3Coppc4R+MD2rjREw7rHQim1w=", - "owner": "windwp", - "repo": "nvim-autopairs", - "rev": "b464658e9b880f463b9f7e6ccddd93fb0013f559", - "type": "github" - }, - "original": { - "owner": "windwp", - "repo": "nvim-autopairs", - "type": "github" - } - }, - "plugin-nvim-bufferline-lua": { - "flake": false, - "locked": { - "lastModified": 1732824069, - "narHash": "sha256-zqz2GMius0gLxtgxt12RmLUVQFVaWe+MQaGCfUGr6bI=", - "owner": "akinsho", - "repo": "nvim-bufferline.lua", - "rev": "261a72b90d6db4ed8014f7bda976bcdc9dd7ce76", - "type": "github" - }, - "original": { - "owner": "akinsho", - "repo": "nvim-bufferline.lua", - "type": "github" - } - }, - "plugin-nvim-cmp": { - "flake": false, - "locked": { - "lastModified": 1734672427, - "narHash": "sha256-Z/Qy2ErbCa7dbjZVuJUkMmb4d24amNunNgRcbCGPfOg=", - "owner": "hrsh7th", - "repo": "nvim-cmp", - "rev": "b555203ce4bd7ff6192e759af3362f9d217e8c89", - "type": "github" - }, - "original": { - "owner": "hrsh7th", - "repo": "nvim-cmp", - "type": "github" - } - }, - "plugin-nvim-colorizer-lua": { - "flake": false, - "locked": { - "lastModified": 1738229011, - "narHash": "sha256-IEgZnIUeNXRKZ4eV1+KknluyKZj68HBWe1EW+LueuGA=", - "owner": "catgoose", - "repo": "nvim-colorizer.lua", - "rev": "9b5fe0450bfb2521c6cea29391e5ec571f129136", - "type": "github" - }, - "original": { - "owner": "catgoose", - "repo": "nvim-colorizer.lua", - "type": "github" - } - }, - "plugin-nvim-cursorline": { - "flake": false, - "locked": { - "lastModified": 1650034925, - "narHash": "sha256-Uhw65p1KBjs8KsVOmTzuiu3XKclxBob8AVdWEt30C/8=", - "owner": "yamatsum", - "repo": "nvim-cursorline", - "rev": "804f0023692653b2b2368462d67d2a87056947f9", - "type": "github" - }, - "original": { - "owner": "yamatsum", - "repo": "nvim-cursorline", - "type": "github" - } - }, - "plugin-nvim-dap": { - "flake": false, - "locked": { - "lastModified": 1735568902, - "narHash": "sha256-5iaXim9bDvSAI6jUXgu2OEk/KivfAsMTRry+UTHs2Gk=", - "owner": "mfussenegger", - "repo": "nvim-dap", - "rev": "ffb077e65259f13be096ea6d603e3575a76b214a", - "type": "github" - }, - "original": { - "owner": "mfussenegger", - "repo": "nvim-dap", - "type": "github" - } - }, - "plugin-nvim-dap-go": { - "flake": false, - "locked": { - "lastModified": 1727922873, - "narHash": "sha256-wcGp5df1ER5T5oLVitWE02OywgJs3V4pazcGU5qVaUY=", - "owner": "leoluz", - "repo": "nvim-dap-go", - "rev": "6aa88167ea1224bcef578e8c7160fe8afbb44848", - "type": "github" - }, - "original": { - "owner": "leoluz", - "repo": "nvim-dap-go", - "type": "github" - } - }, - "plugin-nvim-dap-ui": { - "flake": false, - "locked": { - "lastModified": 1735324898, - "narHash": "sha256-psIBQpx3tV2UWm5hZTMPBANcXHPAX24dIuDq8Qcscxs=", - "owner": "rcarriga", - "repo": "nvim-dap-ui", - "rev": "e94d98649dccb6a3884b66aabc2e07beb279e535", - "type": "github" - }, - "original": { - "owner": "rcarriga", - "repo": "nvim-dap-ui", - "type": "github" - } - }, - "plugin-nvim-docs-view": { - "flake": false, - "locked": { - "lastModified": 1733658747, - "narHash": "sha256-b5aH8Tj+tMk0BjNCgdeCEeR26oQ9NCobj98P7IDgIPY=", - "owner": "amrbashir", - "repo": "nvim-docs-view", - "rev": "1b97f8f954d74c46061bf289b6cea9232484c12c", - "type": "github" - }, - "original": { - "owner": "amrbashir", - "repo": "nvim-docs-view", - "type": "github" - } - }, - "plugin-nvim-lightbulb": { - "flake": false, - "locked": { - "lastModified": 1734997673, - "narHash": "sha256-byvgRJvvt5rhiUVWdreY2jELXoPVld5EKQlOXwjNgWE=", - "owner": "kosayoda", - "repo": "nvim-lightbulb", - "rev": "3ac0791be37ba9cc7939f1ad90ebc5e75abf4eea", - "type": "github" - }, - "original": { - "owner": "kosayoda", - "repo": "nvim-lightbulb", - "type": "github" - } - }, - "plugin-nvim-lint": { - "flake": false, - "locked": { - "lastModified": 1737487916, - "narHash": "sha256-DKfivSjBFra/iXIuYQa7Mv5f2LglNbQTr8bQ+sCm8to=", - "owner": "mfussenegger", - "repo": "nvim-lint", - "rev": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87", - "type": "github" - }, - "original": { - "owner": "mfussenegger", - "repo": "nvim-lint", - "type": "github" - } - }, - "plugin-nvim-lspconfig": { - "flake": false, - "locked": { - "lastModified": 1735439232, - "narHash": "sha256-6a1HjpLYdZ+ZmWM1B0tv631A3EHHstPrjaV15UnVtoY=", - "owner": "neovim", - "repo": "nvim-lspconfig", - "rev": "8b15a1a597a59f4f5306fad9adfe99454feab743", - "type": "github" - }, - "original": { - "owner": "neovim", - "repo": "nvim-lspconfig", - "type": "github" - } - }, - "plugin-nvim-metals": { - "flake": false, - "locked": { - "lastModified": 1735386491, - "narHash": "sha256-G9V7fX65uW4z7kiuiP8mLtEjLoTJ1mkltj51OlN5/oM=", - "owner": "scalameta", - "repo": "nvim-metals", - "rev": "e6b02c99161b43c67cfe1d6e5f9a9b9a0bb4701c", - "type": "github" - }, - "original": { - "owner": "scalameta", - "repo": "nvim-metals", - "type": "github" - } - }, - "plugin-nvim-navbuddy": { - "flake": false, - "locked": { - "lastModified": 1716111817, - "narHash": "sha256-sZ1M27qNbLMHKR4Zu0NfJoBcQxJbhmW7Cx74Acirlww=", - "owner": "SmiteshP", - "repo": "nvim-navbuddy", - "rev": "f22bac988f2dd073601d75ba39ea5636ab6e38cb", - "type": "github" - }, - "original": { - "owner": "SmiteshP", - "repo": "nvim-navbuddy", - "type": "github" - } - }, - "plugin-nvim-navic": { - "flake": false, - "locked": { - "lastModified": 1701345631, - "narHash": "sha256-0p5n/V8Jlj9XyxV/fuMwsbQ7oV5m9H2GqZZEA/njxCQ=", - "owner": "SmiteshP", - "repo": "nvim-navic", - "rev": "8649f694d3e76ee10c19255dece6411c29206a54", - "type": "github" - }, - "original": { - "owner": "SmiteshP", - "repo": "nvim-navic", - "type": "github" - } - }, - "plugin-nvim-neoclip": { - "flake": false, - "locked": { - "lastModified": 1734898459, - "narHash": "sha256-RCMZi1DM9JFrXWQ5w2wOjFzpANkiukn+RvHB9swMtbk=", - "owner": "AckslD", - "repo": "nvim-neoclip.lua", - "rev": "5e5e010251281f4aea69cfc1d4976ffe6065cf0f", - "type": "github" - }, - "original": { - "owner": "AckslD", - "repo": "nvim-neoclip.lua", - "type": "github" - } - }, - "plugin-nvim-nio": { - "flake": false, - "locked": { - "lastModified": 1720707425, - "narHash": "sha256-i6imNTb1xrfBlaeOyxyIwAZ/+o6ew9C4/z34a7/BgFg=", - "owner": "nvim-neotest", - "repo": "nvim-nio", - "rev": "a428f309119086dc78dd4b19306d2d67be884eee", - "type": "github" - }, - "original": { - "owner": "nvim-neotest", - "repo": "nvim-nio", - "type": "github" - } - }, - "plugin-nvim-notify": { - "flake": false, - "locked": { - "lastModified": 1735562588, - "narHash": "sha256-9jDpoLLto9WgTsV399WeE2XGrTJXWTYbcJ+zOFWldAA=", - "owner": "rcarriga", - "repo": "nvim-notify", - "rev": "c3797193536711b5d8983975791c4b11dc35ab3a", - "type": "github" - }, - "original": { - "owner": "rcarriga", - "repo": "nvim-notify", - "type": "github" - } - }, - "plugin-nvim-scrollbar": { - "flake": false, - "locked": { - "lastModified": 1729162132, - "narHash": "sha256-/nB7eP2Rz/A9zMXrNEH4FReo6eZS0C/SEGvKhxV7AUA=", - "owner": "petertriho", - "repo": "nvim-scrollbar", - "rev": "6994eb9f73d5fdc36ee2c8717940e8c853e51a49", - "type": "github" - }, - "original": { - "owner": "petertriho", - "repo": "nvim-scrollbar", - "type": "github" - } - }, - "plugin-nvim-session-manager": { - "flake": false, - "locked": { - "lastModified": 1728423652, - "narHash": "sha256-W9jtfVXHC8MQJwdbxakNqhd+xh/auQb3U09XKdN2Wzw=", - "owner": "Shatur", - "repo": "neovim-session-manager", - "rev": "ce43f2eb2a52492157d7742e5f684b9a42bb3e5c", - "type": "github" - }, - "original": { - "owner": "Shatur", - "repo": "neovim-session-manager", - "type": "github" - } - }, - "plugin-nvim-surround": { - "flake": false, - "locked": { - "lastModified": 1732818349, - "narHash": "sha256-sC+V86FEDfIapY4Qy0Ch2dTUpqe+C/xEUR/iSIEY6LA=", - "owner": "kylechui", - "repo": "nvim-surround", - "rev": "9f0cb495f25bff32c936062d85046fbda0c43517", - "type": "github" - }, - "original": { - "owner": "kylechui", - "repo": "nvim-surround", - "type": "github" - } - }, - "plugin-nvim-tree-lua": { - "flake": false, - "locked": { - "lastModified": 1734820548, - "narHash": "sha256-4PmP31vYPH9xw4AjV5rDSKvcvZGTnIaPfR4Bwc0lAiA=", - "owner": "nvim-tree", - "repo": "nvim-tree.lua", - "rev": "68fc4c20f5803444277022c681785c5edd11916d", - "type": "github" - }, - "original": { - "owner": "nvim-tree", - "repo": "nvim-tree.lua", - "type": "github" - } - }, - "plugin-nvim-treesitter-context": { - "flake": false, - "locked": { - "lastModified": 1734710732, - "narHash": "sha256-TIFMPKzD2ero1eK9aVfY1iKEvf/Sw8SL/9mk9omCQ3c=", - "owner": "nvim-treesitter", - "repo": "nvim-treesitter-context", - "rev": "2bcf700b59bc92850ca83a1c02e86ba832e0fae0", - "type": "github" - }, - "original": { - "owner": "nvim-treesitter", - "repo": "nvim-treesitter-context", - "type": "github" - } - }, - "plugin-nvim-ts-autotag": { - "flake": false, - "locked": { - "lastModified": 1733164313, - "narHash": "sha256-v2NTFBIzKTYizUPWB3uhpnTGVZWaelhE3MT5+BDA6Do=", - "owner": "windwp", - "repo": "nvim-ts-autotag", - "rev": "1cca23c9da708047922d3895a71032bc0449c52d", - "type": "github" - }, - "original": { - "owner": "windwp", - "repo": "nvim-ts-autotag", - "type": "github" - } - }, - "plugin-nvim-ufo": { - "flake": false, - "locked": { - "lastModified": 1735147722, - "narHash": "sha256-etyfm4KpwjYN+kkotOMl0LgbQniILmqMqab4acMtTlw=", - "owner": "kevinhwang91", - "repo": "nvim-ufo", - "rev": "32cb247b893a384f1888b9cd737264159ecf183c", - "type": "github" - }, - "original": { - "owner": "kevinhwang91", - "repo": "nvim-ufo", - "type": "github" - } - }, - "plugin-nvim-web-devicons": { - "flake": false, - "locked": { - "lastModified": 1735569123, - "narHash": "sha256-h9rY6F+2sBlG9PFN34/0ZTkY66oCeCIPe/HEadM03K4=", - "owner": "nvim-tree", - "repo": "nvim-web-devicons", - "rev": "4adeeaa7a32d46cf3b5833341358c797304f950a", - "type": "github" - }, - "original": { - "owner": "nvim-tree", - "repo": "nvim-web-devicons", - "type": "github" - } - }, - "plugin-obsidian-nvim": { - "flake": false, - "locked": { - "lastModified": 1722536347, - "narHash": "sha256-mbq7fAPmlwOAbWlN3lGX9WGBKTV8cAPZx8pnRCyszJc=", - "owner": "epwalsh", - "repo": "obsidian.nvim", - "rev": "14e0427bef6c55da0d63f9a313fd9941be3a2479", - "type": "github" - }, - "original": { - "owner": "epwalsh", - "repo": "obsidian.nvim", - "type": "github" - } - }, - "plugin-omnisharp-extended": { - "flake": false, - "locked": { - "lastModified": 1732802864, - "narHash": "sha256-lA22ncMWHz2oVcZMPQGpLL3UjjXOXGxhtXR1LX5cX3A=", - "owner": "Hoffs", - "repo": "omnisharp-extended-lsp.nvim", - "rev": "4916fa12e5b28d21a1f031f0bdd10aa15a75d85d", - "type": "github" - }, - "original": { - "owner": "Hoffs", - "repo": "omnisharp-extended-lsp.nvim", - "type": "github" - } - }, - "plugin-onedark": { - "flake": false, - "locked": { - "lastModified": 1731171496, - "narHash": "sha256-NLHq9SUUo81m50NPQe8852uZbo4Mo4No10N3ptX43t0=", - "owner": "navarasu", - "repo": "onedark.nvim", - "rev": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6", - "type": "github" - }, - "original": { - "owner": "navarasu", - "repo": "onedark.nvim", - "type": "github" - } - }, - "plugin-orgmode-nvim": { - "flake": false, - "locked": { - "lastModified": 1734770880, - "narHash": "sha256-E1YJeTay1tX2PgiXwV/DRgrlYHIGUe9/uTA+6ORIhBw=", - "owner": "nvim-orgmode", - "repo": "orgmode", - "rev": "bf657742f7cb56211f99946ff64f5f87d7d7f0d0", - "type": "github" - }, - "original": { - "owner": "nvim-orgmode", - "repo": "orgmode", - "type": "github" - } - }, - "plugin-otter-nvim": { - "flake": false, - "locked": { - "lastModified": 1735130975, - "narHash": "sha256-NPBGcLi1lEmpGGbGs58Xzw1IriOyKTMQdwIdVFsbVDM=", - "owner": "jmbuhr", - "repo": "otter.nvim", - "rev": "e8c662e1aefa8b483cfba6e00729a39a363dcecc", - "type": "github" - }, - "original": { - "owner": "jmbuhr", - "repo": "otter.nvim", - "type": "github" - } - }, - "plugin-oxocarbon": { - "flake": false, - "locked": { - "lastModified": 1724853107, - "narHash": "sha256-Hi/nATEvZ4a6Yxc66KtuJqss6kQV19cmtIlhCw6alOI=", - "owner": "nyoom-engineering", - "repo": "oxocarbon.nvim", - "rev": "004777819ba294423b638a35a75c9f0c7be758ed", - "type": "github" - }, - "original": { - "owner": "nyoom-engineering", - "repo": "oxocarbon.nvim", - "type": "github" - } - }, - "plugin-pathlib-nvim": { - "flake": false, - "locked": { - "lastModified": 1724943804, - "narHash": "sha256-YhCJeNKlcjgg3q51UWFhuIEPzNueC8YTpeuPPJDndvw=", - "owner": "pysan3", - "repo": "pathlib.nvim", - "rev": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1", - "type": "github" - }, - "original": { - "owner": "pysan3", - "repo": "pathlib.nvim", - "type": "github" - } - }, - "plugin-plenary-nvim": { - "flake": false, - "locked": { - "lastModified": 1726602776, - "narHash": "sha256-bmmPekAvuBvLQmrnnX0n+FRBqfVxBsObhxIEkDGAla4=", - "owner": "nvim-lua", - "repo": "plenary.nvim", - "rev": "2d9b06177a975543726ce5c73fca176cedbffe9d", - "type": "github" - }, - "original": { - "owner": "nvim-lua", - "repo": "plenary.nvim", - "type": "github" - } - }, - "plugin-precognition-nvim": { - "flake": false, - "locked": { - "lastModified": 1732647805, - "narHash": "sha256-m3dKoKxCd/QODM+EL89c3RVOoZnuA4nrBG0KhPZ/o9Y=", - "owner": "tris203", - "repo": "precognition.nvim", - "rev": "531971e6d883e99b1572bf47294e22988d8fbec0", - "type": "github" - }, - "original": { - "owner": "tris203", - "repo": "precognition.nvim", - "type": "github" - } - }, - "plugin-project-nvim": { - "flake": false, - "locked": { - "lastModified": 1680567592, - "narHash": "sha256-avV3wMiDbraxW4mqlEsKy0oeewaRj9Q33K8NzWoaptU=", - "owner": "ahmedkhalf", - "repo": "project.nvim", - "rev": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb", - "type": "github" - }, - "original": { - "owner": "ahmedkhalf", - "repo": "project.nvim", - "type": "github" - } - }, - "plugin-promise-async": { - "flake": false, - "locked": { - "lastModified": 1722813441, - "narHash": "sha256-9eM66brPjiFlY64vmBetRYrKnpDyN7+/URMm4GsGimA=", - "owner": "kevinhwang91", - "repo": "promise-async", - "rev": "119e8961014c9bfaf1487bf3c2a393d254f337e2", - "type": "github" - }, - "original": { - "owner": "kevinhwang91", - "repo": "promise-async", - "type": "github" - } - }, - "plugin-rainbow-delimiters": { - "flake": false, - "locked": { - "lastModified": 1736686348, - "narHash": "sha256-zWHXYs3XdnoszqOFY3hA2L5mNn1a44OAeKv3lL3EMEw=", - "owner": "HiPhish", - "repo": "rainbow-delimiters.nvim", - "rev": "85b80abaa09cbbc039e3095b2f515b3cf8cadd11", - "type": "github" - }, - "original": { - "owner": "HiPhish", - "repo": "rainbow-delimiters.nvim", - "type": "github" - } - }, - "plugin-registers": { - "flake": false, - "locked": { - "lastModified": 1730794647, - "narHash": "sha256-M7uR3yXYUQ4I8Gt8P6k25q67UNwksRDPKGrS/FCqrt0=", - "owner": "tversteeg", - "repo": "registers.nvim", - "rev": "c217f8f369e0886776cda6c94eab839b30a8940d", - "type": "github" - }, - "original": { - "owner": "tversteeg", - "repo": "registers.nvim", - "type": "github" - } - }, - "plugin-render-markdown-nvim": { - "flake": false, - "locked": { - "lastModified": 1735525479, - "narHash": "sha256-ncFqBv0JITX3pTsLON+HctLUaKXhLRMBUrRWmI8KOSA=", - "owner": "MeanderingProgrammer", - "repo": "render-markdown.nvim", - "rev": "6fbd1491abc104409f119685de5353c35c97c005", - "type": "github" - }, - "original": { - "owner": "MeanderingProgrammer", - "repo": "render-markdown.nvim", - "type": "github" - } - }, - "plugin-rose-pine": { - "flake": false, - "locked": { - "lastModified": 1733845819, - "narHash": "sha256-ejh9UXQbLc8Ie6wF7zszzL1gaJzr16gcu0dUWqTo8AM=", - "owner": "rose-pine", - "repo": "neovim", - "rev": "91548dca53b36dbb9d36c10f114385f759731be1", - "type": "github" - }, - "original": { - "owner": "rose-pine", - "repo": "neovim", - "type": "github" - } - }, - "plugin-rtp-nvim": { - "flake": false, - "locked": { - "lastModified": 1724409589, - "narHash": "sha256-lmJbiD7I7MTEEpukESs67uAmLyn+p66hrUKLbEHp0Kw=", - "owner": "nvim-neorocks", - "repo": "rtp.nvim", - "rev": "494ddfc888bb466555d90ace731856de1320fe45", - "type": "github" - }, - "original": { - "owner": "nvim-neorocks", - "repo": "rtp.nvim", - "type": "github" - } - }, - "plugin-run-nvim": { - "flake": false, - "locked": { - "lastModified": 1735501787, - "narHash": "sha256-CFOyOARCLQiMOhFPeqz8n2ULyaaRxRZrOk0FCibjuIM=", - "owner": "diniamo", - "repo": "run.nvim", - "rev": "9015c9cece816ccf10a185b420f6e345fd990802", - "type": "github" - }, - "original": { - "owner": "diniamo", - "repo": "run.nvim", - "type": "github" - } - }, - "plugin-rustaceanvim": { - "flake": false, - "locked": { - "lastModified": 1738187731, - "narHash": "sha256-Z4aCPO4MR0Q2ZojT6YBGSa8fb7u5Nd+4Z/rekqhXqDY=", - "owner": "mrcjkb", - "repo": "rustaceanvim", - "rev": "4a2f2d2cc04f5b0aa0981f98bb7d002c898318ad", - "type": "github" - }, - "original": { - "owner": "mrcjkb", - "repo": "rustaceanvim", - "type": "github" - } - }, - "plugin-smartcolumn": { - "flake": false, - "locked": { - "lastModified": 1734696989, - "narHash": "sha256-6RodA5BQnL6tB3RCE5G2RiXqBvM3VP3HYZ+T3AxIF7Q=", - "owner": "m4xshen", - "repo": "smartcolumn.nvim", - "rev": "f14fbea6f86cd29df5042897ca9e3ba10ba4d27f", - "type": "github" - }, - "original": { - "owner": "m4xshen", - "repo": "smartcolumn.nvim", - "type": "github" - } - }, - "plugin-sqls-nvim": { - "flake": false, - "locked": { - "lastModified": 1733090837, - "narHash": "sha256-o5uD6shPkweuE+k/goBX42W3I2oojXVijfJC7L50sGU=", - "owner": "nanotee", - "repo": "sqls.nvim", - "rev": "a514379f5f89bf72955ed3bf5c1c31a40b8a1472", - "type": "github" - }, - "original": { - "owner": "nanotee", - "repo": "sqls.nvim", - "type": "github" - } - }, - "plugin-tabular": { - "flake": false, - "locked": { - "lastModified": 1720022617, - "narHash": "sha256-qmDpdg3Tl3W4JSovRb4ODlrKMjRL5CaVI05YBn0Q0LI=", - "owner": "godlygeek", - "repo": "tabular", - "rev": "12437cd1b53488e24936ec4b091c9324cafee311", - "type": "github" - }, - "original": { - "owner": "godlygeek", - "repo": "tabular", - "type": "github" - } - }, - "plugin-telescope": { - "flake": false, - "locked": { - "lastModified": 1732884846, - "narHash": "sha256-npb61MZYAotz71Co5G1dUeIqWt7GVeqZNz0A2Yz2dy4=", - "owner": "nvim-telescope", - "repo": "telescope.nvim", - "rev": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc", - "type": "github" - }, - "original": { - "owner": "nvim-telescope", - "repo": "telescope.nvim", - "type": "github" - } - }, - "plugin-tiny-devicons-auto-colors": { - "flake": false, - "locked": { - "lastModified": 1733445616, - "narHash": "sha256-klUZKvdYhwO3sq4Su4sBFDcNSAYXh53O72vg4+ZOrhI=", - "owner": "rachartier", - "repo": "tiny-devicons-auto-colors.nvim", - "rev": "c8f63933ee013c1e0a26091d58131e060546f01f", - "type": "github" - }, - "original": { - "owner": "rachartier", - "repo": "tiny-devicons-auto-colors.nvim", - "type": "github" - } - }, - "plugin-todo-comments": { - "flake": false, - "locked": { - "lastModified": 1726481242, - "narHash": "sha256-EH4Sy7qNkzOgA1INFzrtsRfD79TgMqSbKUdundyw22w=", - "owner": "folke", - "repo": "todo-comments.nvim", - "rev": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "todo-comments.nvim", - "type": "github" - } - }, - "plugin-toggleterm-nvim": { - "flake": false, - "locked": { - "lastModified": 1735340326, - "narHash": "sha256-oeNIb+QHa/9yGZz/2u9LYIdKluel0bcQkaIqOuQUkis=", - "owner": "akinsho", - "repo": "toggleterm.nvim", - "rev": "344fc1810292785b3d962ddac2de57669e1a7ff9", - "type": "github" - }, - "original": { - "owner": "akinsho", - "repo": "toggleterm.nvim", - "type": "github" - } - }, - "plugin-tokyonight": { - "flake": false, - "locked": { - "lastModified": 1734211493, - "narHash": "sha256-TJ/a6N6Cc1T0wdMxMopma1NtwL7rMYbZ6F0zFI1zaIA=", - "owner": "folke", - "repo": "tokyonight.nvim", - "rev": "45d22cf0e1b93476d3b6d362d720412b3d34465c", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "tokyonight.nvim", - "type": "github" - } - }, - "plugin-trouble": { - "flake": false, - "locked": { - "lastModified": 1732701472, - "narHash": "sha256-JhnERZfma2JHFEn/DElVmrSU5KxM2asx3SJ+86lCfoo=", - "owner": "folke", - "repo": "trouble.nvim", - "rev": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "trouble.nvim", - "type": "github" - } - }, - "plugin-ts-error-translator": { - "flake": false, - "locked": { - "lastModified": 1731721659, - "narHash": "sha256-fi68jJVNTL2WlTehcl5Q8tijAeu2usjIsWXjcuixkCM=", - "owner": "dmmulroy", - "repo": "ts-error-translator.nvim", - "rev": "47e5ba89f71b9e6c72eaaaaa519dd59bd6897df4", - "type": "github" - }, - "original": { - "owner": "dmmulroy", - "repo": "ts-error-translator.nvim", - "type": "github" - } - }, - "plugin-typst-preview-nvim": { - "flake": false, - "locked": { - "lastModified": 1734839452, - "narHash": "sha256-d6Tv7xZRghYYDfABk/p2e9qTm4qnWHM+ejKDCcR0TfY=", - "owner": "chomosuke", - "repo": "typst-preview.nvim", - "rev": "c1100e8788baabe8ca8f8cd7fd63d3d479e49e36", - "type": "github" - }, - "original": { - "owner": "chomosuke", - "repo": "typst-preview.nvim", - "type": "github" - } - }, - "plugin-vim-dirtytalk": { - "flake": false, - "locked": { - "lastModified": 1713047519, - "narHash": "sha256-azU5jkv/fD/qDDyCU1bPNXOH6rmbDauG9jDNrtIXc0Y=", - "owner": "psliwka", - "repo": "vim-dirtytalk", - "rev": "aa57ba902b04341a04ff97214360f56856493583", - "type": "github" - }, - "original": { - "owner": "psliwka", - "repo": "vim-dirtytalk", - "type": "github" - } - }, - "plugin-vim-fugitive": { - "flake": false, - "locked": { - "lastModified": 1735457366, - "narHash": "sha256-45zsqKavWoclA67MC54bAel1nE8CLHtSdullHByiRS8=", - "owner": "tpope", - "repo": "vim-fugitive", - "rev": "174230d6a7f2df94705a7ffd8d5413e27ec10a80", - "type": "github" - }, - "original": { - "owner": "tpope", - "repo": "vim-fugitive", - "type": "github" - } - }, - "plugin-vim-illuminate": { - "flake": false, - "locked": { - "lastModified": 1715960194, - "narHash": "sha256-DdJzTHxoOv+vjFymETa2MgXpM/qDwvZjpoo1W8OOBj0=", - "owner": "RRethy", - "repo": "vim-illuminate", - "rev": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa", - "type": "github" - }, - "original": { - "owner": "RRethy", - "repo": "vim-illuminate", - "type": "github" - } - }, - "plugin-vim-markdown": { - "flake": false, - "locked": { - "lastModified": 1726813437, - "narHash": "sha256-ZCCSjZ5Xok4rnIwfa4VUEaz6d3oW9066l0EkoqiTppM=", - "owner": "preservim", - "repo": "vim-markdown", - "rev": "8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51", - "type": "github" - }, - "original": { - "owner": "preservim", - "repo": "vim-markdown", - "type": "github" - } - }, - "plugin-vim-repeat": { - "flake": false, - "locked": { - "lastModified": 1720473942, - "narHash": "sha256-G/dmkq1KtSHIl+I5p3LfO6mGPS3eyLRbEEsuLbTpGlk=", - "owner": "tpope", - "repo": "vim-repeat", - "rev": "65846025c15494983dafe5e3b46c8f88ab2e9635", - "type": "github" - }, - "original": { - "owner": "tpope", - "repo": "vim-repeat", - "type": "github" - } - }, - "plugin-vim-startify": { - "flake": false, - "locked": { - "lastModified": 1695213983, - "narHash": "sha256-W5N/Dqxf9hSXEEJsrEkXInFwBXNBJe9Dzx9TVS12mPk=", - "owner": "mhinz", - "repo": "vim-startify", - "rev": "4e089dffdad46f3f5593f34362d530e8fe823dcf", - "type": "github" - }, - "original": { - "owner": "mhinz", - "repo": "vim-startify", - "type": "github" - } - }, - "plugin-which-key": { - "flake": false, - "locked": { - "lastModified": 1734253151, - "narHash": "sha256-f/+sYMDEguB5ZDiYiQAsDvdF/2cVcWnLBU+9qwigk4s=", - "owner": "folke", - "repo": "which-key.nvim", - "rev": "8ab96b38a2530eacba5be717f52e04601eb59326", - "type": "github" - }, - "original": { - "owner": "folke", - "repo": "which-key.nvim", - "type": "github" - } - }, - "plugin-yanky-nvim": { - "flake": false, - "locked": { - "lastModified": 1737126873, - "narHash": "sha256-Gt8kb6sZoNIM2SDWUPyAF5Tw99qMZl+ltUCfyMXgJsU=", - "owner": "gbprod", - "repo": "yanky.nvim", - "rev": "d2696b30e389dced94d5acab728f524a25f308d2", - "type": "github" - }, - "original": { - "owner": "gbprod", - "repo": "yanky.nvim", - "type": "github" - } - }, "root": { "inputs": { "flake-parts": "flake-parts", @@ -2849,176 +127,6 @@ "nil": "nil", "nixpkgs": "nixpkgs", "nmd": "nmd", - "plugin-aerial-nvim": "plugin-aerial-nvim", - "plugin-alpha-nvim": "plugin-alpha-nvim", - "plugin-base16": "plugin-base16", - "plugin-blink-cmp": "plugin-blink-cmp", - "plugin-blink-compat": "plugin-blink-compat", - "plugin-bufdelete-nvim": "plugin-bufdelete-nvim", - "plugin-catppuccin": "plugin-catppuccin", - "plugin-ccc": "plugin-ccc", - "plugin-cellular-automaton": "plugin-cellular-automaton", - "plugin-chatgpt": "plugin-chatgpt", - "plugin-cheatsheet-nvim": "plugin-cheatsheet-nvim", - "plugin-cinnamon-nvim": "plugin-cinnamon-nvim", - "plugin-cmp-buffer": "plugin-cmp-buffer", - "plugin-cmp-luasnip": "plugin-cmp-luasnip", - "plugin-cmp-nvim-lsp": "plugin-cmp-nvim-lsp", - "plugin-cmp-path": "plugin-cmp-path", - "plugin-cmp-treesitter": "plugin-cmp-treesitter", - "plugin-codewindow-nvim": "plugin-codewindow-nvim", - "plugin-comment-nvim": "plugin-comment-nvim", - "plugin-conform-nvim": "plugin-conform-nvim", - "plugin-copilot-cmp": "plugin-copilot-cmp", - "plugin-copilot-lua": "plugin-copilot-lua", - "plugin-crates-nvim": "plugin-crates-nvim", - "plugin-csharpls-extended": "plugin-csharpls-extended", - "plugin-dashboard-nvim": "plugin-dashboard-nvim", - "plugin-diffview-nvim": "plugin-diffview-nvim", - "plugin-dracula": "plugin-dracula", - "plugin-dressing-nvim": "plugin-dressing-nvim", - "plugin-elixir-tools": "plugin-elixir-tools", - "plugin-fastaction-nvim": "plugin-fastaction-nvim", - "plugin-fidget-nvim": "plugin-fidget-nvim", - "plugin-flutter-tools": "plugin-flutter-tools", - "plugin-friendly-snippets": "plugin-friendly-snippets", - "plugin-fzf-lua": "plugin-fzf-lua", - "plugin-gesture-nvim": "plugin-gesture-nvim", - "plugin-gitsigns-nvim": "plugin-gitsigns-nvim", - "plugin-glow-nvim": "plugin-glow-nvim", - "plugin-gruvbox": "plugin-gruvbox", - "plugin-haskell-tools-nvim": "plugin-haskell-tools-nvim", - "plugin-highlight-undo": "plugin-highlight-undo", - "plugin-hop-nvim": "plugin-hop-nvim", - "plugin-icon-picker-nvim": "plugin-icon-picker-nvim", - "plugin-image-nvim": "plugin-image-nvim", - "plugin-indent-blankline": "plugin-indent-blankline", - "plugin-leap-nvim": "plugin-leap-nvim", - "plugin-lsp-lines": "plugin-lsp-lines", - "plugin-lsp-signature": "plugin-lsp-signature", - "plugin-lspkind": "plugin-lspkind", - "plugin-lspsaga": "plugin-lspsaga", - "plugin-lua-utils-nvim": "plugin-lua-utils-nvim", - "plugin-lualine": "plugin-lualine", - "plugin-luasnip": "plugin-luasnip", - "plugin-lz-n": "plugin-lz-n", - "plugin-lzn-auto-require": "plugin-lzn-auto-require", - "plugin-mind-nvim": "plugin-mind-nvim", - "plugin-mini-ai": "plugin-mini-ai", - "plugin-mini-align": "plugin-mini-align", - "plugin-mini-animate": "plugin-mini-animate", - "plugin-mini-base16": "plugin-mini-base16", - "plugin-mini-basics": "plugin-mini-basics", - "plugin-mini-bracketed": "plugin-mini-bracketed", - "plugin-mini-bufremove": "plugin-mini-bufremove", - "plugin-mini-clue": "plugin-mini-clue", - "plugin-mini-colors": "plugin-mini-colors", - "plugin-mini-comment": "plugin-mini-comment", - "plugin-mini-completion": "plugin-mini-completion", - "plugin-mini-diff": "plugin-mini-diff", - "plugin-mini-doc": "plugin-mini-doc", - "plugin-mini-extra": "plugin-mini-extra", - "plugin-mini-files": "plugin-mini-files", - "plugin-mini-fuzzy": "plugin-mini-fuzzy", - "plugin-mini-git": "plugin-mini-git", - "plugin-mini-hipatterns": "plugin-mini-hipatterns", - "plugin-mini-hues": "plugin-mini-hues", - "plugin-mini-icons": "plugin-mini-icons", - "plugin-mini-indentscope": "plugin-mini-indentscope", - "plugin-mini-jump": "plugin-mini-jump", - "plugin-mini-jump2d": "plugin-mini-jump2d", - "plugin-mini-map": "plugin-mini-map", - "plugin-mini-misc": "plugin-mini-misc", - "plugin-mini-move": "plugin-mini-move", - "plugin-mini-notify": "plugin-mini-notify", - "plugin-mini-operators": "plugin-mini-operators", - "plugin-mini-pairs": "plugin-mini-pairs", - "plugin-mini-pick": "plugin-mini-pick", - "plugin-mini-sessions": "plugin-mini-sessions", - "plugin-mini-snippets": "plugin-mini-snippets", - "plugin-mini-splitjoin": "plugin-mini-splitjoin", - "plugin-mini-starter": "plugin-mini-starter", - "plugin-mini-statusline": "plugin-mini-statusline", - "plugin-mini-surround": "plugin-mini-surround", - "plugin-mini-tabline": "plugin-mini-tabline", - "plugin-mini-test": "plugin-mini-test", - "plugin-mini-trailspace": "plugin-mini-trailspace", - "plugin-mini-visits": "plugin-mini-visits", - "plugin-minimap-vim": "plugin-minimap-vim", - "plugin-modes-nvim": "plugin-modes-nvim", - "plugin-neo-tree-nvim": "plugin-neo-tree-nvim", - "plugin-neocord": "plugin-neocord", - "plugin-neodev-nvim": "plugin-neodev-nvim", - "plugin-neorg": "plugin-neorg", - "plugin-neorg-telescope": "plugin-neorg-telescope", - "plugin-new-file-template-nvim": "plugin-new-file-template-nvim", - "plugin-noice-nvim": "plugin-noice-nvim", - "plugin-none-ls": "plugin-none-ls", - "plugin-nord": "plugin-nord", - "plugin-nui-nvim": "plugin-nui-nvim", - "plugin-nvim-autopairs": "plugin-nvim-autopairs", - "plugin-nvim-bufferline-lua": "plugin-nvim-bufferline-lua", - "plugin-nvim-cmp": "plugin-nvim-cmp", - "plugin-nvim-colorizer-lua": "plugin-nvim-colorizer-lua", - "plugin-nvim-cursorline": "plugin-nvim-cursorline", - "plugin-nvim-dap": "plugin-nvim-dap", - "plugin-nvim-dap-go": "plugin-nvim-dap-go", - "plugin-nvim-dap-ui": "plugin-nvim-dap-ui", - "plugin-nvim-docs-view": "plugin-nvim-docs-view", - "plugin-nvim-lightbulb": "plugin-nvim-lightbulb", - "plugin-nvim-lint": "plugin-nvim-lint", - "plugin-nvim-lspconfig": "plugin-nvim-lspconfig", - "plugin-nvim-metals": "plugin-nvim-metals", - "plugin-nvim-navbuddy": "plugin-nvim-navbuddy", - "plugin-nvim-navic": "plugin-nvim-navic", - "plugin-nvim-neoclip": "plugin-nvim-neoclip", - "plugin-nvim-nio": "plugin-nvim-nio", - "plugin-nvim-notify": "plugin-nvim-notify", - "plugin-nvim-scrollbar": "plugin-nvim-scrollbar", - "plugin-nvim-session-manager": "plugin-nvim-session-manager", - "plugin-nvim-surround": "plugin-nvim-surround", - "plugin-nvim-tree-lua": "plugin-nvim-tree-lua", - "plugin-nvim-treesitter-context": "plugin-nvim-treesitter-context", - "plugin-nvim-ts-autotag": "plugin-nvim-ts-autotag", - "plugin-nvim-ufo": "plugin-nvim-ufo", - "plugin-nvim-web-devicons": "plugin-nvim-web-devicons", - "plugin-obsidian-nvim": "plugin-obsidian-nvim", - "plugin-omnisharp-extended": "plugin-omnisharp-extended", - "plugin-onedark": "plugin-onedark", - "plugin-orgmode-nvim": "plugin-orgmode-nvim", - "plugin-otter-nvim": "plugin-otter-nvim", - "plugin-oxocarbon": "plugin-oxocarbon", - "plugin-pathlib-nvim": "plugin-pathlib-nvim", - "plugin-plenary-nvim": "plugin-plenary-nvim", - "plugin-precognition-nvim": "plugin-precognition-nvim", - "plugin-project-nvim": "plugin-project-nvim", - "plugin-promise-async": "plugin-promise-async", - "plugin-rainbow-delimiters": "plugin-rainbow-delimiters", - "plugin-registers": "plugin-registers", - "plugin-render-markdown-nvim": "plugin-render-markdown-nvim", - "plugin-rose-pine": "plugin-rose-pine", - "plugin-rtp-nvim": "plugin-rtp-nvim", - "plugin-run-nvim": "plugin-run-nvim", - "plugin-rustaceanvim": "plugin-rustaceanvim", - "plugin-smartcolumn": "plugin-smartcolumn", - "plugin-sqls-nvim": "plugin-sqls-nvim", - "plugin-tabular": "plugin-tabular", - "plugin-telescope": "plugin-telescope", - "plugin-tiny-devicons-auto-colors": "plugin-tiny-devicons-auto-colors", - "plugin-todo-comments": "plugin-todo-comments", - "plugin-toggleterm-nvim": "plugin-toggleterm-nvim", - "plugin-tokyonight": "plugin-tokyonight", - "plugin-trouble": "plugin-trouble", - "plugin-ts-error-translator": "plugin-ts-error-translator", - "plugin-typst-preview-nvim": "plugin-typst-preview-nvim", - "plugin-vim-dirtytalk": "plugin-vim-dirtytalk", - "plugin-vim-fugitive": "plugin-vim-fugitive", - "plugin-vim-illuminate": "plugin-vim-illuminate", - "plugin-vim-markdown": "plugin-vim-markdown", - "plugin-vim-repeat": "plugin-vim-repeat", - "plugin-vim-startify": "plugin-vim-startify", - "plugin-which-key": "plugin-which-key", - "plugin-yanky-nvim": "plugin-yanky-nvim", "systems": "systems_2" } }, diff --git a/flake.nix b/flake.nix index c0b01939..28acb8b0 100644 --- a/flake.nix +++ b/flake.nix @@ -53,6 +53,8 @@ '' self.nixosModules.nvf; }; + + pins = import ./npins; }; perSystem = {pkgs, ...}: { @@ -96,898 +98,5 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; }; - - ## Plugins - # Lazy loading - plugin-lz-n = { - url = "github:nvim-neorocks/lz.n"; - flake = false; - }; - - plugin-lzn-auto-require = { - url = "github:horriblename/lzn-auto-require/require-rewrite"; - flake = false; - }; - - plugin-rtp-nvim = { - url = "github:nvim-neorocks/rtp.nvim"; - flake = false; - }; - - # LSP plugins - plugin-nvim-lspconfig = { - url = "github:neovim/nvim-lspconfig"; - flake = false; - }; - - plugin-lspsaga = { - url = "github:tami5/lspsaga.nvim"; - flake = false; - }; - - plugin-lspkind = { - url = "github:onsails/lspkind-nvim"; - flake = false; - }; - - plugin-trouble = { - url = "github:folke/trouble.nvim"; - flake = false; - }; - - plugin-nvim-treesitter-context = { - url = "github:nvim-treesitter/nvim-treesitter-context"; - flake = false; - }; - - plugin-nvim-lightbulb = { - url = "github:kosayoda/nvim-lightbulb"; - flake = false; - }; - - plugin-fastaction-nvim = { - url = "github:Chaitanyabsprip/fastaction.nvim"; - flake = false; - }; - - plugin-lsp-signature = { - url = "github:ray-x/lsp_signature.nvim"; - flake = false; - }; - - plugin-lsp-lines = { - url = "sourcehut:~whynothugo/lsp_lines.nvim"; - flake = false; - }; - - plugin-none-ls = { - # https://github.com/nvimtools/none-ls.nvim/issues/58 - url = "github:nvimtools/none-ls.nvim/bb680d752cec37949faca7a1f509e2fe67ab418a"; - flake = false; - }; - - plugin-nvim-docs-view = { - url = "github:amrbashir/nvim-docs-view"; - flake = false; - }; - - plugin-otter-nvim = { - url = "github:jmbuhr/otter.nvim"; - flake = false; - }; - - # Language support - plugin-sqls-nvim = { - url = "github:nanotee/sqls.nvim"; - flake = false; - }; - - plugin-rustaceanvim = { - url = "github:mrcjkb/rustaceanvim"; - flake = false; - }; - - plugin-flutter-tools = { - url = "github:akinsho/flutter-tools.nvim"; - flake = false; - }; - - plugin-neodev-nvim = { - url = "github:folke/neodev.nvim"; - flake = false; - }; - - plugin-elixir-tools = { - url = "github:elixir-tools/elixir-tools.nvim"; - flake = false; - }; - - plugin-ts-error-translator = { - url = "github:dmmulroy/ts-error-translator.nvim"; - flake = false; - }; - - plugin-typst-preview-nvim = { - url = "github:chomosuke/typst-preview.nvim"; - flake = false; - }; - - plugin-nvim-metals = { - url = "github:scalameta/nvim-metals"; - flake = false; - }; - - plugin-omnisharp-extended = { - url = "github:Hoffs/omnisharp-extended-lsp.nvim"; - flake = false; - }; - - plugin-csharpls-extended = { - url = "github:Decodetalkers/csharpls-extended-lsp.nvim"; - flake = false; - }; - - # Formatters - plugin-conform-nvim = { - url = "github:stevearc/conform.nvim"; - flake = false; - }; - - # Diagnostics - plugin-nvim-lint = { - url = "github:mfussenegger/nvim-lint"; - flake = false; - }; - - # Copying/Registers - plugin-registers = { - url = "github:tversteeg/registers.nvim"; - flake = false; - }; - - plugin-nvim-neoclip = { - url = "github:AckslD/nvim-neoclip.lua"; - flake = false; - }; - - # Pickers - plugin-telescope = { - url = "github:nvim-telescope/telescope.nvim"; - flake = false; - }; - - plugin-fzf-lua = { - url = "github:ibhagwan/fzf-lua"; - flake = false; - }; - - # Runners - plugin-run-nvim = { - url = "github:diniamo/run.nvim"; - flake = false; - }; - - # Debuggers - plugin-nvim-dap = { - url = "github:mfussenegger/nvim-dap"; - flake = false; - }; - - plugin-nvim-dap-ui = { - url = "github:rcarriga/nvim-dap-ui"; - flake = false; - }; - - plugin-nvim-dap-go = { - url = "github:leoluz/nvim-dap-go"; - flake = false; - }; - - # Filetrees - plugin-nvim-tree-lua = { - url = "github:nvim-tree/nvim-tree.lua"; - flake = false; - }; - - plugin-neo-tree-nvim = { - url = "github:nvim-neo-tree/neo-tree.nvim"; - flake = false; - }; - - # Tablines - plugin-nvim-bufferline-lua = { - url = "github:akinsho/nvim-bufferline.lua"; - flake = false; - }; - - # Statuslines - plugin-lualine = { - url = "github:hoob3rt/lualine.nvim"; - flake = false; - }; - - plugin-blink-cmp = { - url = "github:saghen/blink.cmp"; - flake = false; - }; - - plugin-blink-compat = { - url = "github:saghen/blink.compat"; - flake = false; - }; - - plugin-nvim-cmp = { - url = "github:hrsh7th/nvim-cmp"; - flake = false; - }; - - plugin-cmp-buffer = { - url = "github:hrsh7th/cmp-buffer"; - flake = false; - }; - - plugin-cmp-nvim-lsp = { - url = "github:hrsh7th/cmp-nvim-lsp"; - flake = false; - }; - - plugin-cmp-path = { - url = "github:hrsh7th/cmp-path"; - flake = false; - }; - - plugin-cmp-treesitter = { - url = "github:ray-x/cmp-treesitter"; - flake = false; - }; - - plugin-cmp-luasnip = { - url = "github:saadparwaiz1/cmp_luasnip"; - flake = false; - }; - - # snippets - plugin-luasnip = { - url = "github:L3MON4D3/LuaSnip"; - flake = false; - }; - - plugin-friendly-snippets = { - url = "github:rafamadriz/friendly-snippets"; - flake = false; - }; - - # Presence - plugin-neocord = { - url = "github:IogaMaster/neocord"; - flake = false; # uses flake-utils, avoid the flake - }; - - # Autopairs - plugin-nvim-autopairs = { - url = "github:windwp/nvim-autopairs"; - flake = false; - }; - - plugin-nvim-ts-autotag = { - url = "github:windwp/nvim-ts-autotag"; - flake = false; - }; - - # Commenting - plugin-comment-nvim = { - url = "github:numToStr/Comment.nvim"; - flake = false; - }; - - plugin-todo-comments = { - url = "github:folke/todo-comments.nvim"; - flake = false; - }; - - # Buffer tools - plugin-bufdelete-nvim = { - url = "github:famiu/bufdelete.nvim"; - flake = false; - }; - - # Dashboard Utilities - plugin-dashboard-nvim = { - url = "github:glepnir/dashboard-nvim"; - flake = false; - }; - - plugin-alpha-nvim = { - url = "github:goolord/alpha-nvim"; - flake = false; - }; - - plugin-vim-startify = { - url = "github:mhinz/vim-startify"; - flake = false; - }; - - # Themes - plugin-base16 = { - url = "github:rrethy/base16-nvim"; - flake = false; - }; - - plugin-tokyonight = { - url = "github:folke/tokyonight.nvim"; - flake = false; - }; - - plugin-onedark = { - url = "github:navarasu/onedark.nvim"; - flake = false; - }; - - plugin-catppuccin = { - url = "github:catppuccin/nvim"; - flake = false; - }; - - plugin-dracula = { - url = "github:Mofiqul/dracula.nvim"; - flake = false; - }; - - plugin-oxocarbon = { - url = "github:nyoom-engineering/oxocarbon.nvim"; - flake = false; - }; - - plugin-gruvbox = { - url = "github:ellisonleao/gruvbox.nvim"; - flake = false; - }; - - plugin-rose-pine = { - url = "github:rose-pine/neovim"; - flake = false; - }; - - plugin-nord = { - url = "github:gbprod/nord.nvim"; - flake = false; - }; - - # Rust crates - plugin-crates-nvim = { - url = "github:Saecki/crates.nvim"; - flake = false; - }; - - # Project Management - plugin-project-nvim = { - url = "github:ahmedkhalf/project.nvim"; - flake = false; - }; - - # Visuals - plugin-nvim-cursorline = { - url = "github:yamatsum/nvim-cursorline"; - flake = false; - }; - - plugin-nvim-scrollbar = { - url = "github:petertriho/nvim-scrollbar"; - flake = false; - }; - - plugin-cinnamon-nvim = { - url = "github:declancm/cinnamon.nvim"; - flake = false; - }; - - plugin-cellular-automaton = { - url = "github:Eandrju/cellular-automaton.nvim"; - flake = false; - }; - - plugin-indent-blankline = { - url = "github:lukas-reineke/indent-blankline.nvim"; - flake = false; - }; - - plugin-nvim-web-devicons = { - url = "github:nvim-tree/nvim-web-devicons"; - flake = false; - }; - - plugin-tiny-devicons-auto-colors = { - url = "github:rachartier/tiny-devicons-auto-colors.nvim"; - flake = false; - }; - - plugin-gitsigns-nvim = { - url = "github:lewis6991/gitsigns.nvim"; - flake = false; - }; - - plugin-vim-fugitive = { - url = "github:tpope/vim-fugitive"; - flake = false; - }; - - plugin-fidget-nvim = { - url = "github:j-hui/fidget.nvim"; - flake = false; - }; - - plugin-highlight-undo = { - url = "github:tzachar/highlight-undo.nvim"; - flake = false; - }; - - plugin-render-markdown-nvim = { - url = "github:MeanderingProgrammer/render-markdown.nvim"; - flake = false; - }; - - plugin-rainbow-delimiters = { - url = "github:HiPhish/rainbow-delimiters.nvim"; - flake = false; - }; - - # Minimap - plugin-minimap-vim = { - url = "github:wfxr/minimap.vim"; - flake = false; - }; - - plugin-codewindow-nvim = { - url = "github:gorbit99/codewindow.nvim"; - flake = false; - }; - - # Notifications - plugin-nvim-notify = { - url = "github:rcarriga/nvim-notify"; - flake = false; - }; - - # Utilities - plugin-ccc = { - url = "github:uga-rosa/ccc.nvim"; - flake = false; - }; - - plugin-diffview-nvim = { - url = "github:sindrets/diffview.nvim"; - flake = false; - }; - - plugin-icon-picker-nvim = { - url = "github:ziontee113/icon-picker.nvim"; - flake = false; - }; - - plugin-which-key = { - url = "github:folke/which-key.nvim"; - flake = false; - }; - - plugin-cheatsheet-nvim = { - url = "github:sudormrfbin/cheatsheet.nvim"; - flake = false; - }; - - plugin-gesture-nvim = { - url = "github:notomo/gesture.nvim"; - flake = false; - }; - - plugin-hop-nvim = { - url = "github:phaazon/hop.nvim"; - flake = false; - }; - - plugin-leap-nvim = { - url = "github:ggandor/leap.nvim"; - flake = false; - }; - - plugin-smartcolumn = { - url = "github:m4xshen/smartcolumn.nvim"; - flake = false; - }; - - plugin-nvim-surround = { - url = "github:kylechui/nvim-surround"; - flake = false; - }; - - plugin-glow-nvim = { - url = "github:ellisonleao/glow.nvim"; - flake = false; - }; - - plugin-image-nvim = { - url = "github:3rd/image.nvim"; - flake = false; - }; - - plugin-precognition-nvim = { - url = "github:tris203/precognition.nvim"; - flake = false; - }; - - plugin-yanky-nvim = { - url = "github:gbprod/yanky.nvim"; - flake = false; - }; - - # Note-taking - plugin-obsidian-nvim = { - url = "github:epwalsh/obsidian.nvim"; - flake = false; - }; - - plugin-orgmode-nvim = { - url = "github:nvim-orgmode/orgmode"; - flake = false; - }; - - plugin-mind-nvim = { - url = "github:phaazon/mind.nvim"; - flake = false; - }; - - # Spellchecking - plugin-vim-dirtytalk = { - url = "github:psliwka/vim-dirtytalk"; - flake = false; - }; - - # Terminal - plugin-toggleterm-nvim = { - url = "github:akinsho/toggleterm.nvim"; - flake = false; - }; - - # UI - plugin-nvim-navbuddy = { - url = "github:SmiteshP/nvim-navbuddy"; - flake = false; - }; - - plugin-nvim-navic = { - url = "github:SmiteshP/nvim-navic"; - flake = false; - }; - - plugin-noice-nvim = { - url = "github:folke/noice.nvim"; - flake = false; - }; - - plugin-modes-nvim = { - url = "github:mvllow/modes.nvim"; - flake = false; - }; - - plugin-nvim-colorizer-lua = { - url = "github:catgoose/nvim-colorizer.lua"; - flake = false; - }; - - plugin-vim-illuminate = { - url = "github:RRethy/vim-illuminate"; - flake = false; - }; - - # Assistant - plugin-chatgpt = { - url = "github:jackMort/ChatGPT.nvim"; - flake = false; - }; - - plugin-copilot-lua = { - url = "github:zbirenbaum/copilot.lua"; - flake = false; - }; - - plugin-copilot-cmp = { - url = "github:zbirenbaum/copilot-cmp"; - flake = false; - }; - - # Session management - plugin-nvim-session-manager = { - url = "github:Shatur/neovim-session-manager"; - flake = false; - }; - - # Dependencies - plugin-plenary-nvim = { - # (required by crates-nvim) - url = "github:nvim-lua/plenary.nvim"; - flake = false; - }; - - plugin-dressing-nvim = { - # (required by icon-picker-nvim) - url = "github:stevearc/dressing.nvim"; - flake = false; - }; - - plugin-vim-markdown = { - # (required by obsidian-nvim) - url = "github:preservim/vim-markdown"; - flake = false; - }; - - plugin-tabular = { - # (required by vim-markdown) - url = "github:godlygeek/tabular"; - flake = false; - }; - - plugin-lua-utils-nvim = { - url = "github:nvim-neorg/lua-utils.nvim"; - flake = false; - }; - - plugin-pathlib-nvim = { - url = "github:pysan3/pathlib.nvim"; - flake = false; - }; - - plugin-neorg = { - url = "github:nvim-neorg/neorg"; - flake = false; - }; - - plugin-neorg-telescope = { - url = "github:nvim-neorg/neorg-telescope"; - flake = false; - }; - - plugin-nui-nvim = { - # (required by noice.nvim) - url = "github:MunifTanjim/nui.nvim"; - flake = false; - }; - - plugin-vim-repeat = { - # (required by leap.nvim) - url = "github:tpope/vim-repeat"; - flake = false; - }; - - plugin-nvim-nio = { - # (required by nvim-dap-ui) - url = "github:nvim-neotest/nvim-nio"; - flake = false; - }; - - plugin-promise-async = { - url = "github:kevinhwang91/promise-async"; - flake = false; - }; - - plugin-nvim-ufo = { - url = "github:kevinhwang91/nvim-ufo"; - flake = false; - }; - - plugin-new-file-template-nvim = { - # (required by new-file-template.nvim) - url = "github:isaacST08/new-file-template.nvim?rev=dc3a58b1f490c86075c96670b9eb81370c2f2ca1"; - flake = false; - }; - - plugin-haskell-tools-nvim = { - url = "github:mrcjkb/haskell-tools.nvim"; - flake = false; - }; - - plugin-aerial-nvim = { - url = "github:stevearc/aerial.nvim"; - flake = false; - }; - - # Mini.nvim - plugin-mini-ai = { - url = "github:echasnovski/mini.ai"; - flake = false; - }; - - plugin-mini-align = { - url = "github:echasnovski/mini.align"; - flake = false; - }; - - plugin-mini-animate = { - url = "github:echasnovski/mini.animate"; - flake = false; - }; - - plugin-mini-base16 = { - url = "github:echasnovski/mini.base16"; - flake = false; - }; - - plugin-mini-basics = { - url = "github:echasnovski/mini.basics"; - flake = false; - }; - - plugin-mini-bracketed = { - url = "github:echasnovski/mini.bracketed"; - flake = false; - }; - - plugin-mini-bufremove = { - url = "github:echasnovski/mini.bufremove"; - flake = false; - }; - - plugin-mini-clue = { - url = "github:echasnovski/mini.clue"; - flake = false; - }; - - plugin-mini-colors = { - url = "github:echasnovski/mini.colors"; - flake = false; - }; - - plugin-mini-comment = { - url = "github:echasnovski/mini.comment"; - flake = false; - }; - - plugin-mini-completion = { - url = "github:echasnovski/mini.completion"; - flake = false; - }; - - plugin-mini-diff = { - url = "github:echasnovski/mini.diff"; - flake = false; - }; - - plugin-mini-doc = { - url = "github:echasnovski/mini.doc"; - flake = false; - }; - - plugin-mini-extra = { - url = "github:echasnovski/mini.extra"; - flake = false; - }; - - plugin-mini-files = { - url = "github:echasnovski/mini.files"; - flake = false; - }; - - plugin-mini-fuzzy = { - url = "github:echasnovski/mini.fuzzy"; - flake = false; - }; - - plugin-mini-git = { - url = "github:echasnovski/mini-git"; - flake = false; - }; - - plugin-mini-hipatterns = { - url = "github:echasnovski/mini.hipatterns"; - flake = false; - }; - - plugin-mini-hues = { - url = "github:echasnovski/mini.hues"; - flake = false; - }; - - plugin-mini-icons = { - url = "github:echasnovski/mini.icons"; - flake = false; - }; - - plugin-mini-indentscope = { - url = "github:echasnovski/mini.indentscope"; - flake = false; - }; - - plugin-mini-jump = { - url = "github:echasnovski/mini.jump"; - flake = false; - }; - - plugin-mini-jump2d = { - url = "github:echasnovski/mini.jump2d"; - flake = false; - }; - - plugin-mini-map = { - url = "github:echasnovski/mini.map"; - flake = false; - }; - - plugin-mini-misc = { - url = "github:echasnovski/mini.misc"; - flake = false; - }; - - plugin-mini-move = { - url = "github:echasnovski/mini.move"; - flake = false; - }; - - plugin-mini-notify = { - url = "github:echasnovski/mini.notify"; - flake = false; - }; - - plugin-mini-operators = { - url = "github:echasnovski/mini.operators"; - flake = false; - }; - - plugin-mini-pairs = { - url = "github:echasnovski/mini.pairs"; - flake = false; - }; - - plugin-mini-pick = { - url = "github:echasnovski/mini.pick"; - flake = false; - }; - - plugin-mini-sessions = { - url = "github:echasnovski/mini.sessions"; - flake = false; - }; - - plugin-mini-snippets = { - url = "github:echasnovski/mini.snippets"; - flake = false; - }; - - plugin-mini-splitjoin = { - url = "github:echasnovski/mini.splitjoin"; - flake = false; - }; - - plugin-mini-starter = { - url = "github:echasnovski/mini.starter"; - flake = false; - }; - - plugin-mini-statusline = { - url = "github:echasnovski/mini.statusline"; - flake = false; - }; - - plugin-mini-surround = { - url = "github:echasnovski/mini.surround"; - flake = false; - }; - - plugin-mini-tabline = { - url = "github:echasnovski/mini.tabline"; - flake = false; - }; - - plugin-mini-test = { - url = "github:echasnovski/mini.test"; - flake = false; - }; - - plugin-mini-trailspace = { - url = "github:echasnovski/mini.trailspace"; - flake = false; - }; - - plugin-mini-visits = { - url = "github:echasnovski/mini.visits"; - flake = false; - }; }; } diff --git a/npins/default.nix b/npins/default.nix new file mode 100644 index 00000000..5e7d086e --- /dev/null +++ b/npins/default.nix @@ -0,0 +1,80 @@ +# Generated by npins. Do not modify; will be overwritten regularly +let + data = builtins.fromJSON (builtins.readFile ./sources.json); + version = data.version; + + mkSource = + spec: + assert spec ? type; + let + path = + if spec.type == "Git" then + mkGitSource spec + else if spec.type == "GitRelease" then + mkGitSource spec + else if spec.type == "PyPi" then + mkPyPiSource spec + else if spec.type == "Channel" then + mkChannelSource spec + else + builtins.throw "Unknown source type ${spec.type}"; + in + spec // { outPath = path; }; + + mkGitSource = + { + repository, + revision, + url ? null, + hash, + branch ? null, + ... + }: + assert repository ? type; + # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository + # In the latter case, there we will always be an url to the tarball + if url != null then + (builtins.fetchTarball { + inherit url; + sha256 = hash; # FIXME: check nix version & use SRI hashes + }) + else + assert repository.type == "Git"; + let + urlToName = + url: rev: + let + matched = builtins.match "^.*/([^/]*)(\\.git)?$" repository.url; + + short = builtins.substring 0 7 rev; + + appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else ""; + in + "${if matched == null then "source" else builtins.head matched}${appendShort}"; + name = urlToName repository.url revision; + in + builtins.fetchGit { + url = repository.url; + rev = revision; + inherit name; + # hash = hash; + }; + + mkPyPiSource = + { url, hash, ... }: + builtins.fetchurl { + inherit url; + sha256 = hash; + }; + + mkChannelSource = + { url, hash, ... }: + builtins.fetchTarball { + inherit url; + sha256 = hash; + }; +in +if version == 3 then + builtins.mapAttrs (_: mkSource) data.pins +else + throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`" diff --git a/npins/sources.json b/npins/sources.json new file mode 100644 index 00000000..b201e331 --- /dev/null +++ b/npins/sources.json @@ -0,0 +1,2015 @@ +{ + "pins": { + "ChatGPT.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "jackMort", + "repo": "ChatGPT.nvim" + }, + "branch": "main", + "revision": "5b6d296eefc75331e2ff9f0adcffbd7d27862dd6", + "url": "https://github.com/jackMort/ChatGPT.nvim/archive/5b6d296eefc75331e2ff9f0adcffbd7d27862dd6.tar.gz", + "hash": "07f0p03fb4060lc7jfvp8mqi0jbk8mril9fg3b8rx9mq8415g1gr" + }, + "Comment.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "numToStr", + "repo": "Comment.nvim" + }, + "branch": "main", + "revision": "e30b7f2008e52442154b66f7c519bfd2f1e32acb", + "url": "https://github.com/numToStr/Comment.nvim/archive/e30b7f2008e52442154b66f7c519bfd2f1e32acb.tar.gz", + "hash": "0dyz78j0kj3j99y5g8wncl7794g6z2qs05gfg9ddxaa4xswhyjc7" + }, + "LuaSnip": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "L3MON4D3", + "repo": "LuaSnip" + }, + "branch": "main", + "revision": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d", + "url": "https://github.com/L3MON4D3/LuaSnip/archive/33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d.tar.gz", + "hash": "1zicjd8y9a16rq1rs1xbmc6g927j5xi05yrxj9ap6wp72pfxxw3r" + }, + "aerial.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "stevearc", + "repo": "aerial.nvim" + }, + "branch": "main", + "revision": "b3ec25ca8c347fafa976484a6cace162239112e1", + "url": "https://github.com/stevearc/aerial.nvim/archive/b3ec25ca8c347fafa976484a6cace162239112e1.tar.gz", + "hash": "0jz169xhg4xhg3di19xj1yvyl6lrrx8a0aka00gk62f08j8jv17d" + }, + "alpha-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "goolord", + "repo": "alpha-nvim" + }, + "branch": "main", + "revision": "de72250e054e5e691b9736ee30db72c65d560771", + "url": "https://github.com/goolord/alpha-nvim/archive/de72250e054e5e691b9736ee30db72c65d560771.tar.gz", + "hash": "0c1jkhxamfn2md7m1r5b2wpxa26y90b98yzjwf68m3fymalvkn5h" + }, + "base16-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "rrethy", + "repo": "base16-nvim" + }, + "branch": "main", + "revision": "6ac181b5733518040a33017dde654059cd771b7c", + "url": "https://github.com/rrethy/base16-nvim/archive/6ac181b5733518040a33017dde654059cd771b7c.tar.gz", + "hash": "0q47jbh6abn2hql9ghi9ayx3l8pdrdcdrnf4qfk7cp0v1bl7y48r" + }, + "bufdelete.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "famiu", + "repo": "bufdelete.nvim" + }, + "branch": "main", + "revision": "f6bcea78afb3060b198125256f897040538bcb81", + "url": "https://github.com/famiu/bufdelete.nvim/archive/f6bcea78afb3060b198125256f897040538bcb81.tar.gz", + "hash": "0xfzk3zgnxbwnr55n3lglsb8nmhnchpiqz9d152xr6j8d9z0sdcn" + }, + "ccc.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "uga-rosa", + "repo": "ccc.nvim" + }, + "branch": "main", + "revision": "7c639042583c7bdc7ce2e37e5a0e0aa6d0659c6a", + "url": "https://github.com/uga-rosa/ccc.nvim/archive/7c639042583c7bdc7ce2e37e5a0e0aa6d0659c6a.tar.gz", + "hash": "01pp5j89x6p7k3r0gpcd12yjdqwxv2m472hnjvpr6mqhq3d525rs" + }, + "cellular-automaton.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "Eandrju", + "repo": "cellular-automaton.nvim" + }, + "branch": "main", + "revision": "11aea08aa084f9d523b0142c2cd9441b8ede09ed", + "url": "https://github.com/Eandrju/cellular-automaton.nvim/archive/11aea08aa084f9d523b0142c2cd9441b8ede09ed.tar.gz", + "hash": "0jvz2vnyhm6a2zyz93sh87n59vga2l016ijrfybfrlv44hhzp2ww" + }, + "cheatsheet.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "sudormrfbin", + "repo": "cheatsheet.nvim" + }, + "branch": "main", + "revision": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef", + "url": "https://github.com/sudormrfbin/cheatsheet.nvim/archive/9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef.tar.gz", + "hash": "0dm94kppbnky8y0gs1pdfs7vcc9hyp8lf6h33dw6ndqfnw3hd2ad" + }, + "cinnamon.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "declancm", + "repo": "cinnamon.nvim" + }, + "branch": "main", + "revision": "450cb3247765fed7871b41ef4ce5fa492d834215", + "url": "https://github.com/declancm/cinnamon.nvim/archive/450cb3247765fed7871b41ef4ce5fa492d834215.tar.gz", + "hash": "1vq0cab139gyix2qhmivp86fq6l4fhzn7qafphj0yjac47i11iwi" + }, + "cmp-buffer": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "hrsh7th", + "repo": "cmp-buffer" + }, + "branch": "main", + "revision": "3022dbc9166796b644a841a02de8dd1cc1d311fa", + "url": "https://github.com/hrsh7th/cmp-buffer/archive/3022dbc9166796b644a841a02de8dd1cc1d311fa.tar.gz", + "hash": "1cwx8ky74633y0bmqmvq1lqzmphadnhzmhzkddl3hpb7rgn18vkl" + }, + "cmp-nvim-lsp": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "hrsh7th", + "repo": "cmp-nvim-lsp" + }, + "branch": "main", + "revision": "99290b3ec1322070bcfb9e846450a46f6efa50f0", + "url": "https://github.com/hrsh7th/cmp-nvim-lsp/archive/99290b3ec1322070bcfb9e846450a46f6efa50f0.tar.gz", + "hash": "08q5mf5jrqjjcl1s4h9zj2vd1kcizz0a5a6p65wv1rc5s1fa3a49" + }, + "cmp-path": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "hrsh7th", + "repo": "cmp-path" + }, + "branch": "main", + "revision": "91ff86cd9c29299a64f968ebb45846c485725f23", + "url": "https://github.com/hrsh7th/cmp-path/archive/91ff86cd9c29299a64f968ebb45846c485725f23.tar.gz", + "hash": "18ixx14ibc7qrv32nj0ylxrx8w4ggg49l5vhcqd35hkp4n56j6mn" + }, + "cmp-treesitter": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "ray-x", + "repo": "cmp-treesitter" + }, + "branch": "main", + "revision": "958fcfa0d8ce46d215e19cc3992c542f576c4123", + "url": "https://github.com/ray-x/cmp-treesitter/archive/958fcfa0d8ce46d215e19cc3992c542f576c4123.tar.gz", + "hash": "05as01c2f7i20zkzpqbq9n8ji9bcwd678ixmxnrz9vmz5zsj8q7i" + }, + "cmp_luasnip": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "saadparwaiz1", + "repo": "cmp_luasnip" + }, + "branch": "main", + "revision": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90", + "url": "https://github.com/saadparwaiz1/cmp_luasnip/archive/98d9cb5c2c38532bd9bdb481067b20fea8f32e90.tar.gz", + "hash": "037sh4g1747wf07f9sqngiifp89hqww6m2rvizy5ra7jyd04magk" + }, + "codewindow.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "gorbit99", + "repo": "codewindow.nvim" + }, + "branch": "main", + "revision": "dd7017617962943eb1d152fc58940f11c6775a4a", + "url": "https://github.com/gorbit99/codewindow.nvim/archive/dd7017617962943eb1d152fc58940f11c6775a4a.tar.gz", + "hash": "1kxkf50rkqrzqz03jvygbwxb1yfmqh0gskr00vpmyrq51569a2hw" + }, + "conform.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "stevearc", + "repo": "conform.nvim" + }, + "branch": "main", + "revision": "363243c03102a531a8203311d4f2ae704c620d9b", + "url": "https://github.com/stevearc/conform.nvim/archive/363243c03102a531a8203311d4f2ae704c620d9b.tar.gz", + "hash": "1lf7a5b30g37ys9f4z9gq68ymzfzsw7bwzqp1bb91cx9df1bdyck" + }, + "copilot-cmp": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "zbirenbaum", + "repo": "copilot-cmp" + }, + "branch": "main", + "revision": "15fc12af3d0109fa76b60b5cffa1373697e261d1", + "url": "https://github.com/zbirenbaum/copilot-cmp/archive/15fc12af3d0109fa76b60b5cffa1373697e261d1.tar.gz", + "hash": "0qyakf6wvkdxpzx63gv3p9bwafmxk87vgvcp14pfrkiznvqlpd3s" + }, + "copilot.lua": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "zbirenbaum", + "repo": "copilot.lua" + }, + "branch": "main", + "revision": "886ee73b6d464b2b3e3e6a7ff55ce87feac423a9", + "url": "https://github.com/zbirenbaum/copilot.lua/archive/886ee73b6d464b2b3e3e6a7ff55ce87feac423a9.tar.gz", + "hash": "15d1m1lq1f4snkgvnr3cvz0gxh3yycszlq6cph68ddn1sb8h8rbk" + }, + "crates.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "Saecki", + "repo": "crates.nvim" + }, + "branch": "main", + "revision": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785", + "url": "https://github.com/Saecki/crates.nvim/archive/8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785.tar.gz", + "hash": "088yi9z0wj2ackg3hh5zm66yg31b2c5rc2ss24idx2jkfhqv908c" + }, + "csharpls-extended-lsp.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "Decodetalkers", + "repo": "csharpls-extended-lsp.nvim" + }, + "branch": "main", + "revision": "4f56c06215d10c4fcfee8a7f04ba766c114aece0", + "url": "https://github.com/Decodetalkers/csharpls-extended-lsp.nvim/archive/4f56c06215d10c4fcfee8a7f04ba766c114aece0.tar.gz", + "hash": "1jnaimzc3mhqacn3cqds5zkwphn4dzqwrayv48791w0gv2wfzvwc" + }, + "dashboard-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "glepnir", + "repo": "dashboard-nvim" + }, + "branch": "main", + "revision": "ae309606940d26d8c9df8b048a6e136b6bbec478", + "url": "https://github.com/glepnir/dashboard-nvim/archive/ae309606940d26d8c9df8b048a6e136b6bbec478.tar.gz", + "hash": "06mr3869ag542vxnj68458k9cfyw9ldj0mjahzqkpwfl5nc28bs2" + }, + "diffview.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "sindrets", + "repo": "diffview.nvim" + }, + "branch": "main", + "revision": "4516612fe98ff56ae0415a259ff6361a89419b0a", + "url": "https://github.com/sindrets/diffview.nvim/archive/4516612fe98ff56ae0415a259ff6361a89419b0a.tar.gz", + "hash": "0brabpd02596hg98bml118bx6z2sly98kf1cr2p0xzybiinb4zs9" + }, + "dracula.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "Mofiqul", + "repo": "dracula.nvim" + }, + "branch": "main", + "revision": "515acae4fd294fcefa5b15237a333c2606e958d1", + "url": "https://github.com/Mofiqul/dracula.nvim/archive/515acae4fd294fcefa5b15237a333c2606e958d1.tar.gz", + "hash": "1sr09v6q07q111pbcm8nc12mvgzb5f5n7bg8frrwb6dpspj4h97n" + }, + "dressing.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "stevearc", + "repo": "dressing.nvim" + }, + "branch": "main", + "revision": "3a45525bb182730fe462325c99395529308f431e", + "url": "https://github.com/stevearc/dressing.nvim/archive/3a45525bb182730fe462325c99395529308f431e.tar.gz", + "hash": "0wd9zgqh9i9f77ny7avgsnsl6rxamcqcr7qlbzmsb8p003kl321p" + }, + "elixir-tools.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "elixir-tools", + "repo": "elixir-tools.nvim" + }, + "branch": "main", + "revision": "803fa69dbb457305cff98e3997bed2c4b51aea7c", + "url": "https://github.com/elixir-tools/elixir-tools.nvim/archive/803fa69dbb457305cff98e3997bed2c4b51aea7c.tar.gz", + "hash": "09fnpj27rynw55hvs8dc860di10m3yj628aghsn3lzm249ar708a" + }, + "fastaction.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "Chaitanyabsprip", + "repo": "fastaction.nvim" + }, + "branch": "main", + "revision": "886e22d85e13115808e81ca367d5aaba02d9a25b", + "url": "https://github.com/Chaitanyabsprip/fastaction.nvim/archive/886e22d85e13115808e81ca367d5aaba02d9a25b.tar.gz", + "hash": "0zz9jc2nfyn43idwz63xcacgyaclsvddsjnk8vjgifga4m7v2r6l" + }, + "fidget.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "j-hui", + "repo": "fidget.nvim" + }, + "branch": "main", + "revision": "9238947645ce17d96f30842e61ba81147185b657", + "url": "https://github.com/j-hui/fidget.nvim/archive/9238947645ce17d96f30842e61ba81147185b657.tar.gz", + "hash": "1117w5i7996vxx32vibb09zpzzgwaipj5ldkdgck3ds5vkcdlk53" + }, + "flutter-tools.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "akinsho", + "repo": "flutter-tools.nvim" + }, + "branch": "main", + "revision": "a526c30f1941a7472509aaedda13758f943c968e", + "url": "https://github.com/akinsho/flutter-tools.nvim/archive/a526c30f1941a7472509aaedda13758f943c968e.tar.gz", + "hash": "1qy03zi1vifsdhkyp9yf97px2ny0l30h6nagfic00lyj38z9vx65" + }, + "friendly-snippets": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "rafamadriz", + "repo": "friendly-snippets" + }, + "branch": "main", + "revision": "efff286dd74c22f731cdec26a70b46e5b203c619", + "url": "https://github.com/rafamadriz/friendly-snippets/archive/efff286dd74c22f731cdec26a70b46e5b203c619.tar.gz", + "hash": "1vb5l8ipfjwsrqffbq8v2z5p1cpg035b3gk57692wd7835kr3i13" + }, + "fzf-lua": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "ibhagwan", + "repo": "fzf-lua" + }, + "branch": "main", + "revision": "fbe21aeb147b3dc8b188b5753a8e288ecedcee5e", + "url": "https://github.com/ibhagwan/fzf-lua/archive/fbe21aeb147b3dc8b188b5753a8e288ecedcee5e.tar.gz", + "hash": "1wiwq9h0m4rzcc5h2wqxa4gqiw9xrxlggvcasacy9bq89c6l11yh" + }, + "gesture.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "notomo", + "repo": "gesture.nvim" + }, + "branch": "main", + "revision": "dbd839bda337cb73911aeef06897eb29cb99f76f", + "url": "https://github.com/notomo/gesture.nvim/archive/dbd839bda337cb73911aeef06897eb29cb99f76f.tar.gz", + "hash": "1cqiahc52xh113l8lgpz3k852vvqkv2srj9shdkyya76a2v2sf9d" + }, + "gitsigns.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "lewis6991", + "repo": "gitsigns.nvim" + }, + "branch": "main", + "revision": "5f808b5e4fef30bd8aca1b803b4e555da07fc412", + "url": "https://github.com/lewis6991/gitsigns.nvim/archive/5f808b5e4fef30bd8aca1b803b4e555da07fc412.tar.gz", + "hash": "1dxsyv26mm7lzll3xlkzjj6w7kp11wfak8rgp19fg2d8301kxc0z" + }, + "glow.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "ellisonleao", + "repo": "glow.nvim" + }, + "branch": "main", + "revision": "238070a686c1da3bccccf1079700eb4b5e19aea4", + "url": "https://github.com/ellisonleao/glow.nvim/archive/238070a686c1da3bccccf1079700eb4b5e19aea4.tar.gz", + "hash": "1j63y3hb03n5m4jig8576sxnb3jixxlr66m9xcs8vgfm5h0mrhqs" + }, + "gruvbox.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "ellisonleao", + "repo": "gruvbox.nvim" + }, + "branch": "main", + "revision": "68c3460a5d1d1a362318960035c9f3466d5011f5", + "url": "https://github.com/ellisonleao/gruvbox.nvim/archive/68c3460a5d1d1a362318960035c9f3466d5011f5.tar.gz", + "hash": "0yc0hv9d4888lfvhd68gdwvfhfgafyqn9ljca4b5a0pgb61hiax9" + }, + "haskell-tools.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "mrcjkb", + "repo": "haskell-tools.nvim" + }, + "branch": "main", + "revision": "943b77b68a79d3991523ba4d373063c9355c6f55", + "url": "https://github.com/mrcjkb/haskell-tools.nvim/archive/943b77b68a79d3991523ba4d373063c9355c6f55.tar.gz", + "hash": "0f8j9x20bs62pnsx4kwklbnrnxqakmfg9xd7742rqfyg03s4v5c1" + }, + "highlight-undo.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "tzachar", + "repo": "highlight-undo.nvim" + }, + "branch": "main", + "revision": "5f588b420179a31d7073854bfd07ed9d5f364645", + "url": "https://github.com/tzachar/highlight-undo.nvim/archive/5f588b420179a31d7073854bfd07ed9d5f364645.tar.gz", + "hash": "1ykk9kj74kpnqq003fkhj75d9k68k8fgdv3kr0hbcvggxlr6nhkg" + }, + "hop.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "phaazon", + "repo": "hop.nvim" + }, + "branch": "main", + "revision": "1a1eceafe54b5081eae4cb91c723abd1d450f34b", + "url": "https://github.com/phaazon/hop.nvim/archive/1a1eceafe54b5081eae4cb91c723abd1d450f34b.tar.gz", + "hash": "08h18cam2yr57qvfsnf1bra28vbl6013wlchnr5crb757xw8aysa" + }, + "icon-picker.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "ziontee113", + "repo": "icon-picker.nvim" + }, + "branch": "main", + "revision": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3", + "url": "https://github.com/ziontee113/icon-picker.nvim/archive/3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3.tar.gz", + "hash": "1357c2dhl7m7hbdsj0l2bmk97i76bp5yrfnd0g01sgd6wiasr4jm" + }, + "image.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "3rd", + "repo": "image.nvim" + }, + "branch": "main", + "revision": "b991fc7f845bc6ab40c6ec00b39750dcd5190010", + "url": "https://github.com/3rd/image.nvim/archive/b991fc7f845bc6ab40c6ec00b39750dcd5190010.tar.gz", + "hash": "1jbbm4l71w0cas0aj5d0jsy65chbvf4bdxxllb04i3k6h1zycdja" + }, + "indent-blankline.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "lukas-reineke", + "repo": "indent-blankline.nvim" + }, + "branch": "main", + "revision": "259357fa4097e232730341fa60988087d189193a", + "url": "https://github.com/lukas-reineke/indent-blankline.nvim/archive/259357fa4097e232730341fa60988087d189193a.tar.gz", + "hash": "1q9fgqvr84lynhy2vcyzp9xhzrl80g2pin14v7d3v0pgj10m8y8z" + }, + "leap.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "ggandor", + "repo": "leap.nvim" + }, + "branch": "main", + "revision": "c6bfb191f1161fbabace1f36f578a20ac6c7642c", + "url": "https://github.com/ggandor/leap.nvim/archive/c6bfb191f1161fbabace1f36f578a20ac6c7642c.tar.gz", + "hash": "1dmy45czi3irjd5qb74yamjam4d1lvqsgfxgh4vaj740b19gyl1w" + }, + "lsp_signature.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "ray-x", + "repo": "lsp_signature.nvim" + }, + "branch": "main", + "revision": "fc38521ea4d9ec8dbd4c2819ba8126cea743943b", + "url": "https://github.com/ray-x/lsp_signature.nvim/archive/fc38521ea4d9ec8dbd4c2819ba8126cea743943b.tar.gz", + "hash": "0ag79vvjz1dqyw9358ijdkckr1rqshxkpk5fl0kww1vl3pfwv9jv" + }, + "lspkind-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "onsails", + "repo": "lspkind-nvim" + }, + "branch": "main", + "revision": "d79a1c3299ad0ef94e255d045bed9fa26025dab6", + "url": "https://github.com/onsails/lspkind-nvim/archive/d79a1c3299ad0ef94e255d045bed9fa26025dab6.tar.gz", + "hash": "1wdavqmwadby9lyw415jw79kxynxv4fxg2v376y0rkxf258clarq" + }, + "lspsaga.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "tami5", + "repo": "lspsaga.nvim" + }, + "branch": "main", + "revision": "5faeec9f2508d2d49a66c0ac0d191096b4e3fa81", + "url": "https://github.com/tami5/lspsaga.nvim/archive/5faeec9f2508d2d49a66c0ac0d191096b4e3fa81.tar.gz", + "hash": "1bw71db69na2sriv9q167z9bgkir4nwny1bdfv9z606bmng4hhzc" + }, + "lua-utils.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvim-neorg", + "repo": "lua-utils.nvim" + }, + "branch": "main", + "revision": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd", + "url": "https://github.com/nvim-neorg/lua-utils.nvim/archive/e565749421f4bbb5d2e85e37c3cef9d56553d8bd.tar.gz", + "hash": "0bnl2kvxs55l8cjhfpa834bm010n8r4gmsmivjcp548c076msagn" + }, + "lualine.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "hoob3rt", + "repo": "lualine.nvim" + }, + "branch": "main", + "revision": "2a5bae925481f999263d6f5ed8361baef8df4f83", + "url": "https://github.com/hoob3rt/lualine.nvim/archive/2a5bae925481f999263d6f5ed8361baef8df4f83.tar.gz", + "hash": "0hp8gycbwm6ibq4rpa18j3g9xacgghklz4c8jlr4gif6g37r1pi0" + }, + "lz.n": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvim-neorocks", + "repo": "lz.n" + }, + "branch": "main", + "revision": "32be28a221b9c98e56841458e4b20c150a4169c4", + "url": "https://github.com/nvim-neorocks/lz.n/archive/32be28a221b9c98e56841458e4b20c150a4169c4.tar.gz", + "hash": "0jv8901lc712ddv1sdw5zan2d64hwxjcwi4mi4q1ivcp16miglp8" + }, + "lzn-auto-require": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "horriblename", + "repo": "lzn-auto-require" + }, + "branch": "main", + "revision": "a075ed51976323fd7fc44ccfca89fe0449a08cca", + "url": "https://github.com/horriblename/lzn-auto-require/archive/a075ed51976323fd7fc44ccfca89fe0449a08cca.tar.gz", + "hash": "1mgka1mmvpd2gfya898qdbbwrp5rpqds8manjs1s7g5x63xp6b98" + }, + "mind.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "phaazon", + "repo": "mind.nvim" + }, + "branch": "main", + "revision": "002137dd7cf97865ebd01b6a260209d2daf2da66", + "url": "https://github.com/phaazon/mind.nvim/archive/002137dd7cf97865ebd01b6a260209d2daf2da66.tar.gz", + "hash": "1p7gb8p1jrb2wx3x67lv7am3k1a14kvwsq89fdpb8b060s2l1214" + }, + "mini-git": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini-git" + }, + "branch": "main", + "revision": "fc13dde6cfe87cf25a4fd1ee177c0d157468436b", + "url": "https://github.com/echasnovski/mini-git/archive/fc13dde6cfe87cf25a4fd1ee177c0d157468436b.tar.gz", + "hash": "1wl9f3yncpnpv1j8imja4fwsnizjcqkv9cmblidj014rkji8lyxd" + }, + "mini.ai": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.ai" + }, + "branch": "main", + "revision": "ebb04799794a7f94628153991e6334c3304961b8", + "url": "https://github.com/echasnovski/mini.ai/archive/ebb04799794a7f94628153991e6334c3304961b8.tar.gz", + "hash": "1ipkxwizyhl3i3z6zff87k345mwkrsxmwwxbv5gcyq37bzmgpzkg" + }, + "mini.align": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.align" + }, + "branch": "main", + "revision": "e715137aece7d05734403d793b8b6b64486bc812", + "url": "https://github.com/echasnovski/mini.align/archive/e715137aece7d05734403d793b8b6b64486bc812.tar.gz", + "hash": "1m39wsinfdmqw53mllf9wr854vaw8qzhixy3j5w8r112s7qrnyx0" + }, + "mini.animate": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.animate" + }, + "branch": "main", + "revision": "d14190ac3040116540889e2ebc25f488b195799e", + "url": "https://github.com/echasnovski/mini.animate/archive/d14190ac3040116540889e2ebc25f488b195799e.tar.gz", + "hash": "15raqvmgp4srh7asll1y3finbm76l1sfmf52h69jj2y2w4kfdqv5" + }, + "mini.base16": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.base16" + }, + "branch": "main", + "revision": "23453dacc1606e5d42238d82f0b42a2985386b62", + "url": "https://github.com/echasnovski/mini.base16/archive/23453dacc1606e5d42238d82f0b42a2985386b62.tar.gz", + "hash": "0cxwc4bpkc362q00vkm75bbazd69ghyyavs30gf37fj3zj9khssl" + }, + "mini.basics": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.basics" + }, + "branch": "main", + "revision": "67c10b3436d5d3b892715137f4773e71c6753b13", + "url": "https://github.com/echasnovski/mini.basics/archive/67c10b3436d5d3b892715137f4773e71c6753b13.tar.gz", + "hash": "1ia7wha33l6q1krlx7d90v5rw25kdiv6la8j7f0s8vr0qxlcxhs7" + }, + "mini.bracketed": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.bracketed" + }, + "branch": "main", + "revision": "0091e11fabe34973fc038a8d0d0485202742e403", + "url": "https://github.com/echasnovski/mini.bracketed/archive/0091e11fabe34973fc038a8d0d0485202742e403.tar.gz", + "hash": "0yw7lmgwwvraflcwzrl33rwcdb94qsyvdi0rzq9b3ps7bla4dsyb" + }, + "mini.bufremove": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.bufremove" + }, + "branch": "main", + "revision": "285bdac9596ee7375db50c0f76ed04336dcd2685", + "url": "https://github.com/echasnovski/mini.bufremove/archive/285bdac9596ee7375db50c0f76ed04336dcd2685.tar.gz", + "hash": "0q8zm3k8hhpzbcjcd3gqz1r064fiymv9w2lfbdv5hhn2b8i9j7h8" + }, + "mini.clue": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.clue" + }, + "branch": "main", + "revision": "63e42dad781b9ed4845d90ef1da8c52dfb6dce3f", + "url": "https://github.com/echasnovski/mini.clue/archive/63e42dad781b9ed4845d90ef1da8c52dfb6dce3f.tar.gz", + "hash": "039fq0svkgr96l3z7h750iyah6fz9n18zy8wm1dfhpp3bxjyjh7z" + }, + "mini.colors": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.colors" + }, + "branch": "main", + "revision": "d64b1c0f520579d905f97208eca85329e664ab88", + "url": "https://github.com/echasnovski/mini.colors/archive/d64b1c0f520579d905f97208eca85329e664ab88.tar.gz", + "hash": "1yfx5zizm2m1c1064c5j5hb10xd7a8cgircs70q9cai14n25lqh7" + }, + "mini.comment": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.comment" + }, + "branch": "main", + "revision": "6e1f9a8ebbf6f693fa3787ceda8ca3bf3cb6aec7", + "url": "https://github.com/echasnovski/mini.comment/archive/6e1f9a8ebbf6f693fa3787ceda8ca3bf3cb6aec7.tar.gz", + "hash": "0wvyrkq84gy15ygv47vj50ch3551vmjp5gjvmvz26p3d4l6h225w" + }, + "mini.completion": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.completion" + }, + "branch": "main", + "revision": "6eb9546685c4e1c4af2365b87166d4afa39d8a1b", + "url": "https://github.com/echasnovski/mini.completion/archive/6eb9546685c4e1c4af2365b87166d4afa39d8a1b.tar.gz", + "hash": "05hk62f74fv8axdygbdz478dfcbvm4c4j696i77xlpqhfmy04m3n" + }, + "mini.diff": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.diff" + }, + "branch": "main", + "revision": "00f072250061ef498f91ed226918c9ec31a416a4", + "url": "https://github.com/echasnovski/mini.diff/archive/00f072250061ef498f91ed226918c9ec31a416a4.tar.gz", + "hash": "1n3rjajwnx5n5iamn49l4h7p23p601jd4m343ri2hmazb7zxc6vm" + }, + "mini.doc": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.doc" + }, + "branch": "main", + "revision": "bb73a3d1ff390f7e2740027ea2567017099a237c", + "url": "https://github.com/echasnovski/mini.doc/archive/bb73a3d1ff390f7e2740027ea2567017099a237c.tar.gz", + "hash": "1jsamvgdk6zxaimn9v949gbghf92d0ii8jhn2sjjy7arbl8w0w23" + }, + "mini.extra": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.extra" + }, + "branch": "main", + "revision": "477e3dda7b597b49bc1373951ea7da4da834c352", + "url": "https://github.com/echasnovski/mini.extra/archive/477e3dda7b597b49bc1373951ea7da4da834c352.tar.gz", + "hash": "02ydzdiiqf0ydrjiz847f6cbaxy3imvggchds9xn40i34nz6nhlm" + }, + "mini.files": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.files" + }, + "branch": "main", + "revision": "d0f03a5c38836fd2cce3dc80734124959002078c", + "url": "https://github.com/echasnovski/mini.files/archive/d0f03a5c38836fd2cce3dc80734124959002078c.tar.gz", + "hash": "0k5g5l9pb3br4vb5cm1b0hv081fdn967cw00mh687281dvrbnxah" + }, + "mini.fuzzy": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.fuzzy" + }, + "branch": "main", + "revision": "faa5a6c0d29c28012c90bd011162963a58715428", + "url": "https://github.com/echasnovski/mini.fuzzy/archive/faa5a6c0d29c28012c90bd011162963a58715428.tar.gz", + "hash": "03v6rp0j63a7clpp6ficq6ixwr55lvyz3ygc99r1qw0gzh6y9w2y" + }, + "mini.hipatterns": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.hipatterns" + }, + "branch": "main", + "revision": "f34975103a38b3f608219a1324cdfc58ea660b8b", + "url": "https://github.com/echasnovski/mini.hipatterns/archive/f34975103a38b3f608219a1324cdfc58ea660b8b.tar.gz", + "hash": "08mhgd7p69fzy9l99adns1gwb407wdq18di8nm6iy1nw6wrhx7yc" + }, + "mini.hues": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.hues" + }, + "branch": "main", + "revision": "ae6ad4c666ff42c1102344fe1eba18bb486f2e46", + "url": "https://github.com/echasnovski/mini.hues/archive/ae6ad4c666ff42c1102344fe1eba18bb486f2e46.tar.gz", + "hash": "1bfyhs79l8v2zbzc2kp7ss089bp05lpqqy1ndbgvyi546dxgsbp3" + }, + "mini.icons": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.icons" + }, + "branch": "main", + "revision": "910db5df9724d65371182948f921fce23c2c881e", + "url": "https://github.com/echasnovski/mini.icons/archive/910db5df9724d65371182948f921fce23c2c881e.tar.gz", + "hash": "18d2s7sqcwi7yyb14xg96gzxpvr0gk6k1r4mglgjbfpx724z2hy3" + }, + "mini.indentscope": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.indentscope" + }, + "branch": "main", + "revision": "613df2830d7faeae7483ba2e736683154b95921e", + "url": "https://github.com/echasnovski/mini.indentscope/archive/613df2830d7faeae7483ba2e736683154b95921e.tar.gz", + "hash": "02y7ya70wz79xd02xvlvri4sgnqbl9xd6d6im4323iyph7pdrg1j" + }, + "mini.jump": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.jump" + }, + "branch": "main", + "revision": "bb93d998c9db6936697746330411f5fb9957145e", + "url": "https://github.com/echasnovski/mini.jump/archive/bb93d998c9db6936697746330411f5fb9957145e.tar.gz", + "hash": "0m5b0dy7aws5si5sc494hrrnfsgb9i0ssbrfwlprmi9q75xzvhx8" + }, + "mini.jump2d": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.jump2d" + }, + "branch": "main", + "revision": "88077058297e80f1c76a18ed801ae9d7064187c6", + "url": "https://github.com/echasnovski/mini.jump2d/archive/88077058297e80f1c76a18ed801ae9d7064187c6.tar.gz", + "hash": "0dqslwc7r9yj3bszdgjp2cqhnhyzm8zn1zbikwi8q6bs50la2f7q" + }, + "mini.map": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.map" + }, + "branch": "main", + "revision": "4c58e755d75f9999abcd3b3c6e934734b6a8b098", + "url": "https://github.com/echasnovski/mini.map/archive/4c58e755d75f9999abcd3b3c6e934734b6a8b098.tar.gz", + "hash": "1407jgrzk0pvnhsssm3hdgjw3vd1n182adgh8c5h4b46dzvrvgvl" + }, + "mini.misc": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.misc" + }, + "branch": "main", + "revision": "645fb9367c19bb485902e54e5451425981498601", + "url": "https://github.com/echasnovski/mini.misc/archive/645fb9367c19bb485902e54e5451425981498601.tar.gz", + "hash": "0xy9sn0vjlaw0lk6l59drksqypz6yncmdrhach387mv4hvh1lxma" + }, + "mini.move": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.move" + }, + "branch": "main", + "revision": "4caa1c212f5ca3d1633d21cfb184808090ed74b1", + "url": "https://github.com/echasnovski/mini.move/archive/4caa1c212f5ca3d1633d21cfb184808090ed74b1.tar.gz", + "hash": "0f4nrg9n8air507h6bd61dmb1rjjhykyl36qgr0ai72cb011wzcx" + }, + "mini.notify": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.notify" + }, + "branch": "main", + "revision": "05e598d5b349bd66404d576e6a4d4340aea5f194", + "url": "https://github.com/echasnovski/mini.notify/archive/05e598d5b349bd66404d576e6a4d4340aea5f194.tar.gz", + "hash": "02z2qdkh6rks7j7b3pwnm6vala0rz5p09ahplcgv1s4mhgby6vmb" + }, + "mini.operators": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.operators" + }, + "branch": "main", + "revision": "7cb4dc66c51a3d736d347bbc517dc73dc7d28888", + "url": "https://github.com/echasnovski/mini.operators/archive/7cb4dc66c51a3d736d347bbc517dc73dc7d28888.tar.gz", + "hash": "1h6bxqkabh61gnlqj9yp5rsvn1p4g2ssk7ffkj3z8c3f1387567r" + }, + "mini.pairs": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.pairs" + }, + "branch": "main", + "revision": "7e834c5937d95364cc1740e20d673afe2d034cdb", + "url": "https://github.com/echasnovski/mini.pairs/archive/7e834c5937d95364cc1740e20d673afe2d034cdb.tar.gz", + "hash": "04x3gwrg64xxbg0njrb64bjb66rpi2aayydfqx9nbcimllng3l9y" + }, + "mini.pick": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.pick" + }, + "branch": "main", + "revision": "09ade94d2c9c5133db9ae00f3693d82eae78e9be", + "url": "https://github.com/echasnovski/mini.pick/archive/09ade94d2c9c5133db9ae00f3693d82eae78e9be.tar.gz", + "hash": "00vq7zn0nmbnw19gk8gmm6a60zkxga4s8z6c0ildnq6ldk8q70a3" + }, + "mini.sessions": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.sessions" + }, + "branch": "main", + "revision": "71c9ae596664ac110560d27eb928fc24e22bc53d", + "url": "https://github.com/echasnovski/mini.sessions/archive/71c9ae596664ac110560d27eb928fc24e22bc53d.tar.gz", + "hash": "0yd4li7z6py3c3b6ka9xv070lmrbzf38svq5wl4mhn4fdhqgqadz" + }, + "mini.snippets": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.snippets" + }, + "branch": "main", + "revision": "72920f62e3dd1330720e94e8f5d42592f3a1ecf8", + "url": "https://github.com/echasnovski/mini.snippets/archive/72920f62e3dd1330720e94e8f5d42592f3a1ecf8.tar.gz", + "hash": "0lyyv95zzwa6kn3gz7sah6v7jqj635c45n88my2sx8wknadkv30y" + }, + "mini.splitjoin": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.splitjoin" + }, + "branch": "main", + "revision": "3e92f6764e770ba392325cad3a4497adcada695f", + "url": "https://github.com/echasnovski/mini.splitjoin/archive/3e92f6764e770ba392325cad3a4497adcada695f.tar.gz", + "hash": "126z8rsyg3849ijix1siwq77f9slwr93l61rwg499flzja3incic" + }, + "mini.starter": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.starter" + }, + "branch": "main", + "revision": "4b257cfc93241e8c8cde3f9302d1616ad4e0d036", + "url": "https://github.com/echasnovski/mini.starter/archive/4b257cfc93241e8c8cde3f9302d1616ad4e0d036.tar.gz", + "hash": "135l18l6n88v8zrdk95dfvw2ycsgd8m4wp9430g74bry99jj95m4" + }, + "mini.statusline": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.statusline" + }, + "branch": "main", + "revision": "1b0edf76fe2af015f8c989385ff949f1db7aade2", + "url": "https://github.com/echasnovski/mini.statusline/archive/1b0edf76fe2af015f8c989385ff949f1db7aade2.tar.gz", + "hash": "1aiy37p08c95g3dh5f0hvabnnv56dhs4zmpah5lx33j3fbvqs381" + }, + "mini.surround": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.surround" + }, + "branch": "main", + "revision": "aa5e245829dd12d8ff0c96ef11da28681d6049aa", + "url": "https://github.com/echasnovski/mini.surround/archive/aa5e245829dd12d8ff0c96ef11da28681d6049aa.tar.gz", + "hash": "1zslkqg96yfa1lgcwavvcz60waix4y1j1r0v98sxhf8adna8jid2" + }, + "mini.tabline": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.tabline" + }, + "branch": "main", + "revision": "06ef4ecaeca2e362c7d31113435d86d144b3cbbe", + "url": "https://github.com/echasnovski/mini.tabline/archive/06ef4ecaeca2e362c7d31113435d86d144b3cbbe.tar.gz", + "hash": "1z808l3z7ywqxmqwfr1ab9ynyma5c1878x9ski0nrhvw4fli9rwy" + }, + "mini.test": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.test" + }, + "branch": "main", + "revision": "86a64d5a4bf9d73ebf5875edaae0d878f64f5e48", + "url": "https://github.com/echasnovski/mini.test/archive/86a64d5a4bf9d73ebf5875edaae0d878f64f5e48.tar.gz", + "hash": "02zslska1g4ixy51slbvlxbjzcys0spc4wh200q8mwv4ipiignrn" + }, + "mini.trailspace": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.trailspace" + }, + "branch": "main", + "revision": "3a328e62559c33014e422fb9ae97afc4208208b1", + "url": "https://github.com/echasnovski/mini.trailspace/archive/3a328e62559c33014e422fb9ae97afc4208208b1.tar.gz", + "hash": "1314bmb8zk3gdpg1wpr1935d0xd0f0cf2f0ipxclbwi07wbjz9i4" + }, + "mini.visits": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.visits" + }, + "branch": "main", + "revision": "90f20ba6ab7d3d7cb984fffddd82f5f6c7a6bea7", + "url": "https://github.com/echasnovski/mini.visits/archive/90f20ba6ab7d3d7cb984fffddd82f5f6c7a6bea7.tar.gz", + "hash": "00drzhrxdyrysbdj4fnxk3lzn9alg8xhwfwgrscywvjfks0vbsa3" + }, + "minimap.vim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "wfxr", + "repo": "minimap.vim" + }, + "branch": "main", + "revision": "395378137e6180762d5b963ca9ad5ac2db5d3283", + "url": "https://github.com/wfxr/minimap.vim/archive/395378137e6180762d5b963ca9ad5ac2db5d3283.tar.gz", + "hash": "0pfzmlf36in086g83g3sdqdy57jyyh5nbh2lrfmpbr2sg401a7qr" + }, + "modes.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "mvllow", + "repo": "modes.nvim" + }, + "branch": "main", + "revision": "c7a4b1b383606832aab150902719bd5eb5cdb2b0", + "url": "https://github.com/mvllow/modes.nvim/archive/c7a4b1b383606832aab150902719bd5eb5cdb2b0.tar.gz", + "hash": "1hy3ghscf8hfmg487p9b8cwd0y8nsi8j24kq2ir3vhd82gqhl4ja" + }, + "neo-tree.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvim-neo-tree", + "repo": "neo-tree.nvim" + }, + "branch": "main", + "revision": "a9f8943b4c31f8460d25c71e0f463d65e9775f1c", + "url": "https://github.com/nvim-neo-tree/neo-tree.nvim/archive/a9f8943b4c31f8460d25c71e0f463d65e9775f1c.tar.gz", + "hash": "1zhjd322jqmp8cs7z7nwgc3vkbf0as3an64qh5diwv04kdwjg4xm" + }, + "neocord": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "IogaMaster", + "repo": "neocord" + }, + "branch": "main", + "revision": "4d55d8dab2d5f2f272192add7a2c21982039c699", + "url": "https://github.com/IogaMaster/neocord/archive/4d55d8dab2d5f2f272192add7a2c21982039c699.tar.gz", + "hash": "18d84bd5242a3khpsk0iya3i75bc65mc2xc9kjldpvb827m6myl3" + }, + "neodev.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "folke", + "repo": "neodev.nvim" + }, + "branch": "main", + "revision": "46aa467dca16cf3dfe27098042402066d2ae242d", + "url": "https://github.com/folke/neodev.nvim/archive/46aa467dca16cf3dfe27098042402066d2ae242d.tar.gz", + "hash": "0hyn02f8cpbnnhq4570nicfjdw88kkww3il8nmy6ban8iybg7s44" + }, + "neorg": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvim-neorg", + "repo": "neorg" + }, + "branch": "main", + "revision": "6b945909d84b5aeadc875f9b3f529ec44b9bc60f", + "url": "https://github.com/nvim-neorg/neorg/archive/6b945909d84b5aeadc875f9b3f529ec44b9bc60f.tar.gz", + "hash": "0dm8s47w57gh77vaarmz64yvmv68f9ybygq65zbblya4miqknzy4" + }, + "neorg-telescope": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvim-neorg", + "repo": "neorg-telescope" + }, + "branch": "main", + "revision": "ddb2556644cae922699a239bbb0fe16e25b084b7", + "url": "https://github.com/nvim-neorg/neorg-telescope/archive/ddb2556644cae922699a239bbb0fe16e25b084b7.tar.gz", + "hash": "0p2s3n22fy1vkqc9n55x6kssqs4n0znwlszfrs532hj8m992wbks" + }, + "neovim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "rose-pine", + "repo": "neovim" + }, + "branch": "main", + "revision": "91548dca53b36dbb9d36c10f114385f759731be1", + "url": "https://github.com/rose-pine/neovim/archive/91548dca53b36dbb9d36c10f114385f759731be1.tar.gz", + "hash": "00zhx2j5lm27pcfaimzbkil61gfc6cxyy1dcgc4cyb8vfi8psf3s" + }, + "neovim-session-manager": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "Shatur", + "repo": "neovim-session-manager" + }, + "branch": "main", + "revision": "ce43f2eb2a52492157d7742e5f684b9a42bb3e5c", + "url": "https://github.com/Shatur/neovim-session-manager/archive/ce43f2eb2a52492157d7742e5f684b9a42bb3e5c.tar.gz", + "hash": "0g2vfv9jjmsgagvhdffs3z37w5xa1nlwanq74w8c62y7amyyvn2v" + }, + "new-file-template.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "otavioschwanck", + "repo": "new-file-template.nvim" + }, + "branch": "main", + "revision": "6ac66669dbf2dc5cdee184a4fe76d22465ca67e8", + "url": "https://github.com/otavioschwanck/new-file-template.nvim/archive/6ac66669dbf2dc5cdee184a4fe76d22465ca67e8.tar.gz", + "hash": "0c7378c3w6bniclp666rq15c28akb0sjy58ayva0wpyin4k26hl3" + }, + "nixpkgs": { + "type": "Channel", + "name": "nixpkgs-unstable", + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.05pre747727.f7384aacd0ec/nixexprs.tar.xz", + "hash": "12g53dydivr7wibcc7nz4kghg2mcw4jy4vp30qfwsx15pwsihizw" + }, + "noice.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "folke", + "repo": "noice.nvim" + }, + "branch": "main", + "revision": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f", + "url": "https://github.com/folke/noice.nvim/archive/eaed6cc9c06aa2013b5255349e4f26a6b17ab70f.tar.gz", + "hash": "0imw4ls3vqh8bg358y8ckxcbylhczr297zxhcfx6r7mf64sj171s" + }, + "none-ls.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvimtools", + "repo": "none-ls.nvim" + }, + "branch": "main", + "revision": "bb680d752cec37949faca7a1f509e2fe67ab418a", + "url": "https://github.com/nvimtools/none-ls.nvim/archive/bb680d752cec37949faca7a1f509e2fe67ab418a.tar.gz", + "hash": "11zgc86cjkv1vi183mplx3bsqa2x7ardk7ybyrp702xx5hmd882l" + }, + "nord.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "gbprod", + "repo": "nord.nvim" + }, + "branch": "main", + "revision": "b0f3ed242fd8e5bafa7231367821d46c6c835dd8", + "url": "https://github.com/gbprod/nord.nvim/archive/b0f3ed242fd8e5bafa7231367821d46c6c835dd8.tar.gz", + "hash": "0yr5b30dxrdrbv8210fmh35wgz3z26274aj5irzal33liznx4436" + }, + "nui.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "MunifTanjim", + "repo": "nui.nvim" + }, + "branch": "main", + "revision": "53e907ffe5eedebdca1cd503b00aa8692068ca46", + "url": "https://github.com/MunifTanjim/nui.nvim/archive/53e907ffe5eedebdca1cd503b00aa8692068ca46.tar.gz", + "hash": "1m4vlf9qcs01a8qrq3salcz966sp8cpf01gbrg8dbf255vzc8kp9" + }, + "nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "nvim" + }, + "branch": "main", + "revision": "f67b886d65a029f12ffa298701fb8f1efd89295d", + "url": "https://github.com/catppuccin/nvim/archive/f67b886d65a029f12ffa298701fb8f1efd89295d.tar.gz", + "hash": "0fwgsvlxvzz5r8jfmj1fp97cqv9b9h2f37fn4nhmim5lm6d0n14p" + }, + "nvim-autopairs": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "windwp", + "repo": "nvim-autopairs" + }, + "branch": "main", + "revision": "b464658e9b880f463b9f7e6ccddd93fb0013f559", + "url": "https://github.com/windwp/nvim-autopairs/archive/b464658e9b880f463b9f7e6ccddd93fb0013f559.tar.gz", + "hash": "0p4v49saqfsc8kinl3wc3zhmr6m2q86vmay2f10payp29n4v3did" + }, + "nvim-bufferline.lua": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "akinsho", + "repo": "nvim-bufferline.lua" + }, + "branch": "main", + "revision": "261a72b90d6db4ed8014f7bda976bcdc9dd7ce76", + "url": "https://github.com/akinsho/nvim-bufferline.lua/archive/261a72b90d6db4ed8014f7bda976bcdc9dd7ce76.tar.gz", + "hash": "1cp9md0pv0m1866fynasam01bdcqj5fvfcfqqq5licxfr0cgdb6f" + }, + "nvim-cmp": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "hrsh7th", + "repo": "nvim-cmp" + }, + "branch": "main", + "revision": "b555203ce4bd7ff6192e759af3362f9d217e8c89", + "url": "https://github.com/hrsh7th/nvim-cmp/archive/b555203ce4bd7ff6192e759af3362f9d217e8c89.tar.gz", + "hash": "1s3wiwhnqp046skxp60sdrvzhrij4javhm9ndvfsw2fv9bc35x37" + }, + "nvim-colorizer.lua": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catgoose", + "repo": "nvim-colorizer.lua" + }, + "branch": "main", + "revision": "9b5fe0450bfb2521c6cea29391e5ec571f129136", + "url": "https://github.com/catgoose/nvim-colorizer.lua/archive/9b5fe0450bfb2521c6cea29391e5ec571f129136.tar.gz", + "hash": "0q5qksxzh5jigdb71w7sk0lv4nwylkidg5c7cx578d8yhnf1jj10" + }, + "nvim-cursorline": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "yamatsum", + "repo": "nvim-cursorline" + }, + "branch": "main", + "revision": "804f0023692653b2b2368462d67d2a87056947f9", + "url": "https://github.com/yamatsum/nvim-cursorline/archive/804f0023692653b2b2368462d67d2a87056947f9.tar.gz", + "hash": "1zqbykfi4mjp07y8c1kir4lxgvcaxqy9jkn558y3n1jakpk3l72j" + }, + "nvim-dap": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "mfussenegger", + "repo": "nvim-dap" + }, + "branch": "main", + "revision": "ffb077e65259f13be096ea6d603e3575a76b214a", + "url": "https://github.com/mfussenegger/nvim-dap/archive/ffb077e65259f13be096ea6d603e3575a76b214a.tar.gz", + "hash": "0sfqxhqm3gmw8q9w60nz5cm3yj9qnq5mxm584f0g83jvdy59f9p6" + }, + "nvim-dap-go": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "leoluz", + "repo": "nvim-dap-go" + }, + "branch": "main", + "revision": "6aa88167ea1224bcef578e8c7160fe8afbb44848", + "url": "https://github.com/leoluz/nvim-dap-go/archive/6aa88167ea1224bcef578e8c7160fe8afbb44848.tar.gz", + "hash": "0ik9jnd561ipdclmxpbc0b1b4qykhkaqmmc2wr9iw4gmszjskhf1" + }, + "nvim-dap-ui": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "rcarriga", + "repo": "nvim-dap-ui" + }, + "branch": "main", + "revision": "e94d98649dccb6a3884b66aabc2e07beb279e535", + "url": "https://github.com/rcarriga/nvim-dap-ui/archive/e94d98649dccb6a3884b66aabc2e07beb279e535.tar.gz", + "hash": "06vk5h3z3sp048fnwpy0fdf5q0q41wrnaqbfbaa5vdbpki103hm6" + }, + "nvim-docs-view": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "amrbashir", + "repo": "nvim-docs-view" + }, + "branch": "main", + "revision": "1b97f8f954d74c46061bf289b6cea9232484c12c", + "url": "https://github.com/amrbashir/nvim-docs-view/archive/1b97f8f954d74c46061bf289b6cea9232484c12c.tar.gz", + "hash": "1xi0w20fq3yziwdjld1xhkm7dr0ihbbq2hik0qsckd7y73qqg5kg" + }, + "nvim-lightbulb": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "kosayoda", + "repo": "nvim-lightbulb" + }, + "branch": "main", + "revision": "3ac0791be37ba9cc7939f1ad90ebc5e75abf4eea", + "url": "https://github.com/kosayoda/nvim-lightbulb/archive/3ac0791be37ba9cc7939f1ad90ebc5e75abf4eea.tar.gz", + "hash": "0qc1rl45ykh9552dx5fmhdg0ncfsk2vpcmj5i7hrmdzgkd2f0avg" + }, + "nvim-lint": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "mfussenegger", + "repo": "nvim-lint" + }, + "branch": "main", + "revision": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87", + "url": "https://github.com/mfussenegger/nvim-lint/archive/789b7ada1b4f00e08d026dffde410dcfa6a0ba87.tar.gz", + "hash": "1npjlv0gml66mw9v8d95p3c5zzijpc362bkji6zvc5n152yy59qc" + }, + "nvim-lspconfig": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "neovim", + "repo": "nvim-lspconfig" + }, + "branch": "main", + "revision": "8b15a1a597a59f4f5306fad9adfe99454feab743", + "url": "https://github.com/neovim/nvim-lspconfig/archive/8b15a1a597a59f4f5306fad9adfe99454feab743.tar.gz", + "hash": "11mnsm4yaxd5ipmx7cn787f40zgbdx5hfdb3k6cryxfqja74gbg9" + }, + "nvim-metals": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "scalameta", + "repo": "nvim-metals" + }, + "branch": "main", + "revision": "e6b02c99161b43c67cfe1d6e5f9a9b9a0bb4701c", + "url": "https://github.com/scalameta/nvim-metals/archive/e6b02c99161b43c67cfe1d6e5f9a9b9a0bb4701c.tar.gz", + "hash": "10zyg59klx9ynqjnkmn9hhp27l9f4vzqibj8xqrnxfdrgryppm8v" + }, + "nvim-navbuddy": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "SmiteshP", + "repo": "nvim-navbuddy" + }, + "branch": "main", + "revision": "f22bac988f2dd073601d75ba39ea5636ab6e38cb", + "url": "https://github.com/SmiteshP/nvim-navbuddy/archive/f22bac988f2dd073601d75ba39ea5636ab6e38cb.tar.gz", + "hash": "034pmg403y0y1fxnb1jv291mr016bx1vn68y543v6v4dpbdlr7di" + }, + "nvim-navic": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "SmiteshP", + "repo": "nvim-navic" + }, + "branch": "main", + "revision": "8649f694d3e76ee10c19255dece6411c29206a54", + "url": "https://github.com/SmiteshP/nvim-navic/archive/8649f694d3e76ee10c19255dece6411c29206a54.tar.gz", + "hash": "0964wgwh6i4nm637vx36bshkpd5i63ipwzqmrdbkz5h9bzyng7nj" + }, + "nvim-neoclip.lua": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "AckslD", + "repo": "nvim-neoclip.lua" + }, + "branch": "main", + "revision": "5e5e010251281f4aea69cfc1d4976ffe6065cf0f", + "url": "https://github.com/AckslD/nvim-neoclip.lua/archive/5e5e010251281f4aea69cfc1d4976ffe6065cf0f.tar.gz", + "hash": "1fdm1k6gdhgi8vz4kfi2v40fjp4c1rnc6fb4bmmr3x6ca25ij8s4" + }, + "nvim-nio": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvim-neotest", + "repo": "nvim-nio" + }, + "branch": "main", + "revision": "a428f309119086dc78dd4b19306d2d67be884eee", + "url": "https://github.com/nvim-neotest/nvim-nio/archive/a428f309119086dc78dd4b19306d2d67be884eee.tar.gz", + "hash": "0n40q6znpy1xzywd1hwyivx7y1n0i0fcp3m7jp0vgipm6qssda4b" + }, + "nvim-notify": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "rcarriga", + "repo": "nvim-notify" + }, + "branch": "main", + "revision": "c3797193536711b5d8983975791c4b11dc35ab3a", + "url": "https://github.com/rcarriga/nvim-notify/archive/c3797193536711b5d8983975791c4b11dc35ab3a.tar.gz", + "hash": "003llmakicwzf0dkcnap6anwcr8kkvazfxy59shdb8zdnahfjc7n" + }, + "nvim-scrollbar": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "petertriho", + "repo": "nvim-scrollbar" + }, + "branch": "main", + "revision": "6994eb9f73d5fdc36ee2c8717940e8c853e51a49", + "url": "https://github.com/petertriho/nvim-scrollbar/archive/6994eb9f73d5fdc36ee2c8717940e8c853e51a49.tar.gz", + "hash": "0h01gcaqgjkb2392zl2jwvlsh5qmz10k9sy5rhyz1kwizmw7nw7y" + }, + "nvim-surround": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "kylechui", + "repo": "nvim-surround" + }, + "branch": "main", + "revision": "9f0cb495f25bff32c936062d85046fbda0c43517", + "url": "https://github.com/kylechui/nvim-surround/archive/9f0cb495f25bff32c936062d85046fbda0c43517.tar.gz", + "hash": "1c78320liqhza52gq2xylykd9m6rl50cn44flldg43a4l7rrabxh" + }, + "nvim-tree.lua": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvim-tree", + "repo": "nvim-tree.lua" + }, + "branch": "main", + "revision": "68fc4c20f5803444277022c681785c5edd11916d", + "url": "https://github.com/nvim-tree/nvim-tree.lua/archive/68fc4c20f5803444277022c681785c5edd11916d.tar.gz", + "hash": "08024p6w208ygn7qd74kj6yxras8qfd5f8w0qdqpyg6qbggqzyg0" + }, + "nvim-treesitter-context": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvim-treesitter", + "repo": "nvim-treesitter-context" + }, + "branch": "main", + "revision": "2bcf700b59bc92850ca83a1c02e86ba832e0fae0", + "url": "https://github.com/nvim-treesitter/nvim-treesitter-context/archive/2bcf700b59bc92850ca83a1c02e86ba832e0fae0.tar.gz", + "hash": "0xs3ha4zd96rzy5w9hyjzyyq88nnv1bnkgg2splfmnf3mhy4r0ac" + }, + "nvim-ts-autotag": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "windwp", + "repo": "nvim-ts-autotag" + }, + "branch": "main", + "revision": "1cca23c9da708047922d3895a71032bc0449c52d", + "url": "https://github.com/windwp/nvim-ts-autotag/archive/1cca23c9da708047922d3895a71032bc0449c52d.tar.gz", + "hash": "0fp8q08giyf4vi25hylsjmawcx56l5xhgmj3rli3ca9k28a56qxz" + }, + "nvim-ufo": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "kevinhwang91", + "repo": "nvim-ufo" + }, + "branch": "main", + "revision": "32cb247b893a384f1888b9cd737264159ecf183c", + "url": "https://github.com/kevinhwang91/nvim-ufo/archive/32cb247b893a384f1888b9cd737264159ecf183c.tar.gz", + "hash": "0p2f5p1nky56m666lbl8g111pf6h4piv8a29z86kdhm9hadrzp3s" + }, + "nvim-web-devicons": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvim-tree", + "repo": "nvim-web-devicons" + }, + "branch": "main", + "revision": "4adeeaa7a32d46cf3b5833341358c797304f950a", + "url": "https://github.com/nvim-tree/nvim-web-devicons/archive/4adeeaa7a32d46cf3b5833341358c797304f950a.tar.gz", + "hash": "1bnw6k9nki7igc7j4y02mbmihfb5yj7xykgiyi31kc5nbzldinl7" + }, + "obsidian.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "epwalsh", + "repo": "obsidian.nvim" + }, + "branch": "main", + "revision": "14e0427bef6c55da0d63f9a313fd9941be3a2479", + "url": "https://github.com/epwalsh/obsidian.nvim/archive/14e0427bef6c55da0d63f9a313fd9941be3a2479.tar.gz", + "hash": "15ycmhn48ryaqzch6w3w6llq2qgmjx8xwkb9dn0075z60dybpflr" + }, + "omnisharp-extended-lsp.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "Hoffs", + "repo": "omnisharp-extended-lsp.nvim" + }, + "branch": "main", + "revision": "4916fa12e5b28d21a1f031f0bdd10aa15a75d85d", + "url": "https://github.com/Hoffs/omnisharp-extended-lsp.nvim/archive/4916fa12e5b28d21a1f031f0bdd10aa15a75d85d.tar.gz", + "hash": "0w2zbiz2sxblnmhnqp6f6n7d9g9cm40ksk66anl3s7qnqffvc3cl" + }, + "onedark.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "navarasu", + "repo": "onedark.nvim" + }, + "branch": "main", + "revision": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6", + "url": "https://github.com/navarasu/onedark.nvim/archive/67a74c275d1116d575ab25485d1bfa6b2a9c38a6.tar.gz", + "hash": "1pfyz3ascxs3sxl878qcirp9jsz77kpl2ks3wxkcv8ql4psymc9l" + }, + "orgmode": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvim-orgmode", + "repo": "orgmode" + }, + "branch": "main", + "revision": "bf657742f7cb56211f99946ff64f5f87d7d7f0d0", + "url": "https://github.com/nvim-orgmode/orgmode/archive/bf657742f7cb56211f99946ff64f5f87d7d7f0d0.tar.gz", + "hash": "074493jfhgihp5zyyl86f9hfa2j6qdgw35q87vvdbmmj6rwhjmhk" + }, + "otter.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "jmbuhr", + "repo": "otter.nvim" + }, + "branch": "main", + "revision": "e8c662e1aefa8b483cfba6e00729a39a363dcecc", + "url": "https://github.com/jmbuhr/otter.nvim/archive/e8c662e1aefa8b483cfba6e00729a39a363dcecc.tar.gz", + "hash": "0csl3ddm8782fw836adj4fp4h3fg2ygv7ik632llk55mp1q4dw1l" + }, + "oxocarbon.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nyoom-engineering", + "repo": "oxocarbon.nvim" + }, + "branch": "main", + "revision": "004777819ba294423b638a35a75c9f0c7be758ed", + "url": "https://github.com/nyoom-engineering/oxocarbon.nvim/archive/004777819ba294423b638a35a75c9f0c7be758ed.tar.gz", + "hash": "1qllk870nqc9nhkdgmqm8km2rar6dsmyhfhpcfx8crrg640yfbqy" + }, + "pathlib.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "pysan3", + "repo": "pathlib.nvim" + }, + "branch": "main", + "revision": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1", + "url": "https://github.com/pysan3/pathlib.nvim/archive/57e5598af6fe253761c1b48e0b59b7cd6699e2c1.tar.gz", + "hash": "1z3nwy83r3zbll9wc2wyvg60z0dqc5hm2xdfvqh3hwm5s9w8j432" + }, + "plenary.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvim-lua", + "repo": "plenary.nvim" + }, + "branch": "main", + "revision": "2d9b06177a975543726ce5c73fca176cedbffe9d", + "url": "https://github.com/nvim-lua/plenary.nvim/archive/2d9b06177a975543726ce5c73fca176cedbffe9d.tar.gz", + "hash": "1blmh0qr010jhydw61kiynll2m7q4xyrvrva8b5ipf1g81x8ysbf" + }, + "precognition.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "tris203", + "repo": "precognition.nvim" + }, + "branch": "main", + "revision": "531971e6d883e99b1572bf47294e22988d8fbec0", + "url": "https://github.com/tris203/precognition.nvim/archive/531971e6d883e99b1572bf47294e22988d8fbec0.tar.gz", + "hash": "1mm3gzv882kd0kmqj0zfk6hlw5fxbk7jz16g1h7g8xs2mjh4lxwv" + }, + "project.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "ahmedkhalf", + "repo": "project.nvim" + }, + "branch": "main", + "revision": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb", + "url": "https://github.com/ahmedkhalf/project.nvim/archive/8c6bad7d22eef1b71144b401c9f74ed01526a4fb.tar.gz", + "hash": "1md639mcs3dgvhvx93wi0rxiwjnb195r9al9bfqvcvl3r307gxba" + }, + "promise-async": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "kevinhwang91", + "repo": "promise-async" + }, + "branch": "main", + "revision": "119e8961014c9bfaf1487bf3c2a393d254f337e2", + "url": "https://github.com/kevinhwang91/promise-async/archive/119e8961014c9bfaf1487bf3c2a393d254f337e2.tar.gz", + "hash": "0q4a0rmy09hka6zvydzjj2gcm2j5mlbrhbxfcdjj33ngpblkmqzm" + }, + "rainbow-delimiters.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "HiPhish", + "repo": "rainbow-delimiters.nvim" + }, + "branch": "main", + "revision": "85b80abaa09cbbc039e3095b2f515b3cf8cadd11", + "url": "https://github.com/HiPhish/rainbow-delimiters.nvim/archive/85b80abaa09cbbc039e3095b2f515b3cf8cadd11.tar.gz", + "hash": "0k1hqjyr9xxbg2087qssglv6dgnq81w671d3rqn7lxnprmidfqfd" + }, + "registers.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "tversteeg", + "repo": "registers.nvim" + }, + "branch": "main", + "revision": "c217f8f369e0886776cda6c94eab839b30a8940d", + "url": "https://github.com/tversteeg/registers.nvim/archive/c217f8f369e0886776cda6c94eab839b30a8940d.tar.gz", + "hash": "1pdfm98grlka537i1c94vi8bpbp66slkyz3by040wlfq4pgr3frk" + }, + "render-markdown.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "MeanderingProgrammer", + "repo": "render-markdown.nvim" + }, + "branch": "main", + "revision": "6fbd1491abc104409f119685de5353c35c97c005", + "url": "https://github.com/MeanderingProgrammer/render-markdown.nvim/archive/6fbd1491abc104409f119685de5353c35c97c005.tar.gz", + "hash": "081r1a7rhmmla80i6bg1lmld9lkjhzgkh2rvlpvka889zl36mhcx" + }, + "rtp.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvim-neorocks", + "repo": "rtp.nvim" + }, + "branch": "main", + "revision": "494ddfc888bb466555d90ace731856de1320fe45", + "url": "https://github.com/nvim-neorocks/rtp.nvim/archive/494ddfc888bb466555d90ace731856de1320fe45.tar.gz", + "hash": "1b6hx50nr2s2mnhsx9zy54pjdq7f78mi394v2b2c9v687s45nqln" + }, + "run.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "diniamo", + "repo": "run.nvim" + }, + "branch": "main", + "revision": "9015c9cece816ccf10a185b420f6e345fd990802", + "url": "https://github.com/diniamo/run.nvim/archive/9015c9cece816ccf10a185b420f6e345fd990802.tar.gz", + "hash": "10xqwck0l1ad79midicilv4hnrczzjn7lkqi7a60hba20hwb4lq8" + }, + "rustaceanvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "mrcjkb", + "repo": "rustaceanvim" + }, + "branch": "main", + "revision": "4a2f2d2cc04f5b0aa0981f98bb7d002c898318ad", + "url": "https://github.com/mrcjkb/rustaceanvim/archive/4a2f2d2cc04f5b0aa0981f98bb7d002c898318ad.tar.gz", + "hash": "0dm8ayl95ppscywdyddrpdpizbs98s0fklw8cqv48iqcxqy851k7" + }, + "smartcolumn.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "m4xshen", + "repo": "smartcolumn.nvim" + }, + "branch": "main", + "revision": "f14fbea6f86cd29df5042897ca9e3ba10ba4d27f", + "url": "https://github.com/m4xshen/smartcolumn.nvim/archive/f14fbea6f86cd29df5042897ca9e3ba10ba4d27f.tar.gz", + "hash": "1d0p906dr4wzc73zsm1pyc3fl9a6ns8i6hkl0ynvx72hj01is6p9" + }, + "sqls.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nanotee", + "repo": "sqls.nvim" + }, + "branch": "main", + "revision": "a514379f5f89bf72955ed3bf5c1c31a40b8a1472", + "url": "https://github.com/nanotee/sqls.nvim/archive/a514379f5f89bf72955ed3bf5c1c31a40b8a1472.tar.gz", + "hash": "0rdhfjzfqhpjimi7b398d8ivfrg3ay084gz92fp0g4sgr3m876x3" + }, + "tabular": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "godlygeek", + "repo": "tabular" + }, + "branch": "main", + "revision": "12437cd1b53488e24936ec4b091c9324cafee311", + "url": "https://github.com/godlygeek/tabular/archive/12437cd1b53488e24936ec4b091c9324cafee311.tar.gz", + "hash": "1cnh21yhcn2f4fajdr2b6hrclnhf1sz4abra4nw7b5yk1mvfjq5a" + }, + "telescope.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nvim-telescope", + "repo": "telescope.nvim" + }, + "branch": "main", + "revision": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc", + "url": "https://github.com/nvim-telescope/telescope.nvim/archive/2eca9ba22002184ac05eddbe47a7fe2d5a384dfc.tar.gz", + "hash": "0bkpys6dj01x6ycylmf6vrd2mqjibmny9a2hxxrqn0jqqvagm5ly" + }, + "tiny-devicons-auto-colors.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "rachartier", + "repo": "tiny-devicons-auto-colors.nvim" + }, + "branch": "main", + "revision": "c8f63933ee013c1e0a26091d58131e060546f01f", + "url": "https://github.com/rachartier/tiny-devicons-auto-colors.nvim/archive/c8f63933ee013c1e0a26091d58131e060546f01f.tar.gz", + "hash": "04mf9vkf7q3bxz79v1qp0r40sdql065vn4mfnavh71sqywm1jmcj" + }, + "todo-comments.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "folke", + "repo": "todo-comments.nvim" + }, + "branch": "main", + "revision": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0", + "url": "https://github.com/folke/todo-comments.nvim/archive/ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0.tar.gz", + "hash": "0v6vn3f9svj756ds8cp0skpw65xixlx1f3aj0fh374wdpb5i4zhh" + }, + "toggleterm.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "akinsho", + "repo": "toggleterm.nvim" + }, + "branch": "main", + "revision": "344fc1810292785b3d962ddac2de57669e1a7ff9", + "url": "https://github.com/akinsho/toggleterm.nvim/archive/344fc1810292785b3d962ddac2de57669e1a7ff9.tar.gz", + "hash": "0awj2kj3lam2j48bgld5wyb4m1v09gpxmzww35rgysq7wipliqx1" + }, + "tokyonight.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "folke", + "repo": "tokyonight.nvim" + }, + "branch": "main", + "revision": "45d22cf0e1b93476d3b6d362d720412b3d34465c", + "url": "https://github.com/folke/tokyonight.nvim/archive/45d22cf0e1b93476d3b6d362d720412b3d34465c.tar.gz", + "hash": "1038ff6i8csxx3cqccgbpv06slvbcs534cfkq7s58ww2vvldm7sc" + }, + "trouble.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "folke", + "repo": "trouble.nvim" + }, + "branch": "main", + "revision": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6", + "url": "https://github.com/folke/trouble.nvim/archive/46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6.tar.gz", + "hash": "12ky8alz6zi2vlqspnacmkj99d4sam4hrzs92i3n4sz6jx2w8696" + }, + "ts-error-translator.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "dmmulroy", + "repo": "ts-error-translator.nvim" + }, + "branch": "main", + "revision": "47e5ba89f71b9e6c72eaaaaa519dd59bd6897df4", + "url": "https://github.com/dmmulroy/ts-error-translator.nvim/archive/47e5ba89f71b9e6c72eaaaaa519dd59bd6897df4.tar.gz", + "hash": "08whn7l75qv5n74cifmnxc0s7n7ja1g7589pjnbbsk2djn6bqbky" + }, + "typst-preview.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "chomosuke", + "repo": "typst-preview.nvim" + }, + "branch": "main", + "revision": "c1100e8788baabe8ca8f8cd7fd63d3d479e49e36", + "url": "https://github.com/chomosuke/typst-preview.nvim/archive/c1100e8788baabe8ca8f8cd7fd63d3d479e49e36.tar.gz", + "hash": "1xjdfk20k0rjg8z76n57iadr7nkvfvx960gh1lc1d0ji2vpyz93p" + }, + "vim-dirtytalk": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "psliwka", + "repo": "vim-dirtytalk" + }, + "branch": "main", + "revision": "aa57ba902b04341a04ff97214360f56856493583", + "url": "https://github.com/psliwka/vim-dirtytalk/archive/aa57ba902b04341a04ff97214360f56856493583.tar.gz", + "hash": "0ikk2z9axk9hys3an3cvp7m8fwrmrxb570iw1km3yz7z9f73jdbb" + }, + "vim-fugitive": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "tpope", + "repo": "vim-fugitive" + }, + "branch": "main", + "revision": "174230d6a7f2df94705a7ffd8d5413e27ec10a80", + "url": "https://github.com/tpope/vim-fugitive/archive/174230d6a7f2df94705a7ffd8d5413e27ec10a80.tar.gz", + "hash": "0bs5l8f1qrg9fr97nb029yf7bs813fg0pk5f0cjqfnmglslfr773" + }, + "vim-illuminate": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "RRethy", + "repo": "vim-illuminate" + }, + "branch": "main", + "revision": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa", + "url": "https://github.com/RRethy/vim-illuminate/archive/5eeb7951fc630682c322e88a9bbdae5c224ff0aa.tar.gz", + "hash": "0g86iv1mndcalrizdhl3z8ryj19jnqv139jwijpzyfk8gi677lhd" + }, + "vim-markdown": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "preservim", + "repo": "vim-markdown" + }, + "branch": "main", + "revision": "8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51", + "url": "https://github.com/preservim/vim-markdown/archive/8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51.tar.gz", + "hash": "14x6jfla4921jyx4xxqng9vzmb0iaj2nn7wckhmlx8jpks6r4834" + }, + "vim-repeat": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "tpope", + "repo": "vim-repeat" + }, + "branch": "main", + "revision": "65846025c15494983dafe5e3b46c8f88ab2e9635", + "url": "https://github.com/tpope/vim-repeat/archive/65846025c15494983dafe5e3b46c8f88ab2e9635.tar.gz", + "hash": "0n8sx6s2sbjb21dv9j6y5lyqda9vvxraffg2jz423daamn96dxqv" + }, + "vim-startify": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "mhinz", + "repo": "vim-startify" + }, + "branch": "main", + "revision": "4e089dffdad46f3f5593f34362d530e8fe823dcf", + "url": "https://github.com/mhinz/vim-startify/archive/4e089dffdad46f3f5593f34362d530e8fe823dcf.tar.gz", + "hash": "1ycqfqnmalqzrx1yy9a1fc2p0w922x4sqv2222bi9xjzmh77z4sv" + }, + "which-key.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "folke", + "repo": "which-key.nvim" + }, + "branch": "main", + "revision": "8ab96b38a2530eacba5be717f52e04601eb59326", + "url": "https://github.com/folke/which-key.nvim/archive/8ab96b38a2530eacba5be717f52e04601eb59326.tar.gz", + "hash": "12wkl04apgag0p5njw8mczzlbxqf5h08k61qciwy10n4q1harzvz" + }, + "yanky.nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "gbprod", + "repo": "yanky.nvim" + }, + "branch": "main", + "revision": "d2696b30e389dced94d5acab728f524a25f308d2", + "url": "https://github.com/gbprod/yanky.nvim/archive/d2696b30e389dced94d5acab728f524a25f308d2.tar.gz", + "hash": "1i96w32wi7s0nnjmyrlcvbvz150ph3y51mi0v46d580rmdpj9pqs" + } + }, + "version": 3 +} \ No newline at end of file From ff77a97637fd43560212f98db7dec72fa02c27de Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 6 Feb 2025 17:43:54 +0300 Subject: [PATCH 50/76] treewide: Use nixpkgs fetchers for npins plugins: switch from neodev to lazydev --- .editorconfig | 3 + .github/typos.toml | 3 + docs/manual/configuring.md | 2 +- docs/manual/configuring/custom-inputs.md | 53 -- docs/manual/configuring/overriding-plugins.md | 35 + docs/manual/hacking/additional-plugins.md | 47 +- .../installation/custom-configuration.md | 32 +- .../installation/modules/home-manager.md | 7 +- docs/manual/installation/standalone/nixos.md | 52 +- flake.lock | 17 + flake.nix | 9 +- flake/develop.nix | 2 +- flake/legacyPackages.nix | 4 +- lib/default.nix | 6 +- lib/stdlib-extended.nix | 8 +- lib/types/default.nix | 8 +- lib/types/plugins.nix | 15 +- modules/default.nix | 3 +- modules/plugins/languages/lua.nix | 23 +- modules/plugins/lsp/lsp-signature/config.nix | 2 +- modules/plugins/lsp/null-ls/config.nix | 2 +- .../plugins/notes/todo-comments/config.nix | 2 +- modules/plugins/statusline/lualine/config.nix | 2 +- modules/plugins/ui/smartcolumn/config.nix | 2 +- .../utility/binds/which-key/config.nix | 2 +- .../plugins/visuals/highlight-undo/config.nix | 2 +- .../visuals/indent-blankline/config.nix | 2 +- modules/wrapper/build/config.nix | 60 +- modules/wrapper/environment/options.nix | 16 + npins/default.nix | 80 -- npins/sources.json | 795 +++++++++--------- npins/sources.nix | 85 ++ 32 files changed, 700 insertions(+), 681 deletions(-) delete mode 100644 docs/manual/configuring/custom-inputs.md create mode 100644 docs/manual/configuring/overriding-plugins.md delete mode 100644 npins/default.nix create mode 100644 npins/sources.nix diff --git a/.editorconfig b/.editorconfig index c92fdf7f..2f767ae8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -26,3 +26,6 @@ trim_trailing_whitespace = unset [*.lock] indent_size = unset + +[npins/sources.json] +insert_final_newline = unset diff --git a/.github/typos.toml b/.github/typos.toml index df76201c..2ea46a8c 100644 --- a/.github/typos.toml +++ b/.github/typos.toml @@ -1,2 +1,5 @@ default.extend-ignore-words-re = ["(?i)(noice)", "befores", "annote", "viw"] +files.extend-exclude = [ +"npins/sources.json" +] diff --git a/docs/manual/configuring.md b/docs/manual/configuring.md index 3ac261fe..f891c7a6 100644 --- a/docs/manual/configuring.md +++ b/docs/manual/configuring.md @@ -3,7 +3,7 @@ ```{=include=} chapters configuring/custom-package.md configuring/custom-plugins.md -configuring/custom-inputs.md +configuring/overriding-plugins.md configuring/languages.md configuring/dags.md configuring/dag-entries.md diff --git a/docs/manual/configuring/custom-inputs.md b/docs/manual/configuring/custom-inputs.md deleted file mode 100644 index 4f2a523b..00000000 --- a/docs/manual/configuring/custom-inputs.md +++ /dev/null @@ -1,53 +0,0 @@ -# Custom Inputs {#ch-custom-inputs} - -One of the greatest strengths of **nvf** is its ability to get plugins from -flake inputs and build them locally from any given source. For plugins that do -not require any kind of additional building step, this is a powerful method of -adding plugins to your configuration that are not packaged in nixpkgs, or those -you want to track from source without relying on nixpkgs. - -The [additional plugins section](#sec-additional-plugins) details the addition -of new plugins to nvf under regular circumstances, i.e. while making a pull -request to the project. You may _override_ those plugin inputs in your own -`flake.nix` to change source versions, e.g., to use newer versions of plugins -that are not yet updated in **nvf**. - -```nix -{ - - inputs = { - # ... - - # The name here is arbitrary, you can name it whatever. - # This will add a plugin input called "your-neodev-input" - # that you can reference in a `follows` line. - your-neodev-input = { - url = "github:folke/neodev.nvim"; - flake = false; - }; - - nvf = { - url = "github:notashelf/nvf"; - - # The name of the input must match for the follows line - # plugin-neodev-nvim is what the input is called inside nvf - # so you must match the exact name here. - inputs.plugin-neodev-nvim.follows = "your-neodev-input"; - }; - # ... - }; -} -``` - -This will override the source for the `neodev.nvim` plugin that is used in nvf -with your own input. You can update your new input via `nix flake update` or -more specifically `nix flake update ` to keep it up to date. - -::: {.warning} - -While updating plugin inputs, make sure that any configuration that has been -deprecated in newer versions is changed in the plugin's `setupOpts`. If you -depend on a new version, requesting a version bump in the issues section is a -more reliable option. - -::: diff --git a/docs/manual/configuring/overriding-plugins.md b/docs/manual/configuring/overriding-plugins.md new file mode 100644 index 00000000..bb698666 --- /dev/null +++ b/docs/manual/configuring/overriding-plugins.md @@ -0,0 +1,35 @@ +# Overriding plugins {#ch-overriding-plugins} + +The [additional plugins section](#sec-additional-plugins) details the addition +of new plugins to nvf under regular circumstances, i.e. while making a pull +request to the project. You may _override_ those plugins in your config +to change source versions, e.g., to use newer versions of plugins +that are not yet updated in **nvf**. + +```nix +vim.pluginOverrides = { + lazydev-nvim = pkgs.fetchFromGitHub { + owner = "folke"; + repo = "lazydev.nvim"; + rev = ""; + hash = ""; + }; + # It's also possible to use a flake input + lazydev-nvim = inputs.lazydev-nvim; + # Or a local path + lazydev-nvim = ./lazydev; + # Or a npins pin... etc +}; +``` + +This will override the source for the `neodev.nvim` plugin that is used in nvf +with your own plugin. + +::: {.warning} + +While updating plugin inputs, make sure that any configuration that has been +deprecated in newer versions is changed in the plugin's `setupOpts`. If you +depend on a new version, requesting a version bump in the issues section is a +more reliable option. + +::: diff --git a/docs/manual/hacking/additional-plugins.md b/docs/manual/hacking/additional-plugins.md index e67fa96b..08cae680 100644 --- a/docs/manual/hacking/additional-plugins.md +++ b/docs/manual/hacking/additional-plugins.md @@ -1,36 +1,25 @@ # Adding Plugins {#sec-additional-plugins} -To add a new Neovim plugin, first add the source url in the inputs section of -`flake.nix` with the prefix `plugin-` +To add a new Neovim plugin, use `npins` + +Use: + +`nix-shell -p npins` or `nix shell nixpkgs#npins` + +Then run: + +`npins --name github -b ` + +Be sure to replace any non-alphanumeric characters with `-` for `--name` + +For example + +`npins --name lazydev-nvim github folke laztdev.nvim -b main` + +You can now reference this plugin as a **string**. ```nix -{ - inputs = { - # ... - plugin-neodev-nvim = { - url = "github:folke/neodev.nvim"; - flake = false; - }; - # ... - }; -} -``` - -Prepending `plugin-` to the name of the input will allow nvf to automatically -discover inputs that are marked as plugins, and make them available in -`vim.startPlugins` or other areas that require a very specific plugin type as it -is defined in `@NVF_REPO@/lib/types/plugins.nix` - -The addition of the `plugin-` prefix will allow **nvf** to autodiscover the -input from the flake inputs automatically, allowing you to refer to it in areas -that require a very specific plugin type as defined in `lib/types/plugins.nix` - -You can now reference this plugin using its string name, the plugin will be -built with the name and source URL from the flake input, allowing you to refer -to it as a **string**. - -```nix -config.vim.startPlugins = ["neodev-nvim"]; +config.vim.startPlugins = ["lazydev-nvim"]; ``` ## Modular setup options {#sec-modular-setup-options} diff --git a/docs/manual/installation/custom-configuration.md b/docs/manual/installation/custom-configuration.md index b6c27163..940f35a3 100644 --- a/docs/manual/installation/custom-configuration.md +++ b/docs/manual/installation/custom-configuration.md @@ -23,15 +23,17 @@ An example flake that exposes your custom Neovim configuration might look like nvf.url = "github:notashelf/nvf"; }; - outputs = { - self, - nixpkgs, - ... - } @ inputs: { - packages."x86_64-linux" = let - neovimConfigured = (inputs.nvf.lib.neovimConfiguration { - inherit (nixpkgs.legacyPackages."x86_64-linux") pkgs; - modules = [{ + outputs = {nixpkgs, ...} @ inputs: { + packages.x86_64-linux = { + # Set the default package to the wrapped instance of Neovim. + # This will allow running your Neovim configuration with + # `nix run` and in addition, sharing your configuration with + # other users in case your repository is public. + default = + (inputs.nvf.lib.neovimConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; + modules = [ + { config.vim = { # Enable custom theming options theme.enable = true; @@ -43,14 +45,10 @@ An example flake that exposes your custom Neovim configuration might look like # reference in Appendix B of the nvf manual. # ... }; - }]; - }); - in { - # Set the default package to the wrapped instance of Neovim. - # This will allow running your Neovim configuration with - # `nix run` and in addition, sharing your configuration with - # other users in case your repository is public. - default = neovimConfigured.neovim; + } + ]; + }) + .neovim; }; }; } diff --git a/docs/manual/installation/modules/home-manager.md b/docs/manual/installation/modules/home-manager.md index 34f2757e..2b359af5 100644 --- a/docs/manual/installation/modules/home-manager.md +++ b/docs/manual/installation/modules/home-manager.md @@ -49,13 +49,10 @@ Followed by importing the home-manager module somewhere in your configuration. nvf.url = "github:notashelf/nvf"; }; - outputs = { nixpkgs, home-manager, nvf, ... }: let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; - in { + outputs = { nixpkgs, home-manager, nvf, ... }: { # ↓ this is your home output in the flake schema, expected by home-manager "your-username@your-hostname" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; + pkgs = nixpkgs.legacyPackages.x86_64-linux; modules = [ nvf.homeManagerModules.default # <- this imports the home-manager module that provides the options ./home.nix # <- your home entrypoint, `programs.nvf.*` may be defined here diff --git a/docs/manual/installation/standalone/nixos.md b/docs/manual/installation/standalone/nixos.md index a78c8dee..267d15b7 100644 --- a/docs/manual/installation/standalone/nixos.md +++ b/docs/manual/installation/standalone/nixos.md @@ -16,26 +16,32 @@ the default theme enabled. You may use other options inside `config.vim` in nvf.url = "github:notashelf/nvf"; }; - outputs = {nixpkgs, nvf, ...}: let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; - configModule = { - # Add any custom options (and do feel free to upstream them!) - # options = { ... }; - - config.vim = { - theme.enable = true; - # and more options as you see fit... - }; - }; - - customNeovim = nvf.lib.neovimConfiguration { - inherit pkgs; - modules = [configModule]; - }; - in { + outputs = { + nixpkgs, + nvf, + self, + ... + }: { # This will make the package available as a flake output under 'packages' - packages.${system}.my-neovim = customNeovim.neovim; + packages.x86_64-linux.my-neovim = + (nvf.lib.neovimConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; + modules = [ + # Or move this to a separate file and add it's path here instead + # IE: ./nvf_module.nix + ( + {pkgs, ...}: { + # Add any custom options (and do feel free to upstream them!) + # options = { ... }; + config.vim = { + theme.enable = true; + # and more options as you see fit... + }; + } + ) + ]; + }) + .neovim; # Example nixosConfiguration using the configured Neovim package nixosConfigurations = { @@ -43,11 +49,13 @@ the default theme enabled. You may use other options inside `config.vim` in # ... modules = [ # This will make wrapped neovim available in your system packages - {environment.systemPackages = [customNeovim.neovim];} + # Can also move this to another config file if you pass inputs/self around with specialArgs + ({pkgs, ...}: { + environment.systemPackages = [self.packages.${pkgs.stdenv.system}.neovim]; + }) ]; # ... }; }; }; -} -``` +}``` diff --git a/flake.lock b/flake.lock index c1cda841..9221f43f 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "blink-cmp": { + "flake": false, + "locked": { + "lastModified": 1739129359, + "narHash": "sha256-nUrXXiJ7NRxS21H53U323lwEKdo08Y011l8XskXC/vw=", + "owner": "saghen", + "repo": "blink.cmp", + "rev": "b2485c76cb7877de6fe9c8670af59ba3d72fd74d", + "type": "github" + }, + "original": { + "owner": "saghen", + "repo": "blink.cmp", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -121,6 +137,7 @@ }, "root": { "inputs": { + "blink-cmp": "blink-cmp", "flake-parts": "flake-parts", "flake-utils": "flake-utils", "mnw": "mnw", diff --git a/flake.nix b/flake.nix index 28acb8b0..1c559bd7 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,7 @@ } @ inputs: let # call the extended library with `inputs` # inputs is used to get the original standard library, and to pass inputs to the plugin autodiscovery function - lib = import ./lib/stdlib-extended.nix inputs; + lib = import ./lib/stdlib-extended.nix {inherit inputs self;}; in flake-parts.lib.mkFlake { inherit inputs; @@ -54,7 +54,7 @@ self.nixosModules.nvf; }; - pins = import ./npins; + inherit (lib.importJSON ./npins/sources.json) pins; }; perSystem = {pkgs, ...}: { @@ -98,5 +98,10 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; }; + + blink-cmp = { + url = "github:saghen/blink.cmp"; + flake = false; + }; }; } diff --git a/flake/develop.nix b/flake/develop.nix index 7b645288..71c13688 100644 --- a/flake/develop.nix +++ b/flake/develop.nix @@ -9,7 +9,7 @@ default = self'.devShells.lsp; nvim-nix = pkgs.mkShellNoCC {packages = [config.packages.nix];}; lsp = pkgs.mkShellNoCC { - packages = with pkgs; [nil statix deadnix alejandra]; + packages = with pkgs; [nil statix deadnix alejandra npins]; }; }; diff --git a/flake/legacyPackages.nix b/flake/legacyPackages.nix index 5b6ccb6d..d5b5aacd 100644 --- a/flake/legacyPackages.nix +++ b/flake/legacyPackages.nix @@ -14,8 +14,8 @@ # features as they are added. nil = inputs'.nil.packages.default; blink-cmp = final.callPackage ./legacyPackages/blink-cmp.nix { - src = inputs.plugin-blink-cmp; - version = inputs.plugin-blink-cmp.shortRev or inputs.plugin-blink-cmp.shortDirtyRev or "dirty"; + src = inputs.blink-cmp; + version = inputs.blink-cmp.shortRev or inputs.blink-cmp.shortDirtyRev or "dirty"; }; }) ]; diff --git a/lib/default.nix b/lib/default.nix index e6ccd2a7..952278a8 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,10 +1,10 @@ { + self, inputs, lib, ... }: { - types = import ./types {inherit inputs lib;}; - + types = import ./types {inherit lib;}; config = import ./config.nix {inherit lib;}; binds = import ./binds.nix {inherit lib;}; dag = import ./dag.nix {inherit lib;}; @@ -12,5 +12,5 @@ lists = import ./lists.nix {inherit lib;}; attrsets = import ./attrsets.nix {inherit lib;}; lua = import ./lua.nix {inherit lib;}; - neovimConfiguration = import ../modules {inherit inputs lib;}; + neovimConfiguration = import ../modules {inherit self inputs lib;}; } diff --git a/lib/stdlib-extended.nix b/lib/stdlib-extended.nix index 0f30815a..a85160c3 100644 --- a/lib/stdlib-extended.nix +++ b/lib/stdlib-extended.nix @@ -1,6 +1,10 @@ # Convenience function that returns the given Nixpkgs standard library # extended with our functions using `lib.extend`. -inputs: +{ + inputs, + self, + ... +} @ args: inputs.nixpkgs.lib.extend (self: super: { # WARNING: New functions should not be added here, but to files # imported by `./default.nix` under their own categories. If your @@ -12,7 +16,7 @@ inputs.nixpkgs.lib.extend (self: super: { # E.g. for an input called `nvf`, `inputs.nvf.lib.nvim` will return the set # below. nvim = import ./. { - inherit inputs; + inherit (args) inputs self; lib = self; }; diff --git a/lib/types/default.nix b/lib/types/default.nix index 98fcaec5..667a4e96 100644 --- a/lib/types/default.nix +++ b/lib/types/default.nix @@ -1,10 +1,6 @@ -{ - inputs, - lib, - ... -}: let +{lib}: let typesDag = import ./dag.nix {inherit lib;}; - typesPlugin = import ./plugins.nix {inherit inputs lib;}; + typesPlugin = import ./plugins.nix {inherit lib;}; typesLanguage = import ./languages.nix {inherit lib;}; customTypes = import ./custom.nix {inherit lib;}; in { diff --git a/lib/types/plugins.nix b/lib/types/plugins.nix index 656b7ab8..fc2bd083 100644 --- a/lib/types/plugins.nix +++ b/lib/types/plugins.nix @@ -1,12 +1,8 @@ -{ - inputs, - lib, - ... -}: let +{lib}: let inherit (lib.options) mkOption; inherit (lib.attrsets) attrNames mapAttrs' filterAttrs nameValuePair; inherit (lib.strings) hasPrefix removePrefix; - inherit (lib.types) submodule either package enum str lines attrsOf anything listOf nullOr; + inherit (lib.types) submodule either package enum str lines anything listOf nullOr; # Get the names of all flake inputs that start with the given prefix. fromInputs = { @@ -15,11 +11,8 @@ }: mapAttrs' (n: v: nameValuePair (removePrefix prefix n) {src = v;}) (filterAttrs (n: _: hasPrefix prefix n) inputs); - # Get the names of all flake inputs that start with the given prefix. - pluginInputNames = attrNames (fromInputs { - inherit inputs; - prefix = "plugin-"; - }); + # Get the names of all npins + pluginInputNames = attrNames (lib.importJSON ../../npins/sources.json).pins; # You can either use the name of the plugin or a package. pluginType = nullOr ( diff --git a/modules/default.nix b/modules/default.nix index a207e0d1..a479bae2 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,4 +1,5 @@ { + self, inputs, lib, }: { @@ -23,7 +24,7 @@ specialArgs = extraSpecialArgs // { - inherit inputs; + inherit self inputs; modulesPath = toString ./.; }; modules = concatLists [ diff --git a/modules/plugins/languages/lua.nix b/modules/plugins/languages/lua.nix index 5ceed3ee..4ad49784 100644 --- a/modules/plugins/languages/lua.nix +++ b/modules/plugins/languages/lua.nix @@ -8,7 +8,6 @@ inherit (lib.modules) mkIf mkMerge; inherit (lib.meta) getExe; inherit (lib.lists) isList; - inherit (lib.strings) optionalString; inherit (lib.types) either listOf package str; inherit (lib.nvim.types) mkGrammarOption; inherit (lib.nvim.lua) expToLua; @@ -16,6 +15,12 @@ cfg = config.vim.languages.lua; in { + imports = [ + (lib.mkRemovedOptionModule ["vim" "languages" "lua" "lsp" "neodev"] '' + neodev has been replaced by lazydev + '') + ]; + options.vim.languages.lua = { enable = mkEnableOption "Lua language support"; treesitter = { @@ -32,7 +37,7 @@ in { default = pkgs.lua-language-server; }; - neodev.enable = mkEnableOption "neodev.nvim integration, useful for neovim plugin developers"; + lazydev.enable = mkEnableOption "lazydev.nvim integration, useful for neovim plugin developers"; }; }; @@ -49,7 +54,6 @@ in { lspconfig.lua_ls.setup { capabilities = capabilities; on_attach = default_on_attach; - ${optionalString cfg.lsp.neodev.enable "before_init = require('neodev.lsp').before_init;"} cmd = ${ if isList cfg.lsp.package then expToLua cfg.lsp.package @@ -59,10 +63,15 @@ in { ''; }) - (mkIf cfg.lsp.neodev.enable { - vim.startPlugins = ["neodev-nvim"]; - vim.pluginRC.neodev = entryBefore ["lua-lsp"] '' - require("neodev").setup({}) + (mkIf cfg.lsp.lazydev.enable { + vim.startPlugins = ["lazydev-nvim"]; + vim.pluginRC.lazydev = entryBefore ["lua-lsp"] '' + require("lazydev").setup({ + enabled = function(root_dir) + return not vim.uv.fs_stat(root_dir .. "/.luarc.json") + end, + library = { { path = "''${3rd}/luv/library", words = { "vim%.uv" } } }, + }) ''; }) ])) diff --git a/modules/plugins/lsp/lsp-signature/config.nix b/modules/plugins/lsp/lsp-signature/config.nix index 535b2534..da8828d4 100644 --- a/modules/plugins/lsp/lsp-signature/config.nix +++ b/modules/plugins/lsp/lsp-signature/config.nix @@ -22,7 +22,7 @@ in { ]; vim = { startPlugins = [ - "lsp-signature" + "lsp-signature-nvim" ]; lsp.lspSignature.setupOpts = { diff --git a/modules/plugins/lsp/null-ls/config.nix b/modules/plugins/lsp/null-ls/config.nix index 8e776ed3..549ef0b7 100644 --- a/modules/plugins/lsp/null-ls/config.nix +++ b/modules/plugins/lsp/null-ls/config.nix @@ -14,7 +14,7 @@ in { { vim = { startPlugins = [ - "none-ls" + "none-ls-nvim" "plenary-nvim" ]; diff --git a/modules/plugins/notes/todo-comments/config.nix b/modules/plugins/notes/todo-comments/config.nix index 645f6770..b03efce4 100644 --- a/modules/plugins/notes/todo-comments/config.nix +++ b/modules/plugins/notes/todo-comments/config.nix @@ -15,7 +15,7 @@ in { config = mkIf cfg.enable { vim = { startPlugins = [ - "todo-comments" + "todo-comments-nvim" ]; maps.normal = mkMerge [ diff --git a/modules/plugins/statusline/lualine/config.nix b/modules/plugins/statusline/lualine/config.nix index ac587c03..facfcebb 100644 --- a/modules/plugins/statusline/lualine/config.nix +++ b/modules/plugins/statusline/lualine/config.nix @@ -34,7 +34,7 @@ in { }) (mkIf cfg.enable { vim = { - startPlugins = ["lualine"]; + startPlugins = ["lualine-nvim"]; pluginRC.lualine = entryAnywhere '' local lualine = require('lualine') lualine.setup ${toLuaObject cfg.setupOpts} diff --git a/modules/plugins/ui/smartcolumn/config.nix b/modules/plugins/ui/smartcolumn/config.nix index f38edfdf..9f6f10e2 100644 --- a/modules/plugins/ui/smartcolumn/config.nix +++ b/modules/plugins/ui/smartcolumn/config.nix @@ -11,7 +11,7 @@ in { config = mkIf cfg.enable { vim = { - startPlugins = ["smartcolumn"]; + startPlugins = ["smartcolumn-nvim"]; pluginRC.smartcolumn = entryAnywhere '' require("smartcolumn").setup(${toLuaObject cfg.setupOpts}) diff --git a/modules/plugins/utility/binds/which-key/config.nix b/modules/plugins/utility/binds/which-key/config.nix index 01a29fbf..68dbbfbf 100644 --- a/modules/plugins/utility/binds/which-key/config.nix +++ b/modules/plugins/utility/binds/which-key/config.nix @@ -14,7 +14,7 @@ in { config = mkIf cfg.enable { vim = { - startPlugins = ["which-key"]; + startPlugins = ["which-key-nvim"]; pluginRC.whichkey = entryAnywhere '' local wk = require("which-key") diff --git a/modules/plugins/visuals/highlight-undo/config.nix b/modules/plugins/visuals/highlight-undo/config.nix index d41c6a69..09ae49be 100644 --- a/modules/plugins/visuals/highlight-undo/config.nix +++ b/modules/plugins/visuals/highlight-undo/config.nix @@ -11,7 +11,7 @@ in { config = mkIf cfg.enable { vim = { - startPlugins = ["highlight-undo"]; + startPlugins = ["highlight-undo-nvim"]; pluginRC.highlight-undo = entryAnywhere '' require("highlight-undo").setup(${toLuaObject cfg.setupOpts}) diff --git a/modules/plugins/visuals/indent-blankline/config.nix b/modules/plugins/visuals/indent-blankline/config.nix index 581bd136..78ebf68c 100644 --- a/modules/plugins/visuals/indent-blankline/config.nix +++ b/modules/plugins/visuals/indent-blankline/config.nix @@ -11,7 +11,7 @@ in { config = mkIf cfg.enable { vim = { - startPlugins = ["indent-blankline"]; + startPlugins = ["indent-blankline-nvim"]; pluginRC.indent-blankline = entryAnywhere '' require("ibl").setup(${toLuaObject cfg.setupOpts}) diff --git a/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index 88745fb5..64734f3b 100644 --- a/modules/wrapper/build/config.nix +++ b/modules/wrapper/build/config.nix @@ -1,29 +1,27 @@ { inputs, - lib, config, pkgs, + lib, ... -} -: let +}: let inherit (pkgs) vimPlugins; inherit (lib.strings) isString; inherit (lib.lists) filter map; inherit (builtins) path; - # alias to the internal configuration - vimOptions = config.vim; + getPin = name: ((pkgs.callPackages ../../../npins/sources.nix {}) // config.vim.pluginOverrides).${name}; noBuildPlug = pname: let - input = inputs."plugin-${pname}"; - version = input.shortRev or input.shortDirtyRev or "dirty"; + pin = getPin pname; + version = pin.revision or "dirty"; in { # vim.lazy.plugins relies on pname, so we only set that here # version isn't needed for anything, but inherit it anyway for correctness inherit pname version; outPath = path { name = "${pname}-0-unstable-${version}"; - path = input.outPath; + path = pin.outPath; }; passthru.vimPlugin = false; }; @@ -32,12 +30,12 @@ # if the plugin is nvim-treesitter, warn the user to use buildTreesitterPlug # instead buildPlug = attrs: let - input = inputs."plugin-${attrs.pname}"; + pin = getPin attrs.pname; in pkgs.vimUtils.buildVimPlugin ( { - version = input.shortRev or input.shortDirtyRev or "dirty"; - src = input.outPath; + version = pin.revision or "dirty"; + src = pin.outPath; } // attrs ); @@ -45,7 +43,7 @@ buildTreesitterPlug = grammars: vimPlugins.nvim-treesitter.withPlugins (_: grammars); pluginBuilders = { - nvim-treesitter = buildTreesitterPlug vimOptions.treesitter.grammars; + nvim-treesitter = buildTreesitterPlug config.vim.treesitter.grammars; flutter-tools-patched = buildPlug { pname = "flutter-tools"; patches = [./patches/flutter-tools.patch]; @@ -65,39 +63,41 @@ }; buildConfigPlugins = plugins: - map ( - plug: - if (isString plug) - then pluginBuilders.${plug} or (noBuildPlug plug) - else plug - ) (filter (f: f != null) plugins); + map (plug: + if (isString plug) + then pluginBuilders.${plug} or (noBuildPlug plug) + else plug) ( + filter (f: f != null) plugins + ); # built (or "normalized") plugins that are modified - builtStartPlugins = buildConfigPlugins vimOptions.startPlugins; - builtOptPlugins = map (package: package // {optional = true;}) (buildConfigPlugins vimOptions.optPlugins); + builtStartPlugins = buildConfigPlugins config.vim.startPlugins; + builtOptPlugins = map (package: package // {optional = true;}) ( + buildConfigPlugins config.vim.optPlugins + ); # additional Lua and Python3 packages, mapped to their respective functions # to conform to the format mnw expects. end user should # only ever need to pass a list of packages, which are modified # here - extraLuaPackages = ps: map (x: ps.${x}) vimOptions.luaPackages; - extraPython3Packages = ps: map (x: ps.${x}) vimOptions.python3Packages; + extraLuaPackages = ps: map (x: ps.${x}) config.vim.luaPackages; + extraPython3Packages = ps: map (x: ps.${x}) config.vim.python3Packages; # Wrap the user's desired (unwrapped) Neovim package with arguments that'll be used to # generate a wrapped Neovim package. neovim-wrapped = inputs.mnw.lib.wrap pkgs { - neovim = vimOptions.package; + neovim = config.vim.package; plugins = builtStartPlugins ++ builtOptPlugins; appName = "nvf"; - extraBinPath = vimOptions.extraPackages; - initLua = vimOptions.builtLuaConfigRC; - luaFiles = vimOptions.extraLuaFiles; + extraBinPath = config.vim.extraPackages; + initLua = config.vim.builtLuaConfigRC; + luaFiles = config.vim.extraLuaFiles; - inherit (vimOptions) viAlias vimAlias withRuby withNodeJs withPython3; + inherit (config.vim) viAlias vimAlias withRuby withNodeJs withPython3; inherit extraLuaPackages extraPython3Packages; }; - dummyInit = pkgs.writeText "nvf-init.lua" vimOptions.builtLuaConfigRC; + dummyInit = pkgs.writeText "nvf-init.lua" config.vim.builtLuaConfigRC; # Additional helper scripts for printing and displaying nvf configuration # in your commandline. printConfig = pkgs.writers.writeDashBin "nvf-print-config" "cat ${dummyInit}"; @@ -110,10 +110,10 @@ paths = [neovim-wrapped printConfig printConfigPath]; postBuild = "echo Helpers added"; - # Allow evaluating vimOptions, i.e., config.vim from the packages' passthru + # Allow evaluating config.vim, i.e., config.vim from the packages' passthru # attribute. For example, packages.x86_64-linux.neovim.passthru.neovimConfig # will return the configuration in full. - passthru.neovimConfig = vimOptions; + passthru.neovimConfig = config.vim; meta = neovim-wrapped.meta diff --git a/modules/wrapper/environment/options.nix b/modules/wrapper/environment/options.nix index 6a8d085f..c401f506 100644 --- a/modules/wrapper/environment/options.nix +++ b/modules/wrapper/environment/options.nix @@ -140,5 +140,21 @@ in { example = ''["pynvim"]''; description = "List of python packages to install"; }; + + pluginOverrides = mkOption { + type = attrsOf package; + default = {}; + example = '' + { + lazydev-nvim = pkgs.fetchFromGitHub { + owner = "folke"; + repo = "lazydev.nvim"; + rev = ""; + hash = ""; + }; + } + ''; + description = "Attribute set of plugins to override default values"; + }; }; } diff --git a/npins/default.nix b/npins/default.nix deleted file mode 100644 index 5e7d086e..00000000 --- a/npins/default.nix +++ /dev/null @@ -1,80 +0,0 @@ -# Generated by npins. Do not modify; will be overwritten regularly -let - data = builtins.fromJSON (builtins.readFile ./sources.json); - version = data.version; - - mkSource = - spec: - assert spec ? type; - let - path = - if spec.type == "Git" then - mkGitSource spec - else if spec.type == "GitRelease" then - mkGitSource spec - else if spec.type == "PyPi" then - mkPyPiSource spec - else if spec.type == "Channel" then - mkChannelSource spec - else - builtins.throw "Unknown source type ${spec.type}"; - in - spec // { outPath = path; }; - - mkGitSource = - { - repository, - revision, - url ? null, - hash, - branch ? null, - ... - }: - assert repository ? type; - # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository - # In the latter case, there we will always be an url to the tarball - if url != null then - (builtins.fetchTarball { - inherit url; - sha256 = hash; # FIXME: check nix version & use SRI hashes - }) - else - assert repository.type == "Git"; - let - urlToName = - url: rev: - let - matched = builtins.match "^.*/([^/]*)(\\.git)?$" repository.url; - - short = builtins.substring 0 7 rev; - - appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else ""; - in - "${if matched == null then "source" else builtins.head matched}${appendShort}"; - name = urlToName repository.url revision; - in - builtins.fetchGit { - url = repository.url; - rev = revision; - inherit name; - # hash = hash; - }; - - mkPyPiSource = - { url, hash, ... }: - builtins.fetchurl { - inherit url; - sha256 = hash; - }; - - mkChannelSource = - { url, hash, ... }: - builtins.fetchTarball { - inherit url; - sha256 = hash; - }; -in -if version == 3 then - builtins.mapAttrs (_: mkSource) data.pins -else - throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`" diff --git a/npins/sources.json b/npins/sources.json index b201e331..70df6065 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1,42 +1,6 @@ { "pins": { - "ChatGPT.nvim": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "jackMort", - "repo": "ChatGPT.nvim" - }, - "branch": "main", - "revision": "5b6d296eefc75331e2ff9f0adcffbd7d27862dd6", - "url": "https://github.com/jackMort/ChatGPT.nvim/archive/5b6d296eefc75331e2ff9f0adcffbd7d27862dd6.tar.gz", - "hash": "07f0p03fb4060lc7jfvp8mqi0jbk8mril9fg3b8rx9mq8415g1gr" - }, - "Comment.nvim": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "numToStr", - "repo": "Comment.nvim" - }, - "branch": "main", - "revision": "e30b7f2008e52442154b66f7c519bfd2f1e32acb", - "url": "https://github.com/numToStr/Comment.nvim/archive/e30b7f2008e52442154b66f7c519bfd2f1e32acb.tar.gz", - "hash": "0dyz78j0kj3j99y5g8wncl7794g6z2qs05gfg9ddxaa4xswhyjc7" - }, - "LuaSnip": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "L3MON4D3", - "repo": "LuaSnip" - }, - "branch": "main", - "revision": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d", - "url": "https://github.com/L3MON4D3/LuaSnip/archive/33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d.tar.gz", - "hash": "1zicjd8y9a16rq1rs1xbmc6g927j5xi05yrxj9ap6wp72pfxxw3r" - }, - "aerial.nvim": { + "aerial-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -72,7 +36,19 @@ "url": "https://github.com/rrethy/base16-nvim/archive/6ac181b5733518040a33017dde654059cd771b7c.tar.gz", "hash": "0q47jbh6abn2hql9ghi9ayx3l8pdrdcdrnf4qfk7cp0v1bl7y48r" }, - "bufdelete.nvim": { + "blink-compat": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "saghen", + "repo": "blink.compat" + }, + "branch": "main", + "revision": "3f39cba0a30a7e7d7c2f63605e88ede464c7d39d", + "url": "https://github.com/saghen/blink.compat/archive/3f39cba0a30a7e7d7c2f63605e88ede464c7d39d.tar.gz", + "hash": "1a970v4b73jimjq7cmf61yycbd5j2x0vr14c6gbpblcaxkqby4bv" + }, + "bufdelete-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -84,7 +60,19 @@ "url": "https://github.com/famiu/bufdelete.nvim/archive/f6bcea78afb3060b198125256f897040538bcb81.tar.gz", "hash": "0xfzk3zgnxbwnr55n3lglsb8nmhnchpiqz9d152xr6j8d9z0sdcn" }, - "ccc.nvim": { + "catppuccin": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "nvim" + }, + "branch": "main", + "revision": "f67b886d65a029f12ffa298701fb8f1efd89295d", + "url": "https://github.com/catppuccin/nvim/archive/f67b886d65a029f12ffa298701fb8f1efd89295d.tar.gz", + "hash": "0fwgsvlxvzz5r8jfmj1fp97cqv9b9h2f37fn4nhmim5lm6d0n14p" + }, + "ccc-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -96,7 +84,7 @@ "url": "https://github.com/uga-rosa/ccc.nvim/archive/7c639042583c7bdc7ce2e37e5a0e0aa6d0659c6a.tar.gz", "hash": "01pp5j89x6p7k3r0gpcd12yjdqwxv2m472hnjvpr6mqhq3d525rs" }, - "cellular-automaton.nvim": { + "cellular-automaton-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -108,7 +96,19 @@ "url": "https://github.com/Eandrju/cellular-automaton.nvim/archive/11aea08aa084f9d523b0142c2cd9441b8ede09ed.tar.gz", "hash": "0jvz2vnyhm6a2zyz93sh87n59vga2l016ijrfybfrlv44hhzp2ww" }, - "cheatsheet.nvim": { + "chatgpt-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "jackMort", + "repo": "ChatGPT.nvim" + }, + "branch": "main", + "revision": "5b6d296eefc75331e2ff9f0adcffbd7d27862dd6", + "url": "https://github.com/jackMort/ChatGPT.nvim/archive/5b6d296eefc75331e2ff9f0adcffbd7d27862dd6.tar.gz", + "hash": "07f0p03fb4060lc7jfvp8mqi0jbk8mril9fg3b8rx9mq8415g1gr" + }, + "cheatsheet-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -120,7 +120,7 @@ "url": "https://github.com/sudormrfbin/cheatsheet.nvim/archive/9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef.tar.gz", "hash": "0dm94kppbnky8y0gs1pdfs7vcc9hyp8lf6h33dw6ndqfnw3hd2ad" }, - "cinnamon.nvim": { + "cinnamon-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -144,6 +144,18 @@ "url": "https://github.com/hrsh7th/cmp-buffer/archive/3022dbc9166796b644a841a02de8dd1cc1d311fa.tar.gz", "hash": "1cwx8ky74633y0bmqmvq1lqzmphadnhzmhzkddl3hpb7rgn18vkl" }, + "cmp-luasnip": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "saadparwaiz1", + "repo": "cmp_luasnip" + }, + "branch": "main", + "revision": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90", + "url": "https://github.com/saadparwaiz1/cmp_luasnip/archive/98d9cb5c2c38532bd9bdb481067b20fea8f32e90.tar.gz", + "hash": "037sh4g1747wf07f9sqngiifp89hqww6m2rvizy5ra7jyd04magk" + }, "cmp-nvim-lsp": { "type": "Git", "repository": { @@ -180,19 +192,7 @@ "url": "https://github.com/ray-x/cmp-treesitter/archive/958fcfa0d8ce46d215e19cc3992c542f576c4123.tar.gz", "hash": "05as01c2f7i20zkzpqbq9n8ji9bcwd678ixmxnrz9vmz5zsj8q7i" }, - "cmp_luasnip": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "saadparwaiz1", - "repo": "cmp_luasnip" - }, - "branch": "main", - "revision": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90", - "url": "https://github.com/saadparwaiz1/cmp_luasnip/archive/98d9cb5c2c38532bd9bdb481067b20fea8f32e90.tar.gz", - "hash": "037sh4g1747wf07f9sqngiifp89hqww6m2rvizy5ra7jyd04magk" - }, - "codewindow.nvim": { + "codewindow-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -204,17 +204,17 @@ "url": "https://github.com/gorbit99/codewindow.nvim/archive/dd7017617962943eb1d152fc58940f11c6775a4a.tar.gz", "hash": "1kxkf50rkqrzqz03jvygbwxb1yfmqh0gskr00vpmyrq51569a2hw" }, - "conform.nvim": { + "comment-nvim": { "type": "Git", "repository": { "type": "GitHub", - "owner": "stevearc", - "repo": "conform.nvim" + "owner": "numToStr", + "repo": "Comment.nvim" }, "branch": "main", - "revision": "363243c03102a531a8203311d4f2ae704c620d9b", - "url": "https://github.com/stevearc/conform.nvim/archive/363243c03102a531a8203311d4f2ae704c620d9b.tar.gz", - "hash": "1lf7a5b30g37ys9f4z9gq68ymzfzsw7bwzqp1bb91cx9df1bdyck" + "revision": "e30b7f2008e52442154b66f7c519bfd2f1e32acb", + "url": "https://github.com/numToStr/Comment.nvim/archive/e30b7f2008e52442154b66f7c519bfd2f1e32acb.tar.gz", + "hash": "0dyz78j0kj3j99y5g8wncl7794g6z2qs05gfg9ddxaa4xswhyjc7" }, "copilot-cmp": { "type": "Git", @@ -228,7 +228,7 @@ "url": "https://github.com/zbirenbaum/copilot-cmp/archive/15fc12af3d0109fa76b60b5cffa1373697e261d1.tar.gz", "hash": "0qyakf6wvkdxpzx63gv3p9bwafmxk87vgvcp14pfrkiznvqlpd3s" }, - "copilot.lua": { + "copilot-lua": { "type": "Git", "repository": { "type": "GitHub", @@ -240,7 +240,7 @@ "url": "https://github.com/zbirenbaum/copilot.lua/archive/886ee73b6d464b2b3e3e6a7ff55ce87feac423a9.tar.gz", "hash": "15d1m1lq1f4snkgvnr3cvz0gxh3yycszlq6cph68ddn1sb8h8rbk" }, - "crates.nvim": { + "crates-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -252,7 +252,7 @@ "url": "https://github.com/Saecki/crates.nvim/archive/8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785.tar.gz", "hash": "088yi9z0wj2ackg3hh5zm66yg31b2c5rc2ss24idx2jkfhqv908c" }, - "csharpls-extended-lsp.nvim": { + "csharpls-extended-lsp-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -276,7 +276,7 @@ "url": "https://github.com/glepnir/dashboard-nvim/archive/ae309606940d26d8c9df8b048a6e136b6bbec478.tar.gz", "hash": "06mr3869ag542vxnj68458k9cfyw9ldj0mjahzqkpwfl5nc28bs2" }, - "diffview.nvim": { + "diffview-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -288,7 +288,7 @@ "url": "https://github.com/sindrets/diffview.nvim/archive/4516612fe98ff56ae0415a259ff6361a89419b0a.tar.gz", "hash": "0brabpd02596hg98bml118bx6z2sly98kf1cr2p0xzybiinb4zs9" }, - "dracula.nvim": { + "dracula-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -300,7 +300,7 @@ "url": "https://github.com/Mofiqul/dracula.nvim/archive/515acae4fd294fcefa5b15237a333c2606e958d1.tar.gz", "hash": "1sr09v6q07q111pbcm8nc12mvgzb5f5n7bg8frrwb6dpspj4h97n" }, - "dressing.nvim": { + "dressing-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -312,7 +312,7 @@ "url": "https://github.com/stevearc/dressing.nvim/archive/3a45525bb182730fe462325c99395529308f431e.tar.gz", "hash": "0wd9zgqh9i9f77ny7avgsnsl6rxamcqcr7qlbzmsb8p003kl321p" }, - "elixir-tools.nvim": { + "elixir-tools-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -324,7 +324,7 @@ "url": "https://github.com/elixir-tools/elixir-tools.nvim/archive/803fa69dbb457305cff98e3997bed2c4b51aea7c.tar.gz", "hash": "09fnpj27rynw55hvs8dc860di10m3yj628aghsn3lzm249ar708a" }, - "fastaction.nvim": { + "fastaction-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -336,7 +336,7 @@ "url": "https://github.com/Chaitanyabsprip/fastaction.nvim/archive/886e22d85e13115808e81ca367d5aaba02d9a25b.tar.gz", "hash": "0zz9jc2nfyn43idwz63xcacgyaclsvddsjnk8vjgifga4m7v2r6l" }, - "fidget.nvim": { + "fidget-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -348,7 +348,7 @@ "url": "https://github.com/j-hui/fidget.nvim/archive/9238947645ce17d96f30842e61ba81147185b657.tar.gz", "hash": "1117w5i7996vxx32vibb09zpzzgwaipj5ldkdgck3ds5vkcdlk53" }, - "flutter-tools.nvim": { + "flutter-tools-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -384,7 +384,7 @@ "url": "https://github.com/ibhagwan/fzf-lua/archive/fbe21aeb147b3dc8b188b5753a8e288ecedcee5e.tar.gz", "hash": "1wiwq9h0m4rzcc5h2wqxa4gqiw9xrxlggvcasacy9bq89c6l11yh" }, - "gesture.nvim": { + "gesture-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -396,7 +396,7 @@ "url": "https://github.com/notomo/gesture.nvim/archive/dbd839bda337cb73911aeef06897eb29cb99f76f.tar.gz", "hash": "1cqiahc52xh113l8lgpz3k852vvqkv2srj9shdkyya76a2v2sf9d" }, - "gitsigns.nvim": { + "gitsigns-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -408,7 +408,7 @@ "url": "https://github.com/lewis6991/gitsigns.nvim/archive/5f808b5e4fef30bd8aca1b803b4e555da07fc412.tar.gz", "hash": "1dxsyv26mm7lzll3xlkzjj6w7kp11wfak8rgp19fg2d8301kxc0z" }, - "glow.nvim": { + "glow-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -420,7 +420,7 @@ "url": "https://github.com/ellisonleao/glow.nvim/archive/238070a686c1da3bccccf1079700eb4b5e19aea4.tar.gz", "hash": "1j63y3hb03n5m4jig8576sxnb3jixxlr66m9xcs8vgfm5h0mrhqs" }, - "gruvbox.nvim": { + "gruvbox-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -432,7 +432,7 @@ "url": "https://github.com/ellisonleao/gruvbox.nvim/archive/68c3460a5d1d1a362318960035c9f3466d5011f5.tar.gz", "hash": "0yc0hv9d4888lfvhd68gdwvfhfgafyqn9ljca4b5a0pgb61hiax9" }, - "haskell-tools.nvim": { + "haskell-tools-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -444,7 +444,7 @@ "url": "https://github.com/mrcjkb/haskell-tools.nvim/archive/943b77b68a79d3991523ba4d373063c9355c6f55.tar.gz", "hash": "0f8j9x20bs62pnsx4kwklbnrnxqakmfg9xd7742rqfyg03s4v5c1" }, - "highlight-undo.nvim": { + "highlight-undo-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -456,7 +456,7 @@ "url": "https://github.com/tzachar/highlight-undo.nvim/archive/5f588b420179a31d7073854bfd07ed9d5f364645.tar.gz", "hash": "1ykk9kj74kpnqq003fkhj75d9k68k8fgdv3kr0hbcvggxlr6nhkg" }, - "hop.nvim": { + "hop-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -468,7 +468,7 @@ "url": "https://github.com/phaazon/hop.nvim/archive/1a1eceafe54b5081eae4cb91c723abd1d450f34b.tar.gz", "hash": "08h18cam2yr57qvfsnf1bra28vbl6013wlchnr5crb757xw8aysa" }, - "icon-picker.nvim": { + "icon-picker-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -480,7 +480,7 @@ "url": "https://github.com/ziontee113/icon-picker.nvim/archive/3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3.tar.gz", "hash": "1357c2dhl7m7hbdsj0l2bmk97i76bp5yrfnd0g01sgd6wiasr4jm" }, - "image.nvim": { + "image-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -492,7 +492,7 @@ "url": "https://github.com/3rd/image.nvim/archive/b991fc7f845bc6ab40c6ec00b39750dcd5190010.tar.gz", "hash": "1jbbm4l71w0cas0aj5d0jsy65chbvf4bdxxllb04i3k6h1zycdja" }, - "indent-blankline.nvim": { + "indent-blankline-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -504,7 +504,19 @@ "url": "https://github.com/lukas-reineke/indent-blankline.nvim/archive/259357fa4097e232730341fa60988087d189193a.tar.gz", "hash": "1q9fgqvr84lynhy2vcyzp9xhzrl80g2pin14v7d3v0pgj10m8y8z" }, - "leap.nvim": { + "lazydev-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "folke", + "repo": "lazydev.nvim" + }, + "branch": "main", + "revision": "a1b78b2ac6f978c72e76ea90ae92a94edf380cfc", + "url": "https://github.com/folke/lazydev.nvim/archive/a1b78b2ac6f978c72e76ea90ae92a94edf380cfc.tar.gz", + "hash": "1ch75kwgyzpplvlp04h6aa4yymkjcwsfkwgzwicnqpsxylsw6z9r" + }, + "leap-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -516,7 +528,18 @@ "url": "https://github.com/ggandor/leap.nvim/archive/c6bfb191f1161fbabace1f36f578a20ac6c7642c.tar.gz", "hash": "1dmy45czi3irjd5qb74yamjam4d1lvqsgfxgh4vaj740b19gyl1w" }, - "lsp_signature.nvim": { + "lsp-lines": { + "type": "Git", + "repository": { + "type": "Git", + "url": "https://git.sr.ht/~whynothugo/lsp_lines.nvim" + }, + "branch": "main", + "revision": "a92c755f182b89ea91bd8a6a2227208026f27b4d", + "url": null, + "hash": "14ym4d8vgvw2vhsaxik8612wyvszd895q69n9h100yd7x5jqhy4c" + }, + "lsp-signature-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -540,7 +563,7 @@ "url": "https://github.com/onsails/lspkind-nvim/archive/d79a1c3299ad0ef94e255d045bed9fa26025dab6.tar.gz", "hash": "1wdavqmwadby9lyw415jw79kxynxv4fxg2v376y0rkxf258clarq" }, - "lspsaga.nvim": { + "lspsaga-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -552,7 +575,7 @@ "url": "https://github.com/tami5/lspsaga.nvim/archive/5faeec9f2508d2d49a66c0ac0d191096b4e3fa81.tar.gz", "hash": "1bw71db69na2sriv9q167z9bgkir4nwny1bdfv9z606bmng4hhzc" }, - "lua-utils.nvim": { + "lua-utils-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -564,7 +587,7 @@ "url": "https://github.com/nvim-neorg/lua-utils.nvim/archive/e565749421f4bbb5d2e85e37c3cef9d56553d8bd.tar.gz", "hash": "0bnl2kvxs55l8cjhfpa834bm010n8r4gmsmivjcp548c076msagn" }, - "lualine.nvim": { + "lualine-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -576,7 +599,19 @@ "url": "https://github.com/hoob3rt/lualine.nvim/archive/2a5bae925481f999263d6f5ed8361baef8df4f83.tar.gz", "hash": "0hp8gycbwm6ibq4rpa18j3g9xacgghklz4c8jlr4gif6g37r1pi0" }, - "lz.n": { + "luasnip": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "L3MON4D3", + "repo": "LuaSnip" + }, + "branch": "main", + "revision": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d", + "url": "https://github.com/L3MON4D3/LuaSnip/archive/33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d.tar.gz", + "hash": "1zicjd8y9a16rq1rs1xbmc6g927j5xi05yrxj9ap6wp72pfxxw3r" + }, + "lz-n": { "type": "Git", "repository": { "type": "GitHub", @@ -600,7 +635,7 @@ "url": "https://github.com/horriblename/lzn-auto-require/archive/a075ed51976323fd7fc44ccfca89fe0449a08cca.tar.gz", "hash": "1mgka1mmvpd2gfya898qdbbwrp5rpqds8manjs1s7g5x63xp6b98" }, - "mind.nvim": { + "mind-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -612,6 +647,198 @@ "url": "https://github.com/phaazon/mind.nvim/archive/002137dd7cf97865ebd01b6a260209d2daf2da66.tar.gz", "hash": "1p7gb8p1jrb2wx3x67lv7am3k1a14kvwsq89fdpb8b060s2l1214" }, + "mini-ai": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.ai" + }, + "branch": "main", + "revision": "ebb04799794a7f94628153991e6334c3304961b8", + "url": "https://github.com/echasnovski/mini.ai/archive/ebb04799794a7f94628153991e6334c3304961b8.tar.gz", + "hash": "1ipkxwizyhl3i3z6zff87k345mwkrsxmwwxbv5gcyq37bzmgpzkg" + }, + "mini-align": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.align" + }, + "branch": "main", + "revision": "e715137aece7d05734403d793b8b6b64486bc812", + "url": "https://github.com/echasnovski/mini.align/archive/e715137aece7d05734403d793b8b6b64486bc812.tar.gz", + "hash": "1m39wsinfdmqw53mllf9wr854vaw8qzhixy3j5w8r112s7qrnyx0" + }, + "mini-animate": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.animate" + }, + "branch": "main", + "revision": "d14190ac3040116540889e2ebc25f488b195799e", + "url": "https://github.com/echasnovski/mini.animate/archive/d14190ac3040116540889e2ebc25f488b195799e.tar.gz", + "hash": "15raqvmgp4srh7asll1y3finbm76l1sfmf52h69jj2y2w4kfdqv5" + }, + "mini-base16": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.base16" + }, + "branch": "main", + "revision": "23453dacc1606e5d42238d82f0b42a2985386b62", + "url": "https://github.com/echasnovski/mini.base16/archive/23453dacc1606e5d42238d82f0b42a2985386b62.tar.gz", + "hash": "0cxwc4bpkc362q00vkm75bbazd69ghyyavs30gf37fj3zj9khssl" + }, + "mini-basics": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.basics" + }, + "branch": "main", + "revision": "67c10b3436d5d3b892715137f4773e71c6753b13", + "url": "https://github.com/echasnovski/mini.basics/archive/67c10b3436d5d3b892715137f4773e71c6753b13.tar.gz", + "hash": "1ia7wha33l6q1krlx7d90v5rw25kdiv6la8j7f0s8vr0qxlcxhs7" + }, + "mini-bracketed": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.bracketed" + }, + "branch": "main", + "revision": "0091e11fabe34973fc038a8d0d0485202742e403", + "url": "https://github.com/echasnovski/mini.bracketed/archive/0091e11fabe34973fc038a8d0d0485202742e403.tar.gz", + "hash": "0yw7lmgwwvraflcwzrl33rwcdb94qsyvdi0rzq9b3ps7bla4dsyb" + }, + "mini-bufremove": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.bufremove" + }, + "branch": "main", + "revision": "285bdac9596ee7375db50c0f76ed04336dcd2685", + "url": "https://github.com/echasnovski/mini.bufremove/archive/285bdac9596ee7375db50c0f76ed04336dcd2685.tar.gz", + "hash": "0q8zm3k8hhpzbcjcd3gqz1r064fiymv9w2lfbdv5hhn2b8i9j7h8" + }, + "mini-clue": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.clue" + }, + "branch": "main", + "revision": "63e42dad781b9ed4845d90ef1da8c52dfb6dce3f", + "url": "https://github.com/echasnovski/mini.clue/archive/63e42dad781b9ed4845d90ef1da8c52dfb6dce3f.tar.gz", + "hash": "039fq0svkgr96l3z7h750iyah6fz9n18zy8wm1dfhpp3bxjyjh7z" + }, + "mini-colors": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.colors" + }, + "branch": "main", + "revision": "d64b1c0f520579d905f97208eca85329e664ab88", + "url": "https://github.com/echasnovski/mini.colors/archive/d64b1c0f520579d905f97208eca85329e664ab88.tar.gz", + "hash": "1yfx5zizm2m1c1064c5j5hb10xd7a8cgircs70q9cai14n25lqh7" + }, + "mini-comment": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.comment" + }, + "branch": "main", + "revision": "6e1f9a8ebbf6f693fa3787ceda8ca3bf3cb6aec7", + "url": "https://github.com/echasnovski/mini.comment/archive/6e1f9a8ebbf6f693fa3787ceda8ca3bf3cb6aec7.tar.gz", + "hash": "0wvyrkq84gy15ygv47vj50ch3551vmjp5gjvmvz26p3d4l6h225w" + }, + "mini-completion": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.completion" + }, + "branch": "main", + "revision": "6eb9546685c4e1c4af2365b87166d4afa39d8a1b", + "url": "https://github.com/echasnovski/mini.completion/archive/6eb9546685c4e1c4af2365b87166d4afa39d8a1b.tar.gz", + "hash": "05hk62f74fv8axdygbdz478dfcbvm4c4j696i77xlpqhfmy04m3n" + }, + "mini-diff": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.diff" + }, + "branch": "main", + "revision": "00f072250061ef498f91ed226918c9ec31a416a4", + "url": "https://github.com/echasnovski/mini.diff/archive/00f072250061ef498f91ed226918c9ec31a416a4.tar.gz", + "hash": "1n3rjajwnx5n5iamn49l4h7p23p601jd4m343ri2hmazb7zxc6vm" + }, + "mini-doc": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.doc" + }, + "branch": "main", + "revision": "bb73a3d1ff390f7e2740027ea2567017099a237c", + "url": "https://github.com/echasnovski/mini.doc/archive/bb73a3d1ff390f7e2740027ea2567017099a237c.tar.gz", + "hash": "1jsamvgdk6zxaimn9v949gbghf92d0ii8jhn2sjjy7arbl8w0w23" + }, + "mini-extra": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.extra" + }, + "branch": "main", + "revision": "477e3dda7b597b49bc1373951ea7da4da834c352", + "url": "https://github.com/echasnovski/mini.extra/archive/477e3dda7b597b49bc1373951ea7da4da834c352.tar.gz", + "hash": "02ydzdiiqf0ydrjiz847f6cbaxy3imvggchds9xn40i34nz6nhlm" + }, + "mini-files": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.files" + }, + "branch": "main", + "revision": "d0f03a5c38836fd2cce3dc80734124959002078c", + "url": "https://github.com/echasnovski/mini.files/archive/d0f03a5c38836fd2cce3dc80734124959002078c.tar.gz", + "hash": "0k5g5l9pb3br4vb5cm1b0hv081fdn967cw00mh687281dvrbnxah" + }, + "mini-fuzzy": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "echasnovski", + "repo": "mini.fuzzy" + }, + "branch": "main", + "revision": "faa5a6c0d29c28012c90bd011162963a58715428", + "url": "https://github.com/echasnovski/mini.fuzzy/archive/faa5a6c0d29c28012c90bd011162963a58715428.tar.gz", + "hash": "03v6rp0j63a7clpp6ficq6ixwr55lvyz3ygc99r1qw0gzh6y9w2y" + }, "mini-git": { "type": "Git", "repository": { @@ -624,199 +851,7 @@ "url": "https://github.com/echasnovski/mini-git/archive/fc13dde6cfe87cf25a4fd1ee177c0d157468436b.tar.gz", "hash": "1wl9f3yncpnpv1j8imja4fwsnizjcqkv9cmblidj014rkji8lyxd" }, - "mini.ai": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.ai" - }, - "branch": "main", - "revision": "ebb04799794a7f94628153991e6334c3304961b8", - "url": "https://github.com/echasnovski/mini.ai/archive/ebb04799794a7f94628153991e6334c3304961b8.tar.gz", - "hash": "1ipkxwizyhl3i3z6zff87k345mwkrsxmwwxbv5gcyq37bzmgpzkg" - }, - "mini.align": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.align" - }, - "branch": "main", - "revision": "e715137aece7d05734403d793b8b6b64486bc812", - "url": "https://github.com/echasnovski/mini.align/archive/e715137aece7d05734403d793b8b6b64486bc812.tar.gz", - "hash": "1m39wsinfdmqw53mllf9wr854vaw8qzhixy3j5w8r112s7qrnyx0" - }, - "mini.animate": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.animate" - }, - "branch": "main", - "revision": "d14190ac3040116540889e2ebc25f488b195799e", - "url": "https://github.com/echasnovski/mini.animate/archive/d14190ac3040116540889e2ebc25f488b195799e.tar.gz", - "hash": "15raqvmgp4srh7asll1y3finbm76l1sfmf52h69jj2y2w4kfdqv5" - }, - "mini.base16": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.base16" - }, - "branch": "main", - "revision": "23453dacc1606e5d42238d82f0b42a2985386b62", - "url": "https://github.com/echasnovski/mini.base16/archive/23453dacc1606e5d42238d82f0b42a2985386b62.tar.gz", - "hash": "0cxwc4bpkc362q00vkm75bbazd69ghyyavs30gf37fj3zj9khssl" - }, - "mini.basics": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.basics" - }, - "branch": "main", - "revision": "67c10b3436d5d3b892715137f4773e71c6753b13", - "url": "https://github.com/echasnovski/mini.basics/archive/67c10b3436d5d3b892715137f4773e71c6753b13.tar.gz", - "hash": "1ia7wha33l6q1krlx7d90v5rw25kdiv6la8j7f0s8vr0qxlcxhs7" - }, - "mini.bracketed": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.bracketed" - }, - "branch": "main", - "revision": "0091e11fabe34973fc038a8d0d0485202742e403", - "url": "https://github.com/echasnovski/mini.bracketed/archive/0091e11fabe34973fc038a8d0d0485202742e403.tar.gz", - "hash": "0yw7lmgwwvraflcwzrl33rwcdb94qsyvdi0rzq9b3ps7bla4dsyb" - }, - "mini.bufremove": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.bufremove" - }, - "branch": "main", - "revision": "285bdac9596ee7375db50c0f76ed04336dcd2685", - "url": "https://github.com/echasnovski/mini.bufremove/archive/285bdac9596ee7375db50c0f76ed04336dcd2685.tar.gz", - "hash": "0q8zm3k8hhpzbcjcd3gqz1r064fiymv9w2lfbdv5hhn2b8i9j7h8" - }, - "mini.clue": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.clue" - }, - "branch": "main", - "revision": "63e42dad781b9ed4845d90ef1da8c52dfb6dce3f", - "url": "https://github.com/echasnovski/mini.clue/archive/63e42dad781b9ed4845d90ef1da8c52dfb6dce3f.tar.gz", - "hash": "039fq0svkgr96l3z7h750iyah6fz9n18zy8wm1dfhpp3bxjyjh7z" - }, - "mini.colors": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.colors" - }, - "branch": "main", - "revision": "d64b1c0f520579d905f97208eca85329e664ab88", - "url": "https://github.com/echasnovski/mini.colors/archive/d64b1c0f520579d905f97208eca85329e664ab88.tar.gz", - "hash": "1yfx5zizm2m1c1064c5j5hb10xd7a8cgircs70q9cai14n25lqh7" - }, - "mini.comment": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.comment" - }, - "branch": "main", - "revision": "6e1f9a8ebbf6f693fa3787ceda8ca3bf3cb6aec7", - "url": "https://github.com/echasnovski/mini.comment/archive/6e1f9a8ebbf6f693fa3787ceda8ca3bf3cb6aec7.tar.gz", - "hash": "0wvyrkq84gy15ygv47vj50ch3551vmjp5gjvmvz26p3d4l6h225w" - }, - "mini.completion": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.completion" - }, - "branch": "main", - "revision": "6eb9546685c4e1c4af2365b87166d4afa39d8a1b", - "url": "https://github.com/echasnovski/mini.completion/archive/6eb9546685c4e1c4af2365b87166d4afa39d8a1b.tar.gz", - "hash": "05hk62f74fv8axdygbdz478dfcbvm4c4j696i77xlpqhfmy04m3n" - }, - "mini.diff": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.diff" - }, - "branch": "main", - "revision": "00f072250061ef498f91ed226918c9ec31a416a4", - "url": "https://github.com/echasnovski/mini.diff/archive/00f072250061ef498f91ed226918c9ec31a416a4.tar.gz", - "hash": "1n3rjajwnx5n5iamn49l4h7p23p601jd4m343ri2hmazb7zxc6vm" - }, - "mini.doc": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.doc" - }, - "branch": "main", - "revision": "bb73a3d1ff390f7e2740027ea2567017099a237c", - "url": "https://github.com/echasnovski/mini.doc/archive/bb73a3d1ff390f7e2740027ea2567017099a237c.tar.gz", - "hash": "1jsamvgdk6zxaimn9v949gbghf92d0ii8jhn2sjjy7arbl8w0w23" - }, - "mini.extra": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.extra" - }, - "branch": "main", - "revision": "477e3dda7b597b49bc1373951ea7da4da834c352", - "url": "https://github.com/echasnovski/mini.extra/archive/477e3dda7b597b49bc1373951ea7da4da834c352.tar.gz", - "hash": "02ydzdiiqf0ydrjiz847f6cbaxy3imvggchds9xn40i34nz6nhlm" - }, - "mini.files": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.files" - }, - "branch": "main", - "revision": "d0f03a5c38836fd2cce3dc80734124959002078c", - "url": "https://github.com/echasnovski/mini.files/archive/d0f03a5c38836fd2cce3dc80734124959002078c.tar.gz", - "hash": "0k5g5l9pb3br4vb5cm1b0hv081fdn967cw00mh687281dvrbnxah" - }, - "mini.fuzzy": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "echasnovski", - "repo": "mini.fuzzy" - }, - "branch": "main", - "revision": "faa5a6c0d29c28012c90bd011162963a58715428", - "url": "https://github.com/echasnovski/mini.fuzzy/archive/faa5a6c0d29c28012c90bd011162963a58715428.tar.gz", - "hash": "03v6rp0j63a7clpp6ficq6ixwr55lvyz3ygc99r1qw0gzh6y9w2y" - }, - "mini.hipatterns": { + "mini-hipatterns": { "type": "Git", "repository": { "type": "GitHub", @@ -828,7 +863,7 @@ "url": "https://github.com/echasnovski/mini.hipatterns/archive/f34975103a38b3f608219a1324cdfc58ea660b8b.tar.gz", "hash": "08mhgd7p69fzy9l99adns1gwb407wdq18di8nm6iy1nw6wrhx7yc" }, - "mini.hues": { + "mini-hues": { "type": "Git", "repository": { "type": "GitHub", @@ -840,7 +875,7 @@ "url": "https://github.com/echasnovski/mini.hues/archive/ae6ad4c666ff42c1102344fe1eba18bb486f2e46.tar.gz", "hash": "1bfyhs79l8v2zbzc2kp7ss089bp05lpqqy1ndbgvyi546dxgsbp3" }, - "mini.icons": { + "mini-icons": { "type": "Git", "repository": { "type": "GitHub", @@ -852,7 +887,7 @@ "url": "https://github.com/echasnovski/mini.icons/archive/910db5df9724d65371182948f921fce23c2c881e.tar.gz", "hash": "18d2s7sqcwi7yyb14xg96gzxpvr0gk6k1r4mglgjbfpx724z2hy3" }, - "mini.indentscope": { + "mini-indentscope": { "type": "Git", "repository": { "type": "GitHub", @@ -864,7 +899,7 @@ "url": "https://github.com/echasnovski/mini.indentscope/archive/613df2830d7faeae7483ba2e736683154b95921e.tar.gz", "hash": "02y7ya70wz79xd02xvlvri4sgnqbl9xd6d6im4323iyph7pdrg1j" }, - "mini.jump": { + "mini-jump": { "type": "Git", "repository": { "type": "GitHub", @@ -876,7 +911,7 @@ "url": "https://github.com/echasnovski/mini.jump/archive/bb93d998c9db6936697746330411f5fb9957145e.tar.gz", "hash": "0m5b0dy7aws5si5sc494hrrnfsgb9i0ssbrfwlprmi9q75xzvhx8" }, - "mini.jump2d": { + "mini-jump2d": { "type": "Git", "repository": { "type": "GitHub", @@ -888,7 +923,7 @@ "url": "https://github.com/echasnovski/mini.jump2d/archive/88077058297e80f1c76a18ed801ae9d7064187c6.tar.gz", "hash": "0dqslwc7r9yj3bszdgjp2cqhnhyzm8zn1zbikwi8q6bs50la2f7q" }, - "mini.map": { + "mini-map": { "type": "Git", "repository": { "type": "GitHub", @@ -900,7 +935,7 @@ "url": "https://github.com/echasnovski/mini.map/archive/4c58e755d75f9999abcd3b3c6e934734b6a8b098.tar.gz", "hash": "1407jgrzk0pvnhsssm3hdgjw3vd1n182adgh8c5h4b46dzvrvgvl" }, - "mini.misc": { + "mini-misc": { "type": "Git", "repository": { "type": "GitHub", @@ -912,7 +947,7 @@ "url": "https://github.com/echasnovski/mini.misc/archive/645fb9367c19bb485902e54e5451425981498601.tar.gz", "hash": "0xy9sn0vjlaw0lk6l59drksqypz6yncmdrhach387mv4hvh1lxma" }, - "mini.move": { + "mini-move": { "type": "Git", "repository": { "type": "GitHub", @@ -924,7 +959,7 @@ "url": "https://github.com/echasnovski/mini.move/archive/4caa1c212f5ca3d1633d21cfb184808090ed74b1.tar.gz", "hash": "0f4nrg9n8air507h6bd61dmb1rjjhykyl36qgr0ai72cb011wzcx" }, - "mini.notify": { + "mini-notify": { "type": "Git", "repository": { "type": "GitHub", @@ -936,7 +971,7 @@ "url": "https://github.com/echasnovski/mini.notify/archive/05e598d5b349bd66404d576e6a4d4340aea5f194.tar.gz", "hash": "02z2qdkh6rks7j7b3pwnm6vala0rz5p09ahplcgv1s4mhgby6vmb" }, - "mini.operators": { + "mini-operators": { "type": "Git", "repository": { "type": "GitHub", @@ -948,7 +983,7 @@ "url": "https://github.com/echasnovski/mini.operators/archive/7cb4dc66c51a3d736d347bbc517dc73dc7d28888.tar.gz", "hash": "1h6bxqkabh61gnlqj9yp5rsvn1p4g2ssk7ffkj3z8c3f1387567r" }, - "mini.pairs": { + "mini-pairs": { "type": "Git", "repository": { "type": "GitHub", @@ -960,7 +995,7 @@ "url": "https://github.com/echasnovski/mini.pairs/archive/7e834c5937d95364cc1740e20d673afe2d034cdb.tar.gz", "hash": "04x3gwrg64xxbg0njrb64bjb66rpi2aayydfqx9nbcimllng3l9y" }, - "mini.pick": { + "mini-pick": { "type": "Git", "repository": { "type": "GitHub", @@ -972,7 +1007,7 @@ "url": "https://github.com/echasnovski/mini.pick/archive/09ade94d2c9c5133db9ae00f3693d82eae78e9be.tar.gz", "hash": "00vq7zn0nmbnw19gk8gmm6a60zkxga4s8z6c0ildnq6ldk8q70a3" }, - "mini.sessions": { + "mini-sessions": { "type": "Git", "repository": { "type": "GitHub", @@ -984,7 +1019,7 @@ "url": "https://github.com/echasnovski/mini.sessions/archive/71c9ae596664ac110560d27eb928fc24e22bc53d.tar.gz", "hash": "0yd4li7z6py3c3b6ka9xv070lmrbzf38svq5wl4mhn4fdhqgqadz" }, - "mini.snippets": { + "mini-snippets": { "type": "Git", "repository": { "type": "GitHub", @@ -996,7 +1031,7 @@ "url": "https://github.com/echasnovski/mini.snippets/archive/72920f62e3dd1330720e94e8f5d42592f3a1ecf8.tar.gz", "hash": "0lyyv95zzwa6kn3gz7sah6v7jqj635c45n88my2sx8wknadkv30y" }, - "mini.splitjoin": { + "mini-splitjoin": { "type": "Git", "repository": { "type": "GitHub", @@ -1008,7 +1043,7 @@ "url": "https://github.com/echasnovski/mini.splitjoin/archive/3e92f6764e770ba392325cad3a4497adcada695f.tar.gz", "hash": "126z8rsyg3849ijix1siwq77f9slwr93l61rwg499flzja3incic" }, - "mini.starter": { + "mini-starter": { "type": "Git", "repository": { "type": "GitHub", @@ -1020,7 +1055,7 @@ "url": "https://github.com/echasnovski/mini.starter/archive/4b257cfc93241e8c8cde3f9302d1616ad4e0d036.tar.gz", "hash": "135l18l6n88v8zrdk95dfvw2ycsgd8m4wp9430g74bry99jj95m4" }, - "mini.statusline": { + "mini-statusline": { "type": "Git", "repository": { "type": "GitHub", @@ -1032,7 +1067,7 @@ "url": "https://github.com/echasnovski/mini.statusline/archive/1b0edf76fe2af015f8c989385ff949f1db7aade2.tar.gz", "hash": "1aiy37p08c95g3dh5f0hvabnnv56dhs4zmpah5lx33j3fbvqs381" }, - "mini.surround": { + "mini-surround": { "type": "Git", "repository": { "type": "GitHub", @@ -1044,7 +1079,7 @@ "url": "https://github.com/echasnovski/mini.surround/archive/aa5e245829dd12d8ff0c96ef11da28681d6049aa.tar.gz", "hash": "1zslkqg96yfa1lgcwavvcz60waix4y1j1r0v98sxhf8adna8jid2" }, - "mini.tabline": { + "mini-tabline": { "type": "Git", "repository": { "type": "GitHub", @@ -1056,7 +1091,7 @@ "url": "https://github.com/echasnovski/mini.tabline/archive/06ef4ecaeca2e362c7d31113435d86d144b3cbbe.tar.gz", "hash": "1z808l3z7ywqxmqwfr1ab9ynyma5c1878x9ski0nrhvw4fli9rwy" }, - "mini.test": { + "mini-test": { "type": "Git", "repository": { "type": "GitHub", @@ -1068,7 +1103,7 @@ "url": "https://github.com/echasnovski/mini.test/archive/86a64d5a4bf9d73ebf5875edaae0d878f64f5e48.tar.gz", "hash": "02zslska1g4ixy51slbvlxbjzcys0spc4wh200q8mwv4ipiignrn" }, - "mini.trailspace": { + "mini-trailspace": { "type": "Git", "repository": { "type": "GitHub", @@ -1080,7 +1115,7 @@ "url": "https://github.com/echasnovski/mini.trailspace/archive/3a328e62559c33014e422fb9ae97afc4208208b1.tar.gz", "hash": "1314bmb8zk3gdpg1wpr1935d0xd0f0cf2f0ipxclbwi07wbjz9i4" }, - "mini.visits": { + "mini-visits": { "type": "Git", "repository": { "type": "GitHub", @@ -1092,7 +1127,7 @@ "url": "https://github.com/echasnovski/mini.visits/archive/90f20ba6ab7d3d7cb984fffddd82f5f6c7a6bea7.tar.gz", "hash": "00drzhrxdyrysbdj4fnxk3lzn9alg8xhwfwgrscywvjfks0vbsa3" }, - "minimap.vim": { + "minimap-vim": { "type": "Git", "repository": { "type": "GitHub", @@ -1104,7 +1139,7 @@ "url": "https://github.com/wfxr/minimap.vim/archive/395378137e6180762d5b963ca9ad5ac2db5d3283.tar.gz", "hash": "0pfzmlf36in086g83g3sdqdy57jyyh5nbh2lrfmpbr2sg401a7qr" }, - "modes.nvim": { + "modes-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1116,7 +1151,7 @@ "url": "https://github.com/mvllow/modes.nvim/archive/c7a4b1b383606832aab150902719bd5eb5cdb2b0.tar.gz", "hash": "1hy3ghscf8hfmg487p9b8cwd0y8nsi8j24kq2ir3vhd82gqhl4ja" }, - "neo-tree.nvim": { + "neo-tree-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1140,18 +1175,6 @@ "url": "https://github.com/IogaMaster/neocord/archive/4d55d8dab2d5f2f272192add7a2c21982039c699.tar.gz", "hash": "18d84bd5242a3khpsk0iya3i75bc65mc2xc9kjldpvb827m6myl3" }, - "neodev.nvim": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "folke", - "repo": "neodev.nvim" - }, - "branch": "main", - "revision": "46aa467dca16cf3dfe27098042402066d2ae242d", - "url": "https://github.com/folke/neodev.nvim/archive/46aa467dca16cf3dfe27098042402066d2ae242d.tar.gz", - "hash": "0hyn02f8cpbnnhq4570nicfjdw88kkww3il8nmy6ban8iybg7s44" - }, "neorg": { "type": "Git", "repository": { @@ -1176,18 +1199,6 @@ "url": "https://github.com/nvim-neorg/neorg-telescope/archive/ddb2556644cae922699a239bbb0fe16e25b084b7.tar.gz", "hash": "0p2s3n22fy1vkqc9n55x6kssqs4n0znwlszfrs532hj8m992wbks" }, - "neovim": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "rose-pine", - "repo": "neovim" - }, - "branch": "main", - "revision": "91548dca53b36dbb9d36c10f114385f759731be1", - "url": "https://github.com/rose-pine/neovim/archive/91548dca53b36dbb9d36c10f114385f759731be1.tar.gz", - "hash": "00zhx2j5lm27pcfaimzbkil61gfc6cxyy1dcgc4cyb8vfi8psf3s" - }, "neovim-session-manager": { "type": "Git", "repository": { @@ -1200,7 +1211,7 @@ "url": "https://github.com/Shatur/neovim-session-manager/archive/ce43f2eb2a52492157d7742e5f684b9a42bb3e5c.tar.gz", "hash": "0g2vfv9jjmsgagvhdffs3z37w5xa1nlwanq74w8c62y7amyyvn2v" }, - "new-file-template.nvim": { + "new-file-template-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1212,13 +1223,7 @@ "url": "https://github.com/otavioschwanck/new-file-template.nvim/archive/6ac66669dbf2dc5cdee184a4fe76d22465ca67e8.tar.gz", "hash": "0c7378c3w6bniclp666rq15c28akb0sjy58ayva0wpyin4k26hl3" }, - "nixpkgs": { - "type": "Channel", - "name": "nixpkgs-unstable", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.05pre747727.f7384aacd0ec/nixexprs.tar.xz", - "hash": "12g53dydivr7wibcc7nz4kghg2mcw4jy4vp30qfwsx15pwsihizw" - }, - "noice.nvim": { + "noice-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1230,7 +1235,7 @@ "url": "https://github.com/folke/noice.nvim/archive/eaed6cc9c06aa2013b5255349e4f26a6b17ab70f.tar.gz", "hash": "0imw4ls3vqh8bg358y8ckxcbylhczr297zxhcfx6r7mf64sj171s" }, - "none-ls.nvim": { + "none-ls-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1242,7 +1247,7 @@ "url": "https://github.com/nvimtools/none-ls.nvim/archive/bb680d752cec37949faca7a1f509e2fe67ab418a.tar.gz", "hash": "11zgc86cjkv1vi183mplx3bsqa2x7ardk7ybyrp702xx5hmd882l" }, - "nord.nvim": { + "nord-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1254,7 +1259,7 @@ "url": "https://github.com/gbprod/nord.nvim/archive/b0f3ed242fd8e5bafa7231367821d46c6c835dd8.tar.gz", "hash": "0yr5b30dxrdrbv8210fmh35wgz3z26274aj5irzal33liznx4436" }, - "nui.nvim": { + "nui-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1266,18 +1271,6 @@ "url": "https://github.com/MunifTanjim/nui.nvim/archive/53e907ffe5eedebdca1cd503b00aa8692068ca46.tar.gz", "hash": "1m4vlf9qcs01a8qrq3salcz966sp8cpf01gbrg8dbf255vzc8kp9" }, - "nvim": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "catppuccin", - "repo": "nvim" - }, - "branch": "main", - "revision": "f67b886d65a029f12ffa298701fb8f1efd89295d", - "url": "https://github.com/catppuccin/nvim/archive/f67b886d65a029f12ffa298701fb8f1efd89295d.tar.gz", - "hash": "0fwgsvlxvzz5r8jfmj1fp97cqv9b9h2f37fn4nhmim5lm6d0n14p" - }, "nvim-autopairs": { "type": "Git", "repository": { @@ -1290,7 +1283,7 @@ "url": "https://github.com/windwp/nvim-autopairs/archive/b464658e9b880f463b9f7e6ccddd93fb0013f559.tar.gz", "hash": "0p4v49saqfsc8kinl3wc3zhmr6m2q86vmay2f10payp29n4v3did" }, - "nvim-bufferline.lua": { + "nvim-bufferline-lua": { "type": "Git", "repository": { "type": "GitHub", @@ -1314,17 +1307,17 @@ "url": "https://github.com/hrsh7th/nvim-cmp/archive/b555203ce4bd7ff6192e759af3362f9d217e8c89.tar.gz", "hash": "1s3wiwhnqp046skxp60sdrvzhrij4javhm9ndvfsw2fv9bc35x37" }, - "nvim-colorizer.lua": { + "nvim-colorizer-lua": { "type": "Git", "repository": { "type": "GitHub", - "owner": "catgoose", + "owner": "NvChad", "repo": "nvim-colorizer.lua" }, "branch": "main", - "revision": "9b5fe0450bfb2521c6cea29391e5ec571f129136", - "url": "https://github.com/catgoose/nvim-colorizer.lua/archive/9b5fe0450bfb2521c6cea29391e5ec571f129136.tar.gz", - "hash": "0q5qksxzh5jigdb71w7sk0lv4nwylkidg5c7cx578d8yhnf1jj10" + "revision": "8a65c448122fc8fac9c67b2e857b6e830a4afd0b", + "url": "https://github.com/NvChad/nvim-colorizer.lua/archive/8a65c448122fc8fac9c67b2e857b6e830a4afd0b.tar.gz", + "hash": "011i0jrx74siilym2lclbv2wcz04g7v7776qw8zhggdsmvgsrsma" }, "nvim-cursorline": { "type": "Git", @@ -1398,18 +1391,6 @@ "url": "https://github.com/kosayoda/nvim-lightbulb/archive/3ac0791be37ba9cc7939f1ad90ebc5e75abf4eea.tar.gz", "hash": "0qc1rl45ykh9552dx5fmhdg0ncfsk2vpcmj5i7hrmdzgkd2f0avg" }, - "nvim-lint": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "mfussenegger", - "repo": "nvim-lint" - }, - "branch": "main", - "revision": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87", - "url": "https://github.com/mfussenegger/nvim-lint/archive/789b7ada1b4f00e08d026dffde410dcfa6a0ba87.tar.gz", - "hash": "1npjlv0gml66mw9v8d95p3c5zzijpc362bkji6zvc5n152yy59qc" - }, "nvim-lspconfig": { "type": "Git", "repository": { @@ -1458,7 +1439,7 @@ "url": "https://github.com/SmiteshP/nvim-navic/archive/8649f694d3e76ee10c19255dece6411c29206a54.tar.gz", "hash": "0964wgwh6i4nm637vx36bshkpd5i63ipwzqmrdbkz5h9bzyng7nj" }, - "nvim-neoclip.lua": { + "nvim-neoclip-lua": { "type": "Git", "repository": { "type": "GitHub", @@ -1518,7 +1499,7 @@ "url": "https://github.com/kylechui/nvim-surround/archive/9f0cb495f25bff32c936062d85046fbda0c43517.tar.gz", "hash": "1c78320liqhza52gq2xylykd9m6rl50cn44flldg43a4l7rrabxh" }, - "nvim-tree.lua": { + "nvim-tree-lua": { "type": "Git", "repository": { "type": "GitHub", @@ -1578,7 +1559,7 @@ "url": "https://github.com/nvim-tree/nvim-web-devicons/archive/4adeeaa7a32d46cf3b5833341358c797304f950a.tar.gz", "hash": "1bnw6k9nki7igc7j4y02mbmihfb5yj7xykgiyi31kc5nbzldinl7" }, - "obsidian.nvim": { + "obsidian-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1590,7 +1571,7 @@ "url": "https://github.com/epwalsh/obsidian.nvim/archive/14e0427bef6c55da0d63f9a313fd9941be3a2479.tar.gz", "hash": "15ycmhn48ryaqzch6w3w6llq2qgmjx8xwkb9dn0075z60dybpflr" }, - "omnisharp-extended-lsp.nvim": { + "omnisharp-extended-lsp-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1602,7 +1583,7 @@ "url": "https://github.com/Hoffs/omnisharp-extended-lsp.nvim/archive/4916fa12e5b28d21a1f031f0bdd10aa15a75d85d.tar.gz", "hash": "0w2zbiz2sxblnmhnqp6f6n7d9g9cm40ksk66anl3s7qnqffvc3cl" }, - "onedark.nvim": { + "onedark-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1626,7 +1607,7 @@ "url": "https://github.com/nvim-orgmode/orgmode/archive/bf657742f7cb56211f99946ff64f5f87d7d7f0d0.tar.gz", "hash": "074493jfhgihp5zyyl86f9hfa2j6qdgw35q87vvdbmmj6rwhjmhk" }, - "otter.nvim": { + "otter-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1638,7 +1619,7 @@ "url": "https://github.com/jmbuhr/otter.nvim/archive/e8c662e1aefa8b483cfba6e00729a39a363dcecc.tar.gz", "hash": "0csl3ddm8782fw836adj4fp4h3fg2ygv7ik632llk55mp1q4dw1l" }, - "oxocarbon.nvim": { + "oxocarbon-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1650,7 +1631,7 @@ "url": "https://github.com/nyoom-engineering/oxocarbon.nvim/archive/004777819ba294423b638a35a75c9f0c7be758ed.tar.gz", "hash": "1qllk870nqc9nhkdgmqm8km2rar6dsmyhfhpcfx8crrg640yfbqy" }, - "pathlib.nvim": { + "pathlib-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1662,7 +1643,7 @@ "url": "https://github.com/pysan3/pathlib.nvim/archive/57e5598af6fe253761c1b48e0b59b7cd6699e2c1.tar.gz", "hash": "1z3nwy83r3zbll9wc2wyvg60z0dqc5hm2xdfvqh3hwm5s9w8j432" }, - "plenary.nvim": { + "plenary-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1674,7 +1655,7 @@ "url": "https://github.com/nvim-lua/plenary.nvim/archive/2d9b06177a975543726ce5c73fca176cedbffe9d.tar.gz", "hash": "1blmh0qr010jhydw61kiynll2m7q4xyrvrva8b5ipf1g81x8ysbf" }, - "precognition.nvim": { + "precognition-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1686,7 +1667,7 @@ "url": "https://github.com/tris203/precognition.nvim/archive/531971e6d883e99b1572bf47294e22988d8fbec0.tar.gz", "hash": "1mm3gzv882kd0kmqj0zfk6hlw5fxbk7jz16g1h7g8xs2mjh4lxwv" }, - "project.nvim": { + "project-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1710,7 +1691,7 @@ "url": "https://github.com/kevinhwang91/promise-async/archive/119e8961014c9bfaf1487bf3c2a393d254f337e2.tar.gz", "hash": "0q4a0rmy09hka6zvydzjj2gcm2j5mlbrhbxfcdjj33ngpblkmqzm" }, - "rainbow-delimiters.nvim": { + "rainbow-delimiters-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1722,7 +1703,7 @@ "url": "https://github.com/HiPhish/rainbow-delimiters.nvim/archive/85b80abaa09cbbc039e3095b2f515b3cf8cadd11.tar.gz", "hash": "0k1hqjyr9xxbg2087qssglv6dgnq81w671d3rqn7lxnprmidfqfd" }, - "registers.nvim": { + "registers-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1734,7 +1715,7 @@ "url": "https://github.com/tversteeg/registers.nvim/archive/c217f8f369e0886776cda6c94eab839b30a8940d.tar.gz", "hash": "1pdfm98grlka537i1c94vi8bpbp66slkyz3by040wlfq4pgr3frk" }, - "render-markdown.nvim": { + "render-markdown-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1746,7 +1727,19 @@ "url": "https://github.com/MeanderingProgrammer/render-markdown.nvim/archive/6fbd1491abc104409f119685de5353c35c97c005.tar.gz", "hash": "081r1a7rhmmla80i6bg1lmld9lkjhzgkh2rvlpvka889zl36mhcx" }, - "rtp.nvim": { + "rose-pine": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "rose-pine", + "repo": "neovim" + }, + "branch": "main", + "revision": "91548dca53b36dbb9d36c10f114385f759731be1", + "url": "https://github.com/rose-pine/neovim/archive/91548dca53b36dbb9d36c10f114385f759731be1.tar.gz", + "hash": "00zhx2j5lm27pcfaimzbkil61gfc6cxyy1dcgc4cyb8vfi8psf3s" + }, + "rtp-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1758,7 +1751,7 @@ "url": "https://github.com/nvim-neorocks/rtp.nvim/archive/494ddfc888bb466555d90ace731856de1320fe45.tar.gz", "hash": "1b6hx50nr2s2mnhsx9zy54pjdq7f78mi394v2b2c9v687s45nqln" }, - "run.nvim": { + "run-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1778,11 +1771,11 @@ "repo": "rustaceanvim" }, "branch": "main", - "revision": "4a2f2d2cc04f5b0aa0981f98bb7d002c898318ad", - "url": "https://github.com/mrcjkb/rustaceanvim/archive/4a2f2d2cc04f5b0aa0981f98bb7d002c898318ad.tar.gz", - "hash": "0dm8ayl95ppscywdyddrpdpizbs98s0fklw8cqv48iqcxqy851k7" + "revision": "51c097ebfb65d83baa71f48000b1e5c0a8dcc4fb", + "url": "https://github.com/mrcjkb/rustaceanvim/archive/51c097ebfb65d83baa71f48000b1e5c0a8dcc4fb.tar.gz", + "hash": "0c1gixywf7781h4af9bic07spgmxyx9ddxcrgy5b9da7phcmgimr" }, - "smartcolumn.nvim": { + "smartcolumn-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1794,7 +1787,7 @@ "url": "https://github.com/m4xshen/smartcolumn.nvim/archive/f14fbea6f86cd29df5042897ca9e3ba10ba4d27f.tar.gz", "hash": "1d0p906dr4wzc73zsm1pyc3fl9a6ns8i6hkl0ynvx72hj01is6p9" }, - "sqls.nvim": { + "sqls-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1818,7 +1811,7 @@ "url": "https://github.com/godlygeek/tabular/archive/12437cd1b53488e24936ec4b091c9324cafee311.tar.gz", "hash": "1cnh21yhcn2f4fajdr2b6hrclnhf1sz4abra4nw7b5yk1mvfjq5a" }, - "telescope.nvim": { + "telescope": { "type": "Git", "repository": { "type": "GitHub", @@ -1830,7 +1823,7 @@ "url": "https://github.com/nvim-telescope/telescope.nvim/archive/2eca9ba22002184ac05eddbe47a7fe2d5a384dfc.tar.gz", "hash": "0bkpys6dj01x6ycylmf6vrd2mqjibmny9a2hxxrqn0jqqvagm5ly" }, - "tiny-devicons-auto-colors.nvim": { + "tiny-devicons-auto-colors-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1842,7 +1835,7 @@ "url": "https://github.com/rachartier/tiny-devicons-auto-colors.nvim/archive/c8f63933ee013c1e0a26091d58131e060546f01f.tar.gz", "hash": "04mf9vkf7q3bxz79v1qp0r40sdql065vn4mfnavh71sqywm1jmcj" }, - "todo-comments.nvim": { + "todo-comments-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1854,7 +1847,7 @@ "url": "https://github.com/folke/todo-comments.nvim/archive/ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0.tar.gz", "hash": "0v6vn3f9svj756ds8cp0skpw65xixlx1f3aj0fh374wdpb5i4zhh" }, - "toggleterm.nvim": { + "toggleterm-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1866,7 +1859,7 @@ "url": "https://github.com/akinsho/toggleterm.nvim/archive/344fc1810292785b3d962ddac2de57669e1a7ff9.tar.gz", "hash": "0awj2kj3lam2j48bgld5wyb4m1v09gpxmzww35rgysq7wipliqx1" }, - "tokyonight.nvim": { + "tokyonight-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1878,7 +1871,7 @@ "url": "https://github.com/folke/tokyonight.nvim/archive/45d22cf0e1b93476d3b6d362d720412b3d34465c.tar.gz", "hash": "1038ff6i8csxx3cqccgbpv06slvbcs534cfkq7s58ww2vvldm7sc" }, - "trouble.nvim": { + "trouble": { "type": "Git", "repository": { "type": "GitHub", @@ -1890,7 +1883,7 @@ "url": "https://github.com/folke/trouble.nvim/archive/46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6.tar.gz", "hash": "12ky8alz6zi2vlqspnacmkj99d4sam4hrzs92i3n4sz6jx2w8696" }, - "ts-error-translator.nvim": { + "ts-error-translator-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1902,7 +1895,7 @@ "url": "https://github.com/dmmulroy/ts-error-translator.nvim/archive/47e5ba89f71b9e6c72eaaaaa519dd59bd6897df4.tar.gz", "hash": "08whn7l75qv5n74cifmnxc0s7n7ja1g7589pjnbbsk2djn6bqbky" }, - "typst-preview.nvim": { + "typst-preview-nvim": { "type": "Git", "repository": { "type": "GitHub", @@ -1986,7 +1979,7 @@ "url": "https://github.com/mhinz/vim-startify/archive/4e089dffdad46f3f5593f34362d530e8fe823dcf.tar.gz", "hash": "1ycqfqnmalqzrx1yy9a1fc2p0w922x4sqv2222bi9xjzmh77z4sv" }, - "which-key.nvim": { + "which-key-nvim": { "type": "Git", "repository": { "type": "GitHub", diff --git a/npins/sources.nix b/npins/sources.nix new file mode 100644 index 00000000..daa176a0 --- /dev/null +++ b/npins/sources.nix @@ -0,0 +1,85 @@ +# Based off of: +# https://github.com/NixOS/nixpkgs/blob/776c3bee4769c616479393aeefceefeda16b6fcb/pkgs/tools/nix/npins/source.nix +{ + lib, + fetchurl, + fetchgit, + fetchzip, +}: +builtins.mapAttrs +( + _: let + getZip = { + url, + hash, + ... + }: + fetchzip { + inherit url; + sha256 = hash; + extension = "tar"; + }; + mkGitSource = { + repository, + revision, + url ? null, + hash, + ... + } @ attrs: + assert repository ? type; + if url != null + then getZip attrs + else + assert repository.type == "Git"; let + urlToName = url: rev: let + matched = builtins.match "^.*/([^/]*)(\\.git)?$" repository.url; + short = builtins.substring 0 7 rev; + appendShort = + if (builtins.match "[a-f0-9]*" rev) != null + then "-${short}" + else ""; + in "${ + if matched == null + then "source" + else builtins.head matched + }${appendShort}"; + name = urlToName repository.url revision; + in + fetchgit { + inherit name; + inherit (repository) url; + rev = revision; + sha256 = hash; + }; + + mkPyPiSource = { + url, + hash, + ... + }: + fetchurl { + inherit url; + sha256 = hash; + }; + in + spec: + assert spec ? type; let + func = + { + Git = mkGitSource; + GitRelease = mkGitSource; + PyPi = mkPyPiSource; + Channel = getZip; + } + .${spec.type} + or (builtins.throw "Unknown source type ${spec.type}"); + in + spec // {outPath = func spec;} +) +( + let + json = lib.importJSON ./sources.json; + in + assert lib.assertMsg (json.version == 3) "Npins version mismatch!"; + json.pins +) From fc4d06047aebf958ed1bff0d49839715e4092e12 Mon Sep 17 00:00:00 2001 From: alfarel Date: Tue, 11 Feb 2025 09:58:52 -0500 Subject: [PATCH 51/76] rainbow-delimiters: fix startPlugins name --- modules/plugins/visuals/rainbow-delimiters/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/visuals/rainbow-delimiters/config.nix b/modules/plugins/visuals/rainbow-delimiters/config.nix index 361a0426..79996aea 100644 --- a/modules/plugins/visuals/rainbow-delimiters/config.nix +++ b/modules/plugins/visuals/rainbow-delimiters/config.nix @@ -9,7 +9,7 @@ cfg = config.vim.visuals.rainbow-delimiters; in { vim = mkIf cfg.enable { - startPlugins = ["rainbow-delimiters"]; + startPlugins = ["rainbow-delimiters-nvim"]; pluginRC.rainbow-delimiters = entryAnywhere '' vim.g.rainbow_delimiters = ${toLuaObject cfg.setupOpts} From 23813585447d34a5b3db44632d4d82acb04e42ef Mon Sep 17 00:00:00 2001 From: Alfarel Date: Tue, 11 Feb 2025 17:21:16 +0000 Subject: [PATCH 52/76] docs: add missing npins subcommand (#623) --- docs/manual/hacking/additional-plugins.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/manual/hacking/additional-plugins.md b/docs/manual/hacking/additional-plugins.md index 08cae680..0ed252c7 100644 --- a/docs/manual/hacking/additional-plugins.md +++ b/docs/manual/hacking/additional-plugins.md @@ -8,13 +8,13 @@ Use: Then run: -`npins --name github -b ` +`npins add --name github -b ` Be sure to replace any non-alphanumeric characters with `-` for `--name` For example -`npins --name lazydev-nvim github folke laztdev.nvim -b main` +`npins add --name lazydev-nvim github folke lazydev.nvim -b main` You can now reference this plugin as a **string**. From 9cb2da4c9da1e8314096a85e4cb345b2ce3edf07 Mon Sep 17 00:00:00 2001 From: Filip Hoffmann Date: Tue, 11 Feb 2025 18:46:49 +0100 Subject: [PATCH 53/76] lsp/lspkind: fix plugin name (#626) * lsp/lspkind: fix plugin name * docs: update changelog --------- Co-authored-by: raf --- docs/release-notes/rl-0.8.md | 3 +++ modules/plugins/lsp/lspkind/config.nix | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 9ffd68fd..a265c7cf 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -150,6 +150,9 @@ - Add support for [nixd](https://github.com/nix-community/nixd) language server. +[folospior](https://github.com/folospior) + +- Fix plugin name for lsp/lspkind. [iynaix](https://github.com/iynaix) - Add lsp options support for [nixd](https://github.com/nix-community/nixd) diff --git a/modules/plugins/lsp/lspkind/config.nix b/modules/plugins/lsp/lspkind/config.nix index abe14524..982caff2 100644 --- a/modules/plugins/lsp/lspkind/config.nix +++ b/modules/plugins/lsp/lspkind/config.nix @@ -25,7 +25,7 @@ in { ]; vim = { - startPlugins = ["lspkind"]; + startPlugins = ["lspkind-nvim"]; lsp.lspkind.setupOpts.before = config.vim.autocomplete.nvim-cmp.format; autocomplete = { From 275e12a69f345527395df6e360fb3b55251fc42c Mon Sep 17 00:00:00 2001 From: Alex Colby Date: Tue, 11 Feb 2025 18:38:02 +0000 Subject: [PATCH 54/76] flake: update npins pins for themes (#627) * fix: corrects theme names in `npins/sources.json` See: - [themes broken](https://github.com/NotAShelf/nvf/issues/619) - [lspkind broken](https://github.com/NotAShelf/nvf/issues/624) * release-notes: adds fix to plugin theme names --- docs/release-notes/rl-0.8.md | 5 +++++ npins/sources.json | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index a265c7cf..5ff8c5f2 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -153,7 +153,12 @@ [folospior](https://github.com/folospior) - Fix plugin name for lsp/lspkind. + [iynaix](https://github.com/iynaix) - Add lsp options support for [nixd](https://github.com/nix-community/nixd) language server. + +[Mr-Helpful](https://github.com/Mr-Helpful) + +- Corrects pin names used for nvim themes diff --git a/npins/sources.json b/npins/sources.json index 70df6065..ed83c54f 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -24,7 +24,7 @@ "url": "https://github.com/goolord/alpha-nvim/archive/de72250e054e5e691b9736ee30db72c65d560771.tar.gz", "hash": "0c1jkhxamfn2md7m1r5b2wpxa26y90b98yzjwf68m3fymalvkn5h" }, - "base16-nvim": { + "base16": { "type": "Git", "repository": { "type": "GitHub", @@ -288,7 +288,7 @@ "url": "https://github.com/sindrets/diffview.nvim/archive/4516612fe98ff56ae0415a259ff6361a89419b0a.tar.gz", "hash": "0brabpd02596hg98bml118bx6z2sly98kf1cr2p0xzybiinb4zs9" }, - "dracula-nvim": { + "dracula": { "type": "Git", "repository": { "type": "GitHub", @@ -420,7 +420,7 @@ "url": "https://github.com/ellisonleao/glow.nvim/archive/238070a686c1da3bccccf1079700eb4b5e19aea4.tar.gz", "hash": "1j63y3hb03n5m4jig8576sxnb3jixxlr66m9xcs8vgfm5h0mrhqs" }, - "gruvbox-nvim": { + "gruvbox": { "type": "Git", "repository": { "type": "GitHub", @@ -1247,7 +1247,7 @@ "url": "https://github.com/nvimtools/none-ls.nvim/archive/bb680d752cec37949faca7a1f509e2fe67ab418a.tar.gz", "hash": "11zgc86cjkv1vi183mplx3bsqa2x7ardk7ybyrp702xx5hmd882l" }, - "nord-nvim": { + "nord": { "type": "Git", "repository": { "type": "GitHub", @@ -1583,7 +1583,7 @@ "url": "https://github.com/Hoffs/omnisharp-extended-lsp.nvim/archive/4916fa12e5b28d21a1f031f0bdd10aa15a75d85d.tar.gz", "hash": "0w2zbiz2sxblnmhnqp6f6n7d9g9cm40ksk66anl3s7qnqffvc3cl" }, - "onedark-nvim": { + "onedark": { "type": "Git", "repository": { "type": "GitHub", @@ -1619,7 +1619,7 @@ "url": "https://github.com/jmbuhr/otter.nvim/archive/e8c662e1aefa8b483cfba6e00729a39a363dcecc.tar.gz", "hash": "0csl3ddm8782fw836adj4fp4h3fg2ygv7ik632llk55mp1q4dw1l" }, - "oxocarbon-nvim": { + "oxocarbon": { "type": "Git", "repository": { "type": "GitHub", @@ -1859,7 +1859,7 @@ "url": "https://github.com/akinsho/toggleterm.nvim/archive/344fc1810292785b3d962ddac2de57669e1a7ff9.tar.gz", "hash": "0awj2kj3lam2j48bgld5wyb4m1v09gpxmzww35rgysq7wipliqx1" }, - "tokyonight-nvim": { + "tokyonight": { "type": "Git", "repository": { "type": "GitHub", @@ -2005,4 +2005,4 @@ } }, "version": 3 -} \ No newline at end of file +} From 2d28b1fd6c36d982b886d3bb889a554276c7c3cc Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 11 Feb 2025 21:49:51 +0300 Subject: [PATCH 55/76] utility/ccc: fix npins name incompat --- modules/plugins/utility/ccc/config.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/plugins/utility/ccc/config.nix b/modules/plugins/utility/ccc/config.nix index ab2d1788..33948562 100644 --- a/modules/plugins/utility/ccc/config.nix +++ b/modules/plugins/utility/ccc/config.nix @@ -9,9 +9,7 @@ cfg = config.vim.utility.ccc; in { config = mkIf cfg.enable { - vim.startPlugins = [ - "ccc" - ]; + vim.startPlugins = ["ccc-nvim"]; vim.pluginRC.ccc = entryAnywhere '' local ccc = require("ccc") From 86d7412f7137c0f88bfb8b481f8c009d3fa8214b Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 11 Feb 2025 22:03:29 +0300 Subject: [PATCH 56/76] pins: yanky.nvim -> yanky-nvim --- npins/sources.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npins/sources.json b/npins/sources.json index ed83c54f..929da85c 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1991,7 +1991,7 @@ "url": "https://github.com/folke/which-key.nvim/archive/8ab96b38a2530eacba5be717f52e04601eb59326.tar.gz", "hash": "12wkl04apgag0p5njw8mczzlbxqf5h08k61qciwy10n4q1harzvz" }, - "yanky.nvim": { + "yanky-nvim": { "type": "Git", "repository": { "type": "GitHub", From 434802fa157a7955028214ed8fb0b665373f8d0a Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Tue, 11 Feb 2025 18:16:07 -0700 Subject: [PATCH 57/76] Rebase & Merge --- .../conform-nvim/builders/builderTemplate.nix | 66 ++++++ .../conform-nvim/builders/default.nix | 70 ++++++ .../conform-nvim/builders/latexmk.nix | 57 +++++ .../conform-nvim/builders/tectonic.nix | 203 ++++++++++++++++++ 4 files changed, 396 insertions(+) create mode 100644 modules/plugins/formatter/conform-nvim/builders/builderTemplate.nix create mode 100644 modules/plugins/formatter/conform-nvim/builders/default.nix create mode 100644 modules/plugins/formatter/conform-nvim/builders/latexmk.nix create mode 100644 modules/plugins/formatter/conform-nvim/builders/tectonic.nix diff --git a/modules/plugins/formatter/conform-nvim/builders/builderTemplate.nix b/modules/plugins/formatter/conform-nvim/builders/builderTemplate.nix new file mode 100644 index 00000000..02d20412 --- /dev/null +++ b/modules/plugins/formatter/conform-nvim/builders/builderTemplate.nix @@ -0,0 +1,66 @@ +# This function acts as a template for creating new builders. +# It enforces providing all the parameters required for creating +# a new builder for it to be able to work in the existing code. +# +# The first layer requirements are as follows: +{ + # This is the name of the builder, it will only be used internally and + # should match the .nix file that the builder is implemented in. + name, + # + # Module attribute set. This is the attribute set that the module that is + # defining a builder is passed as its input. + moduleInheritancePackage, + # + # These are the standard options for the builder just like creating any + # other module. Some options are required and are described below but + # it will also accept any other options that are provided to it. + options, + # + # These are the command line arguments that will accompany the executable + # when the build command is called. + # This is a function that will take in the cfg of its own builder. + # i.e. will be called as "args cfg.build.builders.${name}" + args, + ... +}: let + # Inherit the necessary variables available to any module. + inherit (moduleInheritancePackage) lib config; + # + # Inherit other useful functions. + inherit (lib.modules) mkIf; + # + # Set the cfg variable + cfg = config.vim.languages.tex; +in { + # These are the options for the builder. It will accept any options + # provided to it but some options are mandatory: + options.vim.languages.tex.build.builders.${name} = ({ + # The enable option. This one is self explanatory. + enable, + # + # This is the package option for the builder. + package, + # + # This is the executable that will be used to call the builder. + # It, along with package will result in: + # "/bin/" + executable, + # + # Any other options provided are accepted. + ... + } @ opts: + opts) + options; + + # Check that the language and this builder have been enabled + # before making any config. + config = mkIf (cfg.enable && cfg.build.builders.${name}.enable) { + vim.languages.tex.build.builder = { + inherit name; + package = cfg.build.builders.${name}.package; + executable = cfg.build.builders.${name}.executable; + args = args cfg.build.builders.${name}; + }; + }; +} diff --git a/modules/plugins/formatter/conform-nvim/builders/default.nix b/modules/plugins/formatter/conform-nvim/builders/default.nix new file mode 100644 index 00000000..4586b768 --- /dev/null +++ b/modules/plugins/formatter/conform-nvim/builders/default.nix @@ -0,0 +1,70 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib.options) mkOption; + inherit (lib.types) enum listOf package str; + inherit (lib.nvim.config) mkBool; + inherit (builtins) attrNames filter isAttrs hasAttr elemAt length; + + cfg = config.vim.languages.tex; +in { + imports = [ + ./latexmk.nix + ./tectonic.nix + ]; + + options.vim.languages.tex.build.builder = { + name = mkOption { + type = enum (attrNames cfg.build.builders); + default = "latexmk"; + description = '' + The tex builder to use. + + This is just the default custom option. By setting any of the + builders to true, this will be overwritten by that builder's + parameters. + Setting this parameter to the name of a declared builder will + not automatically enable that builder. + ''; + }; + args = mkOption { + type = listOf str; + default = [ + "-pdf" + "%f" + ]; + description = '' + The list of args to pass to the builder. + + This is just the default custom option. By setting any of the + builders to true, this will be overwritten by that builder's + parameters. + ''; + }; + package = mkOption { + type = package; + default = pkgs.texlive.withPackages (ps: [ps.latexmk]); + description = '' + The tex builder package to use. + + This is just the default custom option. By setting any of the + builders to true, this will be overwritten by that builder's + parameters. + ''; + }; + executable = mkOption { + type = str; + default = "latexmk"; + description = '' + The tex builder executable to use. + + This is just the default custom option. By setting any of the + builders to true, this will be overwritten by that builder's + parameters. + ''; + }; + }; +} diff --git a/modules/plugins/formatter/conform-nvim/builders/latexmk.nix b/modules/plugins/formatter/conform-nvim/builders/latexmk.nix new file mode 100644 index 00000000..4d024eb3 --- /dev/null +++ b/modules/plugins/formatter/conform-nvim/builders/latexmk.nix @@ -0,0 +1,57 @@ +# TODO: I need testing. +{ + pkgs, + lib, + ... +} @ moduleInheritancePackage: let + # The name of the builder + name = "latexmk"; + + # The builder template + template = import ./builderTemplate.nix; + + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) bool package str; +in ( + template { + inherit name moduleInheritancePackage; + + options = { + enable = mkEnableOption "Whether to enable Tex Compilation Via latexmk"; + + package = mkOption { + type = package; + default = pkgs.texlive.withPackages (ps: [ps.latexmk]); + description = "latexmk package"; + }; + + executable = mkOption { + type = str; + default = "latexmk"; + description = "The executable name from the build package that will be used to build/compile the tex."; + }; + + # Flag options + pdfOutput = mkOption { + type = bool; + default = true; + example = false; + description = "Insure the output file is a pdf."; + }; + }; + + args = builderCfg: ( + # Flags + ( + if builderCfg.pdfOutput + then ["-pdf"] + else [] + ) + # Base args + ++ [ + "-quiet" + "%f" + ] + ); + } +) diff --git a/modules/plugins/formatter/conform-nvim/builders/tectonic.nix b/modules/plugins/formatter/conform-nvim/builders/tectonic.nix new file mode 100644 index 00000000..1b131b33 --- /dev/null +++ b/modules/plugins/formatter/conform-nvim/builders/tectonic.nix @@ -0,0 +1,203 @@ +{ + config, + pkgs, + lib, + ... +} @ moduleInheritancePackage: let + # The name of the builder + name = "tectonic"; + + # The builder template + template = import ./builderTemplate.nix; + + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) enum ints listOf package str; + inherit (lib.nvim.config) mkBool; + inherit (builtins) concatLists elem map toString; + + cfg = config.vim.languages.tex; +in ( + template { + inherit name moduleInheritancePackage; + + options = { + enable = mkEnableOption "Whether to enable Tex Compilation Via Tectonic"; + + package = mkOption { + type = package; + default = pkgs.tectonic; + description = "tectonic package"; + }; + + executable = mkOption { + type = str; + default = "tectonic"; + description = "The executable name from the build package that will be used to build/compile the tex."; + }; + + # -- Flags -- + keepIntermediates = mkBool false '' + Keep the intermediate files generated during processing. + + If texlab is reporting build errors when there shouldn't be, disable this option. + ''; + keepLogs = mkBool true '' + Keep the log files generated during processing. + + Without the keepLogs flag, texlab won't be able to report compilation warnings. + ''; + onlyCached = mkBool false "Use only resource files cached locally"; + synctex = mkBool true "Generate SyncTeX data"; + untrustedInput = mkBool false "Input is untrusted -- disable all known-insecure features"; + + # -- Options -- + reruns = mkOption { + type = ints.unsigned; + default = 0; + example = 2; + description = '' + Rerun the TeX engine exactly this many times after the first. + + Setting this value to 0 will disable setting this option. + ''; + }; + + bundle = mkOption { + type = str; + default = ""; + description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; + }; + + webBundle = mkOption { + type = str; + default = ""; + description = "Use this URL to find resource files instead of the default"; + }; + + outfmt = mkOption { + type = enum [ + "pdf" + "html" + "xdv" + "aux" + "fmt" + "" + ]; + default = ""; + description = "The kind of output to generate"; + }; + + hidePaths = mkOption { + type = listOf str; + default = []; + example = [ + "./secrets.tex" + "./passwords.tex" + ]; + description = "Tell the engine that no file at exists, if it tries to read it."; + }; + + format = mkOption { + type = str; + default = ""; + description = "The name of the \"format\" file used to initialize the TeX engine"; + }; + + color = mkOption { + type = enum [ + "always" + "auto" + "never" + "" + ]; + default = ""; + example = "always"; + description = "Enable/disable colorful log output"; + }; + + extraOptions = { + type = listOf str; + default = []; + description = '' + Add extra command line options to include in the tectonic build command. + Extra options added here will not overwrite the options set in as nvf options. + ''; + }; + }; + + args = builderCfg: ( + # Base args + [ + "-X" + "compile" + "%f" + ] + # Flags + ++ ( + if builderCfg.keepIntermediates + then ["--keep-intermediates"] + else [] + ) + ++ ( + if builderCfg.keepLogs + then ["--keep-logs"] + else [] + ) + ++ ( + if builderCfg.onlyCached + then ["--only-cached"] + else [] + ) + ++ ( + if builderCfg.synctex + then ["--synctex"] + else [] + ) + ++ ( + if builderCfg.untrustedInput + then ["--untrusted"] + else [] + ) + # Options + ++ ( + if builderCfg.reruns > 0 + then ["--reruns" "${toString builderCfg.reruns}"] + else [] + ) + ++ ( + if builderCfg.bundle != "" + then ["--bundle" "${toString builderCfg.bundle}"] + else [] + ) + ++ ( + if builderCfg.webBundle != "" + then ["--web-bundle" "${toString builderCfg.webBundle}"] + else [] + ) + ++ ( + if builderCfg.outfmt != "" + then ["--outfmt" "${toString builderCfg.outfmt}"] + else [] + ) + ++ (concatLists (map (x: ["--hide" x]) builderCfg.hidePaths)) + ++ ( + if builderCfg.format != "" + then ["--format" "${toString builderCfg.format}"] + else [] + ) + ++ ( + if builderCfg.color != "" + then ["--color" "${toString builderCfg.color}"] + else [] + ) + # Still options but these are not defined by builder specific options but + # instead synchronize options between the global build options and builder + # specific options + ++ ( + if !(elem cfg.build.pdfDirectory ["." ""]) + then ["--outdir" "${cfg.build.pdfDirectory}"] + else [] + ) + ); + } +) From d638292e774ad6ab8dbc2b391cecf2da72c8256a Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Tue, 11 Feb 2025 19:37:14 -0700 Subject: [PATCH 58/76] Added usage of lib.optionals and created an assersion to check the number of enabled builders --- .../languages/tex/build/builders/latexmk.nix | 7 +- .../languages/tex/build/builders/tectonic.nix | 73 ++++--------------- .../plugins/languages/tex/build/default.nix | 20 +++-- 3 files changed, 29 insertions(+), 71 deletions(-) diff --git a/modules/plugins/languages/tex/build/builders/latexmk.nix b/modules/plugins/languages/tex/build/builders/latexmk.nix index 4d024eb3..c1f17917 100644 --- a/modules/plugins/languages/tex/build/builders/latexmk.nix +++ b/modules/plugins/languages/tex/build/builders/latexmk.nix @@ -10,6 +10,7 @@ # The builder template template = import ./builderTemplate.nix; + inherit (lib) optionals; inherit (lib.options) mkOption mkEnableOption; inherit (lib.types) bool package str; in ( @@ -42,11 +43,7 @@ in ( args = builderCfg: ( # Flags - ( - if builderCfg.pdfOutput - then ["-pdf"] - else [] - ) + (optionals builderCfg.pdfOutput ["-pdf"]) # Base args ++ [ "-quiet" diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix b/modules/plugins/languages/tex/build/builders/tectonic.nix index 1b131b33..7513350d 100644 --- a/modules/plugins/languages/tex/build/builders/tectonic.nix +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix @@ -10,6 +10,7 @@ # The builder template template = import ./builderTemplate.nix; + inherit (lib) optionals; inherit (lib.options) mkOption mkEnableOption; inherit (lib.types) enum ints listOf package str; inherit (lib.nvim.config) mkBool; @@ -133,71 +134,23 @@ in ( "%f" ] # Flags - ++ ( - if builderCfg.keepIntermediates - then ["--keep-intermediates"] - else [] - ) - ++ ( - if builderCfg.keepLogs - then ["--keep-logs"] - else [] - ) - ++ ( - if builderCfg.onlyCached - then ["--only-cached"] - else [] - ) - ++ ( - if builderCfg.synctex - then ["--synctex"] - else [] - ) - ++ ( - if builderCfg.untrustedInput - then ["--untrusted"] - else [] - ) + ++ (optionals builderCfg.keepIntermediates ["--keep-intermediates"]) + ++ (optionals builderCfg.keepLogs ["--keep-logs"]) + ++ (optionals builderCfg.onlyCached ["--only-cached"]) + ++ (optionals builderCfg.synctex ["--synctex"]) + ++ (optionals builderCfg.untrustedInput ["--untrusted"]) # Options - ++ ( - if builderCfg.reruns > 0 - then ["--reruns" "${toString builderCfg.reruns}"] - else [] - ) - ++ ( - if builderCfg.bundle != "" - then ["--bundle" "${toString builderCfg.bundle}"] - else [] - ) - ++ ( - if builderCfg.webBundle != "" - then ["--web-bundle" "${toString builderCfg.webBundle}"] - else [] - ) - ++ ( - if builderCfg.outfmt != "" - then ["--outfmt" "${toString builderCfg.outfmt}"] - else [] - ) + ++ (optionals (builderCfg.reruns > 0) ["--reruns" "${toString builderCfg.reruns}"]) + ++ (optionals (builderCfg.bundle != "") ["--bundle" "${toString builderCfg.bundle}"]) + ++ (optionals (builderCfg.webBundle != "") ["--web-bundle" "${toString builderCfg.webBundle}"]) + ++ (optionals (builderCfg.outfmt != "") ["--outfmt" "${toString builderCfg.outfmt}"]) ++ (concatLists (map (x: ["--hide" x]) builderCfg.hidePaths)) - ++ ( - if builderCfg.format != "" - then ["--format" "${toString builderCfg.format}"] - else [] - ) - ++ ( - if builderCfg.color != "" - then ["--color" "${toString builderCfg.color}"] - else [] - ) + ++ (optionals (builderCfg.format != "") ["--format" "${toString builderCfg.format}"]) + ++ (optionals (builderCfg.color != "") ["--color" "${toString builderCfg.color}"]) # Still options but these are not defined by builder specific options but # instead synchronize options between the global build options and builder # specific options - ++ ( - if !(elem cfg.build.pdfDirectory ["." ""]) - then ["--outdir" "${cfg.build.pdfDirectory}"] - else [] - ) + ++ (optionals (!(elem cfg.build.pdfDirectory ["." ""])) ["--outdir" "${cfg.build.pdfDirectory}"]) ); } ) diff --git a/modules/plugins/languages/tex/build/default.nix b/modules/plugins/languages/tex/build/default.nix index fe07775b..78f13588 100644 --- a/modules/plugins/languages/tex/build/default.nix +++ b/modules/plugins/languages/tex/build/default.nix @@ -4,6 +4,7 @@ ... }: let inherit (lib.options) mkOption; + inherit (lib.modules) mkIf; inherit (lib.types) str nullOr; inherit (builtins) filter isAttrs hasAttr attrNames length elemAt; inherit (lib.nvim.config) mkBool; @@ -48,11 +49,7 @@ in { options.vim.languages.tex.build = { enable = - mkBool ( - if enabledBuildersCount > 1 - then throw "nvf-tex-language does not support having more than 1 builders enabled!" - else (enabledBuildersCount == 1) - ) '' + mkBool (enabledBuildersCount == 1) '' Whether to enable configuring the builder. By enabling any of the builders, this option will be automatically set. @@ -106,8 +103,19 @@ in { type = nullOr str; default = null; description = '' - Allows overriding the default file name of the build artifact. This setting is used to find the correct PDF file to open during forward search. + Allows overriding the default file name of the build artifact. + This setting is used to find the correct PDF file to open during forward search. ''; }; }; + + + config = mkIf (enabledBuildersCount > 0) { + assertions = [ + { + assertion = (enabledBuildersCount < 2); + message = "The nvf-tex-language implementation does not support having more than 1 builders enabled."; + } + ]; + }; } From 0f04df467f54a3a10cb028bf0b434c308155e802 Mon Sep 17 00:00:00 2001 From: isaacST08 <106057977+isaacST08@users.noreply.github.com> Date: Tue, 11 Feb 2025 19:40:26 -0700 Subject: [PATCH 59/76] Added code/keyword md escaping for documentation in modules/plugins/languages/tex/build/default.nix Co-authored-by: raf --- modules/plugins/languages/tex/build/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/languages/tex/build/default.nix b/modules/plugins/languages/tex/build/default.nix index 78f13588..3daa0ea7 100644 --- a/modules/plugins/languages/tex/build/default.nix +++ b/modules/plugins/languages/tex/build/default.nix @@ -61,7 +61,7 @@ in { onSave = mkBool false "Set this property to true if you want to compile the project after saving a file."; useFileList = mkBool false '' - When set to true, the server will use the .fls files produced by the TeX engine as an additional input for the project detection. + When set to `true`, the server will use the `.fls` files produced by the TeX engine as an additional input for the project detection. Note that enabling this property might have an impact on performance. ''; From ed514a638dcfe9621e87284ee746e481ad039f72 Mon Sep 17 00:00:00 2001 From: isaacST08 <106057977+isaacST08@users.noreply.github.com> Date: Tue, 11 Feb 2025 19:41:14 -0700 Subject: [PATCH 60/76] Added code/keyword md escaping for documentation in modules/plugins/languages/tex/default.nix Co-authored-by: raf --- modules/plugins/languages/tex/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/languages/tex/default.nix b/modules/plugins/languages/tex/default.nix index 252e8615..be77a49e 100644 --- a/modules/plugins/languages/tex/default.nix +++ b/modules/plugins/languages/tex/default.nix @@ -26,7 +26,7 @@ in { default = false; example = true; description = '' - Whether to set the vim.g.tex_flavor (g:tex_flavor) option in your lua config. + Whether to set the `vim.g.tex_flavor` (`g:tex_flavor`) option in your Lua config. When opening a .tex file vim will try to automatically try to determine the file type from the three options: plaintex (for plain TeX), context (for ConTeXt), or tex (for LaTeX). From 6aaba37d391357ead35fb734b7c11da396d09ab9 Mon Sep 17 00:00:00 2001 From: isaacST08 <106057977+isaacST08@users.noreply.github.com> Date: Tue, 11 Feb 2025 19:42:14 -0700 Subject: [PATCH 61/76] Removed duplicate "Whether to enable" in documentation for modules/plugins/languages/tex/build/builders/tectonic.nix Co-authored-by: raf --- modules/plugins/languages/tex/build/builders/tectonic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix b/modules/plugins/languages/tex/build/builders/tectonic.nix index 7513350d..315b13de 100644 --- a/modules/plugins/languages/tex/build/builders/tectonic.nix +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix @@ -22,7 +22,7 @@ in ( inherit name moduleInheritancePackage; options = { - enable = mkEnableOption "Whether to enable Tex Compilation Via Tectonic"; + enable = mkEnableOption "Tex Compilation Via Tectonic"; package = mkOption { type = package; From 226775fce67e77b04df6e1635d52b8e51ac537a4 Mon Sep 17 00:00:00 2001 From: isaacST08 <106057977+isaacST08@users.noreply.github.com> Date: Tue, 11 Feb 2025 19:43:46 -0700 Subject: [PATCH 62/76] Removed duplicate "Whether to enable" in documentation for modules/plugins/languages/tex/build/builders/latexmk.nix Co-authored-by: raf --- modules/plugins/languages/tex/build/builders/latexmk.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/languages/tex/build/builders/latexmk.nix b/modules/plugins/languages/tex/build/builders/latexmk.nix index c1f17917..9037fd6a 100644 --- a/modules/plugins/languages/tex/build/builders/latexmk.nix +++ b/modules/plugins/languages/tex/build/builders/latexmk.nix @@ -18,7 +18,7 @@ in ( inherit name moduleInheritancePackage; options = { - enable = mkEnableOption "Whether to enable Tex Compilation Via latexmk"; + enable = mkEnableOption "Tex Compilation Via latexmk"; package = mkOption { type = package; From 739415da0f9f6a0dcb7d812f70bc12e9dc9fce2c Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Tue, 11 Feb 2025 19:55:48 -0700 Subject: [PATCH 63/76] Clarified documentation wording and utilized mkPackageOption for the tectonic builder --- .../languages/tex/build/builders/tectonic.nix | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix b/modules/plugins/languages/tex/build/builders/tectonic.nix index 315b13de..b9b4e656 100644 --- a/modules/plugins/languages/tex/build/builders/tectonic.nix +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix @@ -11,8 +11,8 @@ template = import ./builderTemplate.nix; inherit (lib) optionals; - inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) enum ints listOf package str; + inherit (lib.options) mkOption mkEnableOption mkPackageOption; + inherit (lib.types) enum ints listOf str; inherit (lib.nvim.config) mkBool; inherit (builtins) concatLists elem map toString; @@ -24,11 +24,7 @@ in ( options = { enable = mkEnableOption "Tex Compilation Via Tectonic"; - package = mkOption { - type = package; - default = pkgs.tectonic; - description = "tectonic package"; - }; + package = mkPackageOption pkgs "tectonic" {}; executable = mkOption { type = str; @@ -38,18 +34,18 @@ in ( # -- Flags -- keepIntermediates = mkBool false '' - Keep the intermediate files generated during processing. + Whether to keep the intermediate files generated during processing. If texlab is reporting build errors when there shouldn't be, disable this option. ''; keepLogs = mkBool true '' - Keep the log files generated during processing. + Whether to keep the log files generated during processing. Without the keepLogs flag, texlab won't be able to report compilation warnings. ''; - onlyCached = mkBool false "Use only resource files cached locally"; - synctex = mkBool true "Generate SyncTeX data"; - untrustedInput = mkBool false "Input is untrusted -- disable all known-insecure features"; + onlyCached = mkBool false "Whether to use only resource files cached locally"; + synctex = mkBool true "Whether to generate SyncTeX data"; + untrustedInput = mkBool false "Whether to input is untrusted -- disable all known-insecure features"; # -- Options -- reruns = mkOption { @@ -57,7 +53,9 @@ in ( default = 0; example = 2; description = '' - Rerun the TeX engine exactly this many times after the first. + How many times to *rerun* the TeX build engine. + The build engine (if a builder is enabled) will always run at least + once. Setting this value to 0 will disable setting this option. ''; From 5b616f79079b8aad99109dc9424bfa17b592b765 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Tue, 11 Feb 2025 20:48:34 -0700 Subject: [PATCH 64/76] Created assertion for the correct number of pdf viewers instead of throwing an error. --- .../languages/tex/pdfViewer/default.nix | 58 ++++++++++++------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/modules/plugins/languages/tex/pdfViewer/default.nix b/modules/plugins/languages/tex/pdfViewer/default.nix index 43a16907..18d5bd58 100644 --- a/modules/plugins/languages/tex/pdfViewer/default.nix +++ b/modules/plugins/languages/tex/pdfViewer/default.nix @@ -5,9 +5,10 @@ }: let defaultPdfViewerName = "okular"; + inherit (builtins) filter isAttrs hasAttr attrNames length elemAt; + inherit (lib.modules) mkIf; inherit (lib.options) mkOption; inherit (lib.types) str package listOf; - inherit (builtins) filter isAttrs hasAttr attrNames length elemAt; cfg = config.vim.languages.tex; viewerCfg = cfg.pdfViewer; @@ -44,14 +45,11 @@ # Get the index that will be used for the next iteration nextIndex = index + 1; - # Increment the count that is recording the number of enabled pdf viewers if - # this viewer is enabled, otherwise leave it as is. + # Increment the count that is recording the number of enabled pdf viewers + # if this viewer is enabled, otherwise leave it as is. newEnabledPdfViewersCount = if currentPdfViewer.enable - then - if enabledPdfViewersCount > 0 - then throw "nvf-tex-language does not support having more than 1 pdf viewer enabled!" - else enabledPdfViewersCount + 1 + then enabledPdfViewersCount + 1 else enabledPdfViewersCount; # If this pdf viewer is enabled, set is as the enabled viewer. @@ -84,8 +82,8 @@ in { imports = [ ./custom.nix ./okular.nix - ./sioyek.nix ./qpdfview.nix + ./sioyek.nix ./zathura.nix ]; @@ -96,10 +94,12 @@ in { description = '' The name of the pdf viewer to use. - This value will be automatically set when any of the viewers are enabled. + This value will be automatically set when any of the viewers are + enabled. - Setting this option option manually is not recommended but can be used for some very technical nix-ing. - If you wish to use a custom viewer, please use the `custom` entry provided under `viewers`. + Setting this option option manually is not recommended but can be used + for some very technical nix-ing. If you wish to use a custom viewer, + please use the `custom` entry provided under `viewers`. ''; }; @@ -109,10 +109,12 @@ in { description = '' The package of the pdf viewer to use. - This value will be automatically set when any of the viewers are enabled. + This value will be automatically set when any of the viewers are + enabled. - Setting this option option manually is not recommended but can be used for some very technical nix-ing. - If you wish to use a custom viewer, please use the `custom` entry provided under `viewers`. + Setting this option option manually is not recommended but can be used + for some very technical nix-ing. If you wish to use a custom viewer, + please use the `custom` entry provided under `viewers`. ''; }; @@ -122,10 +124,12 @@ in { description = '' The executable for the pdf viewer to use. - This value will be automatically set when any of the viewers are enabled. + This value will be automatically set when any of the viewers are + enabled. - Setting this option option manually is not recommended but can be used for some very technical nix-ing. - If you wish to use a custom viewer, please use the `custom` entry provided under `viewers`. + Setting this option option manually is not recommended but can be used + for some very technical nix-ing. If you wish to use a custom viewer, + please use the `custom` entry provided under `viewers`. ''; }; @@ -135,11 +139,25 @@ in { description = '' The command line arguments to use when calling the pdf viewer command. - This value will be automatically set when any of the viewers are enabled. + This value will be automatically set when any of the viewers are + enabled. - Setting this option option manually is not recommended but can be used for some very technical nix-ing. - If you wish to use a custom viewer, please use the `custom` entry provided under `viewers`. + Setting this option option manually is not recommended but can be used + for some very technical nix-ing. If you wish to use a custom viewer, + please use the `custom` entry provided under `viewers`. ''; }; }; + + config = mkIf (enabledPdfViewersInfo.count > 0) { + assertions = [ + { + assertion = enabledPdfViewersInfo.count < 2; + message = '' + The nvf-tex-language implementation does not support having more than + 1 pdf viewers enabled. + ''; + } + ]; + }; } From c3c720f4a2be14afe24122d56bc974cb5907c303 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Tue, 11 Feb 2025 21:14:24 -0700 Subject: [PATCH 65/76] Cleaned up documentation and other performed other code cleanups --- .../languages/tex/build/builders/default.nix | 3 +- .../languages/tex/build/builders/latexmk.nix | 5 +- .../languages/tex/build/builders/tectonic.nix | 88 ++++--- .../plugins/languages/tex/build/default.nix | 69 +++-- modules/plugins/languages/tex/default.nix | 61 +++-- modules/plugins/languages/tex/lsp/texlab.nix | 243 ++++++++++++------ .../languages/tex/pdfViewer/custom.nix | 15 +- .../languages/tex/pdfViewer/okular.nix | 15 +- .../languages/tex/pdfViewer/qpdfview.nix | 15 +- .../languages/tex/pdfViewer/sioyek.nix | 18 +- .../tex/pdfViewer/viewerTemplate.nix | 3 +- .../languages/tex/pdfViewer/zathura.nix | 16 +- modules/plugins/languages/tex/treesitter.nix | 5 - 13 files changed, 343 insertions(+), 213 deletions(-) diff --git a/modules/plugins/languages/tex/build/builders/default.nix b/modules/plugins/languages/tex/build/builders/default.nix index 4586b768..fa51e70a 100644 --- a/modules/plugins/languages/tex/build/builders/default.nix +++ b/modules/plugins/languages/tex/build/builders/default.nix @@ -6,8 +6,7 @@ }: let inherit (lib.options) mkOption; inherit (lib.types) enum listOf package str; - inherit (lib.nvim.config) mkBool; - inherit (builtins) attrNames filter isAttrs hasAttr elemAt length; + inherit (builtins) attrNames; cfg = config.vim.languages.tex; in { diff --git a/modules/plugins/languages/tex/build/builders/latexmk.nix b/modules/plugins/languages/tex/build/builders/latexmk.nix index 9037fd6a..8872f3dd 100644 --- a/modules/plugins/languages/tex/build/builders/latexmk.nix +++ b/modules/plugins/languages/tex/build/builders/latexmk.nix @@ -29,7 +29,10 @@ in ( executable = mkOption { type = str; default = "latexmk"; - description = "The executable name from the build package that will be used to build/compile the tex."; + description = '' + The executable name from the build package that will be used to + build/compile the tex. + ''; }; # Flag options diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix b/modules/plugins/languages/tex/build/builders/tectonic.nix index b9b4e656..ed1e8edb 100644 --- a/modules/plugins/languages/tex/build/builders/tectonic.nix +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix @@ -12,7 +12,7 @@ inherit (lib) optionals; inherit (lib.options) mkOption mkEnableOption mkPackageOption; - inherit (lib.types) enum ints listOf str; + inherit (lib.types) enum ints listOf str nullOr; inherit (lib.nvim.config) mkBool; inherit (builtins) concatLists elem map toString; @@ -29,23 +29,32 @@ in ( executable = mkOption { type = str; default = "tectonic"; - description = "The executable name from the build package that will be used to build/compile the tex."; + description = '' + The executable name from the build package that will be used to + build/compile the tex. + ''; }; # -- Flags -- keepIntermediates = mkBool false '' Whether to keep the intermediate files generated during processing. - If texlab is reporting build errors when there shouldn't be, disable this option. + If texlab is reporting build errors when there shouldn't be, disable + this option. ''; keepLogs = mkBool true '' Whether to keep the log files generated during processing. - Without the keepLogs flag, texlab won't be able to report compilation warnings. + Without the keepLogs flag, texlab won't be able to report compilation + warnings. + ''; + onlyCached = mkBool false '' + Whether to use only resource files cached locally ''; - onlyCached = mkBool false "Whether to use only resource files cached locally"; synctex = mkBool true "Whether to generate SyncTeX data"; - untrustedInput = mkBool false "Whether to input is untrusted -- disable all known-insecure features"; + untrustedInput = mkBool false '' + Whether to diable all known-insecure features if the input is untrusted + ''; # -- Options -- reruns = mkOption { @@ -62,28 +71,37 @@ in ( }; bundle = mkOption { - type = str; - default = ""; - description = "Use this directory or Zip-format bundle file to find resource files instead of the default"; + type = nullOr str; + default = null; + description = '' + Use this directory or Zip-format bundle file to find resource files + instead of the default. + ''; }; webBundle = mkOption { - type = str; - default = ""; - description = "Use this URL to find resource files instead of the default"; + type = nullOr str; + default = null; + description = '' + Use this URL to find resource files instead of the default. + ''; }; outfmt = mkOption { - type = enum [ + type = nullOr (enum [ "pdf" "html" "xdv" "aux" "fmt" - "" - ]; - default = ""; - description = "The kind of output to generate"; + ]); + default = null; + description = '' + The kind of output to generate. + + Setting this to `null` (default) will let tectonic decide the most + appropriate output format, which usually be a pdf. + ''; }; hidePaths = mkOption { @@ -93,23 +111,27 @@ in ( "./secrets.tex" "./passwords.tex" ]; - description = "Tell the engine that no file at exists, if it tries to read it."; + description = '' + Tell the engine that no file at `` exists, if it tries + to read it. + ''; }; format = mkOption { - type = str; - default = ""; - description = "The name of the \"format\" file used to initialize the TeX engine"; + type = nullOr str; + default = null; + description = '' + The name of the \"format\" file used to initialize the TeX engine. + ''; }; color = mkOption { - type = enum [ + type = nullOr (enum [ "always" "auto" "never" - "" - ]; - default = ""; + ]); + default = null; example = "always"; description = "Enable/disable colorful log output"; }; @@ -118,8 +140,10 @@ in ( type = listOf str; default = []; description = '' - Add extra command line options to include in the tectonic build command. - Extra options added here will not overwrite the options set in as nvf options. + Add extra command line options to include in the tectonic build + command. + Extra options added here will not overwrite the options set in as nvf + options. ''; }; }; @@ -139,12 +163,12 @@ in ( ++ (optionals builderCfg.untrustedInput ["--untrusted"]) # Options ++ (optionals (builderCfg.reruns > 0) ["--reruns" "${toString builderCfg.reruns}"]) - ++ (optionals (builderCfg.bundle != "") ["--bundle" "${toString builderCfg.bundle}"]) - ++ (optionals (builderCfg.webBundle != "") ["--web-bundle" "${toString builderCfg.webBundle}"]) - ++ (optionals (builderCfg.outfmt != "") ["--outfmt" "${toString builderCfg.outfmt}"]) + ++ (optionals (builderCfg.bundle != null) ["--bundle" "${toString builderCfg.bundle}"]) + ++ (optionals (builderCfg.webBundle != null) ["--web-bundle" "${toString builderCfg.webBundle}"]) + ++ (optionals (builderCfg.outfmt != null) ["--outfmt" "${toString builderCfg.outfmt}"]) ++ (concatLists (map (x: ["--hide" x]) builderCfg.hidePaths)) - ++ (optionals (builderCfg.format != "") ["--format" "${toString builderCfg.format}"]) - ++ (optionals (builderCfg.color != "") ["--color" "${toString builderCfg.color}"]) + ++ (optionals (builderCfg.format != null) ["--format" "${toString builderCfg.format}"]) + ++ (optionals (builderCfg.color != null) ["--color" "${toString builderCfg.color}"]) # Still options but these are not defined by builder specific options but # instead synchronize options between the global build options and builder # specific options diff --git a/modules/plugins/languages/tex/build/default.nix b/modules/plugins/languages/tex/build/default.nix index 3daa0ea7..9f9c5bc3 100644 --- a/modules/plugins/languages/tex/build/default.nix +++ b/modules/plugins/languages/tex/build/default.nix @@ -3,11 +3,11 @@ lib, ... }: let - inherit (lib.options) mkOption; - inherit (lib.modules) mkIf; - inherit (lib.types) str nullOr; inherit (builtins) filter isAttrs hasAttr attrNames length elemAt; + inherit (lib.modules) mkIf; inherit (lib.nvim.config) mkBool; + inherit (lib.options) mkOption; + inherit (lib.types) str nullOr; cfg = config.vim.languages.tex; @@ -48,20 +48,28 @@ in { ]; options.vim.languages.tex.build = { - enable = - mkBool (enabledBuildersCount == 1) '' - Whether to enable configuring the builder. + enable = mkBool (enabledBuildersCount == 1) '' + Whether to enable configuring the builder. - By enabling any of the builders, this option will be automatically set. - If you enable more than one builder then an error will be thrown. - ''; + By enabling any of the builders, this option will be automatically set. + If you enable more than one builder then an error will be thrown. + ''; - forwardSearchAfter = mkBool false "Set this property to true if you want to execute a forward search after a build."; + forwardSearchAfter = mkBool false '' + Set this property to `true` if you want to execute a forward search after + a build. - onSave = mkBool false "Set this property to true if you want to compile the project after saving a file."; + This can also be thought of as enabling auto updating for your pdf viewer. + ''; + + onSave = mkBool false '' + Set this property to `true` if you want to compile the project after + saving a file. + ''; useFileList = mkBool false '' - When set to `true`, the server will use the `.fls` files produced by the TeX engine as an additional input for the project detection. + When set to `true`, the server will use the `.fls` files produced by the + TeX engine as an additional input for the project detection. Note that enabling this property might have an impact on performance. ''; @@ -70,10 +78,12 @@ in { type = str; default = "."; description = '' - When not using latexmk, provides a way to define the directory containing the .aux files. - Note that you need to set the aux directory in latex.build.args too. + When not using latexmk, provides a way to define the directory + containing the `.aux` files. + Note that you need to set the aux directory in `latex.build.args` too. - When using a latexmkrc file, texlab will automatically infer the correct setting. + When using a latexmkrc file, texlab will automatically infer the correct + setting. ''; }; @@ -81,10 +91,13 @@ in { type = str; default = "."; description = '' - When not using latexmk, provides a way to define the directory containing the build log files. - Note that you need to change the output directory in your build arguments too. + When not using latexmk, provides a way to define the directory + containing the build log files. + Note that you need to change the output directory in your build + arguments too. - When using a latexmkrc file, texlab will automatically infer the correct setting. + When using a latexmkrc file, texlab will automatically infer the correct + setting. ''; }; @@ -92,10 +105,13 @@ in { type = str; default = "."; description = '' - When not using latexmk, provides a way to define the directory containing the output files. - Note that you need to set the output directory in latex.build.args too. + When not using latexmk, provides a way to define the directory + containing the output files. + Note that you need to set the output directory in `latex.build.args` + too. - When using a latexmkrc file, texlab will automatically infer the correct setting. + When using a latexmkrc file, texlab will automatically infer the correct + setting. ''; }; @@ -104,17 +120,20 @@ in { default = null; description = '' Allows overriding the default file name of the build artifact. - This setting is used to find the correct PDF file to open during forward search. + This setting is used to find the correct PDF file to open during forward + search. ''; }; }; - config = mkIf (enabledBuildersCount > 0) { assertions = [ { - assertion = (enabledBuildersCount < 2); - message = "The nvf-tex-language implementation does not support having more than 1 builders enabled."; + assertion = enabledBuildersCount < 2; + message = '' + The nvf-tex-language implementation does not support having more than + 1 builders enabled. + ''; } ]; }; diff --git a/modules/plugins/languages/tex/default.nix b/modules/plugins/languages/tex/default.nix index be77a49e..e427f8a3 100644 --- a/modules/plugins/languages/tex/default.nix +++ b/modules/plugins/languages/tex/default.nix @@ -4,16 +4,17 @@ ... }: let inherit (lib.modules) mkIf mkMerge; + inherit (lib.nvim.config) mkBool; inherit (lib.options) mkEnableOption mkOption; - inherit (lib.types) bool str; + inherit (lib.types) enum; cfg = config.vim.languages.tex; in { imports = [ - ./treesitter.nix - ./lsp ./build + ./lsp ./pdfViewer + ./treesitter.nix ]; options.vim.languages.tex = { @@ -21,38 +22,46 @@ in { extraOpts = { texFlavor = { - enable = mkOption { - type = bool; - default = false; - example = true; - description = '' - Whether to set the `vim.g.tex_flavor` (`g:tex_flavor`) option in your Lua config. + enable = mkBool false '' + Whether to set the `vim.g.tex_flavor` (`g:tex_flavor`) option in + your Lua config. - When opening a .tex file vim will try to automatically try to determine the file type from - the three options: plaintex (for plain TeX), context (for ConTeXt), or tex (for LaTeX). - This can either be done by a indicator line of the form `%&` on the first line or - if absent vim will search the file for keywords to try and determine the filetype. - If no filetype can be determined automatically then by default it will fallback to plaintex. + When opening a `.tex` file vim will try to automatically try to + determine the file type from the three options: `plaintex` (for + plain TeX), `context` (for ConTeXt), or `tex` (for LaTeX). + This can either be done by a indicator line of the form `%&` + on the first line or, if absent, vim will search the file for + keywords to try and determine the filetype. If no filetype can be + determined automatically then by default it will fallback to + plaintex. - This option will enable setting the tex flavor in your lua config and you can set its value - using the `vim.languages.tex.lsp.extraOpts.texFlavor.flavor = ` in your nvf config. + This option will enable setting the tex flavor in your lua config + and you can set its value using the + `vim.languages.tex.lsp.extraOpts.texFlavor.flavor = ` in + your nvf config. - Setting this option to `false` will omit the `vim.g.tex_flavor = ` line from your lua - config entirely (unless you manually set it elsewhere of course). - ''; - }; + Setting this option to `false` will omit the + `vim.g.tex_flavor = ` line from your lua config entirely + (unless you manually set it elsewhere of course). + ''; flavor = mkOption { - type = str; + type = enum [ + "plaintex" + "contex" + "tex" + ]; default = "plaintex"; example = "tex"; description = '' - The flavor to set as a fallback for when vim cannot automatically determine the tex flavor when - opening a .tex document. + The flavor to set as a fallback for when vim cannot automatically + determine the tex flavor when opening a `.tex` document. - The options are: plaintex (for plain TeX), context (for ConTeXt), or tex (for LaTeX). + The options are: `plaintex` (for plain TeX), `context` (for + ConTeXt), or `tex` (for LaTeX). - This can be particularly useful for when using `vim.utility.new-file-template` options for - creating templates when no context has yet been added to a new file. + This can be particularly useful for when using + `vim.utility.new-file-template` options for creating templates when + no context has yet been added to a new file. ''; }; }; diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index 5677d958..07c64aab 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -4,24 +4,34 @@ lib, ... }: let - inherit (lib.options) mkOption; - inherit (lib.modules) mkIf mkMerge; - inherit (lib.types) attrs either enum ints listOf nullOr package path str submodule; - inherit (lib.nvim.config) mkBool; inherit (builtins) isString map; + inherit (lib.modules) mkIf mkMerge; + inherit (lib.nvim.config) mkBool; + inherit (lib.options) mkOption mkPackageOption; + inherit + (lib.types) + attrs + either + enum + ints + listOf + nullOr + package + path + str + submodule + ; cfg = config.vim.languages.tex; texlabCfg = cfg.lsp.texlab; builderCfg = cfg.build.builder; in { options.vim.languages.tex.lsp.texlab = { - enable = mkBool config.vim.languages.enableLSP "Whether to enable Tex LSP support (texlab)"; + enable = mkBool config.vim.languages.enableLSP '' + Whether to enable Tex LSP support (texlab). + ''; - package = mkOption { - type = package; - default = pkgs.texlab; - description = "texlab package"; - }; + package = mkPackageOption pkgs "texlab" {}; chktex = { enable = mkBool false "Whether to enable linting via chktex"; @@ -35,7 +45,9 @@ in { ''; }; - onOpenAndSave = mkBool false "Lint using chktex after opening and saving a file."; + onOpenAndSave = mkBool false '' + Lint using chktex after opening and saving a file. + ''; onEdit = mkBool false "Lint using chktex after editing a file."; @@ -43,7 +55,8 @@ in { type = listOf str; default = []; description = '' - Additional command line arguments that are passed to chktex after editing a file. + Additional command line arguments that are passed to chktex after + editing a file. Don't redefine the `-I` and `-f` flags as they are set by the server. ''; }; @@ -58,11 +71,15 @@ in { ]; default = "fuzzy-ignore-case"; description = '' - Modifies the algorithm used to filter the completion items returned to the client. Possibles values are: - - fuzzy: Fuzzy string matching (case sensitive) - - fuzzy-ignore-case: Fuzzy string matching (case insensitive) - - prefix: Filter out items that do not start with the search text (case sensitive) - - prefix-ignore-case: Filter out items that do not start with the search text (case insensitive) + Modifies the algorithm used to filter the completion items returned to + the client. + Possibles values are: + - `fuzzy`: Fuzzy string matching (case sensitive). + - `fuzzy-ignore-case`: Fuzzy string matching (case insensitive). + - `prefix`: Filter out items that do not start with the search text + (case sensitive). + - `prefix-ignore-case`: Filter out items that do not start with the + search text (case insensitive). ''; }; @@ -77,13 +94,16 @@ in { type = listOf str; default = []; description = '' - A list of regular expressions used to filter the list of reported diagnostics. - If specified, only diagnostics that match at least one of the specified patterns are sent to the client. + A list of regular expressions used to filter the list of reported + diagnostics. + If specified, only diagnostics that match at least one of the + specified patterns are sent to the client. - See also texlab.diagnostics.ignoredPatterns. + See also `texlab.diagnostics.ignoredPatterns`. - Hint: If both allowedPatterns and ignoredPatterns are set, then allowed patterns are applied first. - Afterwards, the results are filtered with the ignored patterns. + Hint: If both allowedPatterns and ignoredPatterns are set, then + allowed patterns are applied first. Afterwards, the results are + filtered with the ignored patterns. ''; }; @@ -91,35 +111,48 @@ in { type = listOf str; default = []; description = '' - A list of regular expressions used to filter the list of reported diagnostics. - If specified, only diagnostics that match none of the specified patterns are sent to the client. + A list of regular expressions used to filter the list of reported + diagnostics. + If specified, only diagnostics that match none of the specified + patterns are sent to the client. - See also texlab.diagnostics.allowedPatterns. + See also `texlab.diagnostics.allowedPatterns`. ''; }; }; experimental = { - followPackageLinks = mkBool false "If set to true, dependencies of custom packages are resolved and included in the dependency graph."; + followPackageLinks = mkBool false '' + If set to `true`, dependencies of custom packages are resolved and + included in the dependency graph. + ''; mathEnvironments = mkOption { type = listOf str; default = []; - description = "Allows extending the list of environments which the server considers as math environments (for example `align*` or `equation`)."; + description = '' + Allows extending the list of environments which the server considers + as math environments (for example `align*` or `equation`). + ''; }; enumEnvironments = mkOption { type = listOf str; default = []; - description = "Allows extending the list of environments which the server considers as enumeration environments (for example `enumerate` or `itemize`)."; + description = '' + Allows extending the list of environments which the server considers + as enumeration environments (for example `enumerate` or `itemize`). + ''; }; verbatimEnvironments = mkOption { type = listOf str; default = []; description = '' - Allows extending the list of environments which the server considers as verbatim environments (for example `minted` or `lstlisting`). - This can be used to suppress diagnostics from environments that do not contain LaTeX code. + Allows extending the list of environments which the server considers + as verbatim environments (for example `minted` or `lstlisting`). + This can be used to suppress diagnostics from environments that do + not contain LaTeX code. ''; }; @@ -127,9 +160,11 @@ in { type = listOf str; default = []; description = '' - Allows extending the list of commands which the server considers as citation commands (for example `\cite`). + Allows extending the list of commands which the server considers as + citation commands (for example `\cite`). - Hint: Additional commands need to be written without a leading `\` (e. g. `foo` instead of `\foo`). + Hint: Additional commands need to be written without a leading `\` + (e.g. `foo` instead of `\foo`). ''; }; @@ -139,7 +174,8 @@ in { description = '' Allows extending the list of `\label`-like commands. - Hint: Additional commands need to be written without a leading `\` (e. g. `foo` instead of `\foo`). + Hint: Additional commands need to be written without a leading `\` + (e.g. `foo` instead of `\foo`). ''; }; @@ -149,7 +185,8 @@ in { description = '' Allows extending the list of `\ref`-like commands. - Hint: Additional commands need to be written without a leading `\` (e. g. `foo` instead of `\foo`). + Hint: Additional commands need to be written without a leading `\` + (e.g. `foo` instead of `\foo`). ''; }; @@ -159,7 +196,8 @@ in { description = '' Allows extending the list of `\crefrange`-like commands. - Hint: Additional commands need to be written without a leading `\` (e. g. `foo` instead of `\foo`). + Hint: Additional commands need to be written without a leading `\` + (e.g. `foo` instead of `\foo`). ''; }; @@ -167,13 +205,16 @@ in { type = listOf (listOf str); default = []; description = '' - Allows associating a label definition command with a custom prefix. Consider, + Allows associating a label definition command with a custom prefix. + Consider, ``` \newcommand{\theorem}[1]{\label{theorem:#1}} \theorem{foo} ``` - Then setting `texlab.experimental.labelDefinitionPrefixes` to `[["theorem", "theorem:"]]` and adding "theorem" - to `texlab.experimental.labelDefinitionCommands` will make the server recognize the `theorem:foo` label. + Then setting `texlab.experimental.labelDefinitionPrefixes` to + `[["theorem", "theorem:"]]` and adding `theorem` to + `texlab.experimental.labelDefinitionCommands` will make the server + recognize the `theorem:foo` label. ''; }; @@ -195,7 +236,8 @@ in { baz = 314; }; description = '' - For any options that do not have options provided through nvf this can be used to add them. + For any options that do not have options provided through nvf this can + be used to add them. Options already declared in nvf config will NOT be overridden. Options will be placed in: @@ -218,10 +260,12 @@ in { enable = mkBool false '' Whether to enable forward search. - Enable this option if you want to have the compiled document appear in your chosen PDF viewer. + Enable this option if you want to have the compiled document appear in + your chosen PDF viewer. For some options see [here](https://github.com/latex-lsp/texlab/wiki/Previewing). - Note this is not all the options, but can act as a guide to help you along with custom configs. + Note this is not all the options, but can act as a guide to help you + along with custom configs. ''; package = mkOption { @@ -239,7 +283,8 @@ in { type = str; default = cfg.pdfViewer.executable; description = '' - Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. + Defines the executable of the PDF previewer. The previewer needs to + support SyncTeX. By default it is set to the executable of the pdfViewer option. ''; @@ -249,28 +294,37 @@ in { type = listOf str; default = cfg.pdfViewer.args; description = '' - Defines additional arguments that are passed to the configured previewer to perform the forward search. - The placeholders %f, %p, %l will be replaced by the server. + Defines additional arguments that are passed to the configured + previewer to perform the forward search. + The placeholders `%f`, `%p`, `%l` will be replaced by the server. By default it is set to the args of the pdfViewer option. Placeholders: - - %f: The path of the current TeX file. - - %p: The path of the current PDF file. - - %l: The current line number. + - `%f`: The path of the current TeX file. + - `%p`: The path of the current PDF file. + - `%l`: The current line number. ''; }; }; formatter = { formatterLineLength = mkOption { - type = ints.positive; + type = ints.unsigned; default = 80; - description = "Defines the maximum amount of characters per line (0 = disable) when formatting BibTeX files."; + description = '' + Defines the maximum amount of characters per line when formatting + BibTeX files. + + Setting this value to 0 will disable this option. + ''; }; bibtexFormatter = mkOption { - type = enum ["texlab" "latexindent"]; + type = enum [ + "texlab" + "latexindent" + ]; default = "texlab"; description = '' Defines the formatter to use for BibTeX formatting. @@ -279,7 +333,10 @@ in { }; latexFormatter = mkOption { - type = enum ["texlab" "latexindent"]; + type = enum [ + "texlab" + "latexindent" + ]; default = "latexindent"; description = '' Defines the formatter to use for LaTeX formatting. @@ -290,14 +347,23 @@ in { }; inlayHints = { - labelDefinitions = mkBool true "When enabled, the server will return inlay hints for `\\label`-like commands."; + labelDefinitions = mkBool true '' + When enabled, the server will return inlay hints for `\label`-like + commands. + ''; - labelReferences = mkBool true "When enabled, the server will return inlay hints for `\\ref``-like commands."; + labelReferences = mkBool true '' + When enabled, the server will return inlay hints for `\ref`-like + commands. + ''; maxLength = mkOption { type = nullOr ints.positive; default = null; - description = "When set, the server will truncate the text of the inlay hints to the specified length."; + description = '' + When set, the server will truncate the text of the inlay hints to the + specified length. + ''; }; }; @@ -307,25 +373,33 @@ in { default = null; description = '' Defines the path of a file containing the latexindent configuration. - This corresponds to the --local=file.yaml flag of latexindent. - By default the configuration inside the project root directory is used. + This corresponds to the `--local=file.yaml` flag of latexindent. + By default the configuration inside the project root directory is + used. ''; }; modifyLineBreaks = mkBool false '' - Modifies linebreaks before, during, and at the end of code blocks when formatting with latexindent. - This corresponds to the --modifylinebreaks flag of latexindent. + Modifies linebreaks before, during, and at the end of code blocks when + formatting with latexindent. + This corresponds to the `--modifylinebreaks` flag of latexindent. ''; replacement = mkOption { - type = nullOr (enum ["-r" "-rv" "-rr"]); + type = nullOr (enum [ + "-r" + "-rv" + "-rr" + ]); default = null; description = '' - Defines an additional replacement flag that is added when calling latexindent. This can be one of the following: - - "-r" - - "-rv" - - "-rr" - - null + Defines an additional replacement flag that is added when calling + latexindent. + This can be one of the following: + - `-r` + - `-rv` + - `-rr` + - `null` By default no replacement flag is passed. ''; }; @@ -338,15 +412,18 @@ in { type = listOf str; default = []; description = '' - A list of regular expressions used to filter the list of reported document symbols. - If specified, only symbols that match at least one of the specified patterns are sent to the client. - Symbols are filtered recursively so nested symbols can still be sent to the client even though the - parent node is removed from the results. + A list of regular expressions used to filter the list of reported + document symbols. + If specified, only symbols that match at least one of the specified + patterns are sent to the client. + Symbols are filtered recursively so nested symbols can still be sent + to the client even though the parent node is removed from the results. See also `texlab.symbols.ignoredPatterns`. - Hint: If both allowedPatterns and ignoredPatterns are set, then allowed patterns are applied first. - Afterwards, the results are filtered with the ignored patterns. + Hint: If both `allowedPatterns` and `ignoredPatterns` are set, then + allowed patterns are applied first. Afterwards, the results are + filtered with the ignored patterns. ''; }; @@ -354,8 +431,10 @@ in { type = listOf str; default = []; description = '' - A list of regular expressions used to filter the list of reported document symbols. - If specified, only symbols that match none of the specified patterns are sent to the client. + A list of regular expressions used to filter the list of reported + document symbols. + If specified, only symbols that match none of the specified patterns + are sent to the client. See also `texlab.symbols.allowedPatterns`. ''; @@ -371,10 +450,14 @@ in { displayName = mkOption { type = nullOr str; default = null; - description = "The name shown in the document symbols. Defaults to the value of `name`."; + description = '' + The name shown in the document symbols. + Defaults to the value of `name`. + ''; }; label = mkBool false '' - If set, the server will try to match a label to environment and append its number. + If set to `true`, the server will try to match a label to + environment and append its number. ''; }; }); @@ -387,9 +470,10 @@ in { } ]; description = '' - A list of objects that allows extending the list of environments that are part of the document symbols. + A list of objects that allows extending the list of environments that + are part of the document symbols. - See also texlab.symbols.allowedPatterns. + See also `texlab.symbols.allowedPatterns`. Type: listOf submodule: - name: @@ -402,11 +486,12 @@ in { - default: - label: - type: boolean - - description: If set, the server will try to match a label to environment and append its number. + - description: If set, the server will try to match a label to + environment and append its number. - default: false - Note: This functionality may not be working, please follow https://github.com/latex-lsp/texlab/pull/1311 - for status updates. + Note: This functionality may not be working, please follow + https://github.com/latex-lsp/texlab/pull/1311 for status updates. ''; }; }; diff --git a/modules/plugins/languages/tex/pdfViewer/custom.nix b/modules/plugins/languages/tex/pdfViewer/custom.nix index 189663fe..7b8a9de4 100644 --- a/modules/plugins/languages/tex/pdfViewer/custom.nix +++ b/modules/plugins/languages/tex/pdfViewer/custom.nix @@ -9,8 +9,8 @@ # The viewer template template = import ./viewerTemplate.nix; - inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) package str listOf; + inherit (lib.options) mkOption mkEnableOption mkPackageOption; + inherit (lib.types) str listOf; in ( template { inherit name moduleInheritancePackage; @@ -18,10 +18,8 @@ in ( options = { enable = mkEnableOption "enable using a custom pdf viewer."; - package = mkOption { - type = package; - example = pkgs.okular; - description = "custom viewer package"; + package = mkPackageOption pkgs "okular" { + extraDescription = "custom viewer package"; }; executable = mkOption { @@ -32,7 +30,10 @@ in ( args = mkOption { type = listOf str; - example = ["--unique" "file:%p#src:%l%f"]; + example = [ + "--unique" + "file:%p#src:%l%f" + ]; description = "Arguments to pass to the viewer."; }; }; diff --git a/modules/plugins/languages/tex/pdfViewer/okular.nix b/modules/plugins/languages/tex/pdfViewer/okular.nix index e341fa4d..0c3d7f8d 100644 --- a/modules/plugins/languages/tex/pdfViewer/okular.nix +++ b/modules/plugins/languages/tex/pdfViewer/okular.nix @@ -9,8 +9,8 @@ # The viewer template template = import ./viewerTemplate.nix; - inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) package str listOf; + inherit (lib.options) mkOption mkEnableOption mkPackageOption; + inherit (lib.types) str listOf; in ( template { inherit name moduleInheritancePackage; @@ -18,11 +18,7 @@ in ( options = { enable = mkEnableOption "enable okular as the pdf file previewer."; - package = mkOption { - type = package; - default = pkgs.okular; - description = "okular package"; - }; + package = mkPackageOption pkgs "okular" {}; executable = mkOption { type = str; @@ -32,7 +28,10 @@ in ( args = mkOption { type = listOf str; - default = ["--unique" "file:%p#src:%l%f"]; + default = [ + "--unique" + "file:%p#src:%l%f" + ]; description = "Arguments to pass to the viewer."; }; }; diff --git a/modules/plugins/languages/tex/pdfViewer/qpdfview.nix b/modules/plugins/languages/tex/pdfViewer/qpdfview.nix index ef294bcf..1938fb94 100644 --- a/modules/plugins/languages/tex/pdfViewer/qpdfview.nix +++ b/modules/plugins/languages/tex/pdfViewer/qpdfview.nix @@ -9,8 +9,8 @@ # The viewer template template = import ./viewerTemplate.nix; - inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) package str listOf; + inherit (lib.options) mkOption mkEnableOption mkPackageOption; + inherit (lib.types) str listOf; in ( template { inherit name moduleInheritancePackage; @@ -18,11 +18,7 @@ in ( options = { enable = mkEnableOption "enable qpdfview as the pdf file previewer."; - package = mkOption { - type = package; - default = pkgs.qpdfview; - description = "qpdfview package"; - }; + package = mkPackageOption pkgs "qpdfview" {}; executable = mkOption { type = str; @@ -32,7 +28,10 @@ in ( args = mkOption { type = listOf str; - default = ["--unique" "%p#src:%f:%l:1"]; + default = [ + "--unique" + "%p#src:%f:%l:1" + ]; description = "Arguments to pass to the viewer."; }; }; diff --git a/modules/plugins/languages/tex/pdfViewer/sioyek.nix b/modules/plugins/languages/tex/pdfViewer/sioyek.nix index a4c647b1..ad0b4943 100644 --- a/modules/plugins/languages/tex/pdfViewer/sioyek.nix +++ b/modules/plugins/languages/tex/pdfViewer/sioyek.nix @@ -9,20 +9,16 @@ # The viewer template template = import ./viewerTemplate.nix; - inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) package str listOf; + inherit (lib.options) mkOption mkEnableOption mkPackageOption; + inherit (lib.types) str listOf; in ( template { inherit name moduleInheritancePackage; options = { - enable = mkEnableOption "enable sioyek as the pdf file previewer."; + enable = mkEnableOption "sioyek as the pdf file previewer."; - package = mkOption { - type = package; - default = pkgs.sioyek; - description = "sioyek package"; - }; + package = mkPackageOption pkgs "sioyek" {}; executable = mkOption { type = str; @@ -47,9 +43,9 @@ in ( description = '' Arguments to pass to the viewer. - By default, this is the only viewer that supports the inverse search feature by - command line arguments and doesn't explicitly require extra tinkering else where - in your config. + By default, this is the only viewer that supports the inverse search + feature by command line arguments and doesn't explicitly require extra + tinkering else where in your config. ''; }; }; diff --git a/modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix b/modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix index dd81b7a4..72c52877 100644 --- a/modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix +++ b/modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix @@ -56,7 +56,8 @@ in { opts) options; - # Check that the language and this pdf viewer have been enabled before making any config. + # Check that the language and this pdf viewer have been enabled before making + # any config. config = mkIf (cfg.enable && viewerCfg.enable) { vim.languages.tex.pdfViewer = { inherit name; diff --git a/modules/plugins/languages/tex/pdfViewer/zathura.nix b/modules/plugins/languages/tex/pdfViewer/zathura.nix index 99d95498..f1fd16d5 100644 --- a/modules/plugins/languages/tex/pdfViewer/zathura.nix +++ b/modules/plugins/languages/tex/pdfViewer/zathura.nix @@ -9,8 +9,8 @@ # The viewer template template = import ./viewerTemplate.nix; - inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) package str listOf; + inherit (lib.options) mkOption mkEnableOption mkPackageOption; + inherit (lib.types) str listOf; in ( template { inherit name moduleInheritancePackage; @@ -18,11 +18,7 @@ in ( options = { enable = mkEnableOption "enable zathura as the pdf file previewer."; - package = mkOption { - type = package; - default = pkgs.zathura; - description = "zathura package"; - }; + package = mkPackageOption pkgs "zathura" {}; executable = mkOption { type = str; @@ -32,7 +28,11 @@ in ( args = mkOption { type = listOf str; - default = ["--synctex-forward" "%l:1:%f" "%p"]; + default = [ + "--synctex-forward" + "%l:1:%f" + "%p" + ]; description = "Arguments to pass to the viewer."; }; }; diff --git a/modules/plugins/languages/tex/treesitter.nix b/modules/plugins/languages/tex/treesitter.nix index 98185ba8..fcebaa99 100644 --- a/modules/plugins/languages/tex/treesitter.nix +++ b/modules/plugins/languages/tex/treesitter.nix @@ -4,22 +4,17 @@ lib, ... }: let - # inherit (lib.options) mkEnableOption; inherit (lib.modules) mkIf mkMerge; inherit (lib.nvim.types) mkGrammarOption mkEnableTreesitterOption; cfg = config.vim.languages.tex; - - # mkEnableTreesitterOption = description: mkEnableOption description // {default = config.vim.languages.enableTreesitter;}; in { options.vim.languages.tex.treesitter = { latex = { - # enable = mkEnableTreesitterOption "Whether to enable Latex treesitter"; enable = mkEnableTreesitterOption config "latex"; package = mkGrammarOption pkgs "latex"; }; bibtex = { - # enable = mkEnableTreesitterOption "Whether to enable Bibtex treesitter"; enable = mkEnableTreesitterOption config "bibtex"; package = mkGrammarOption pkgs "bibtex"; }; From c440ba58261caccd33b677c7965a3f82cbf4be4d Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Tue, 11 Feb 2025 21:28:17 -0700 Subject: [PATCH 66/76] Utilized lib.optionalAttrs to simplify code --- modules/plugins/languages/tex/lsp/texlab.nix | 99 +++++++++----------- 1 file changed, 42 insertions(+), 57 deletions(-) diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index 07c64aab..963d280a 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -5,6 +5,7 @@ ... }: let inherit (builtins) isString map; + inherit (lib) optionalAttrs; inherit (lib.modules) mkIf mkMerge; inherit (lib.nvim.config) mkBool; inherit (lib.options) mkOption mkPackageOption; @@ -529,70 +530,54 @@ in { } # # -- Build -- - // ( - if cfg.build.enable - then { - build = { - inherit - (cfg.build) - onSave - useFileList - auxDirectory - logDirectory - pdfDirectory - filename - forwardSearchAfter - ; - inherit (builderCfg) args; - executable = "${builderCfg.package}/bin/${builderCfg.executable}"; - }; - } - else {} - ) + // (optionalAttrs cfg.build.enable { + build = { + inherit + (cfg.build) + onSave + useFileList + auxDirectory + logDirectory + pdfDirectory + filename + forwardSearchAfter + ; + inherit (builderCfg) args; + executable = "${builderCfg.package}/bin/${builderCfg.executable}"; + }; + }) # # -- Chktex -- - // ( - if texlabCfg.chktex.enable - then { - chktex = { - inherit (texlabCfg.chktex) onOpenAndSave onEdit additionalArgs; - }; - } - else {} - ) + // (optionalAttrs texlabCfg.chktex.enable { + chktex = { + inherit (texlabCfg.chktex) onOpenAndSave onEdit additionalArgs; + }; + }) # # -- Forward Search -- - // ( - if texlabCfg.forwardSearch.enable - then { - forwardSearch = { - inherit (texlabCfg.forwardSearch) args; - executable = "${texlabCfg.forwardSearch.package}/bin/${texlabCfg.forwardSearch.executable}"; - }; - } - else {} - ) + // (optionalAttrs texlabCfg.forwardSearch.enable { + forwardSearch = { + inherit (texlabCfg.forwardSearch) args; + executable = "${texlabCfg.forwardSearch.package}/bin/${texlabCfg.forwardSearch.executable}"; + }; + }) # # -- Symbols -- - // ( - if texlabCfg.symbols.enable - then { - symbols = { - inherit (texlabCfg.symbols) allowedPatterns ignoredPatterns; + // (optionalAttrs texlabCfg.symbols.enable { + symbols = { + inherit (texlabCfg.symbols) allowedPatterns ignoredPatterns; - customEnvironments = - map (x: { - inherit (x) name label; - displayName = - if isString x.displayName - then x.displayName - else x.name; - }) - texlabCfg.symbols.customEnvironments; - }; - } - else {} - ) + customEnvironments = + map (x: { + inherit (x) name label; + displayName = + if isString x.displayName + then x.displayName + else x.name; + }) + texlabCfg.symbols.customEnvironments; + }; + }) # # -- Extra Settings -- // texlabCfg.extraLuaSettings From 2a55d0f0a45f25338082882871ed19a52853931c Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Tue, 11 Feb 2025 21:30:44 -0700 Subject: [PATCH 67/76] Added comment explaining why code is structured as it is --- modules/plugins/languages/tex/build/builders/latexmk.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/plugins/languages/tex/build/builders/latexmk.nix b/modules/plugins/languages/tex/build/builders/latexmk.nix index 8872f3dd..bbb4ecd5 100644 --- a/modules/plugins/languages/tex/build/builders/latexmk.nix +++ b/modules/plugins/languages/tex/build/builders/latexmk.nix @@ -44,6 +44,8 @@ in ( }; }; + # Optional flags must come before the base args because of how the latexmk + # command works args = builderCfg: ( # Flags (optionals builderCfg.pdfOutput ["-pdf"]) From 0b6cf496d1a3ca3f3d6976e123ba3abb62ce52b5 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Wed, 12 Feb 2025 01:03:07 -0700 Subject: [PATCH 68/76] Cleaned up tectonic args processing --- .../languages/tex/build/builders/tectonic.nix | 105 +++++++++++++----- 1 file changed, 78 insertions(+), 27 deletions(-) diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix b/modules/plugins/languages/tex/build/builders/tectonic.nix index ed1e8edb..bdacd1e2 100644 --- a/modules/plugins/languages/tex/build/builders/tectonic.nix +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix @@ -14,7 +14,14 @@ inherit (lib.options) mkOption mkEnableOption mkPackageOption; inherit (lib.types) enum ints listOf str nullOr; inherit (lib.nvim.config) mkBool; - inherit (builtins) concatLists elem map toString; + inherit (builtins) concatLists elem map toString attrNames filter isList; + + notNull = x: x != null; + forceCheck = x: true; + toList = x: + if isList x + then x + else [x]; cfg = config.vim.languages.tex; in ( @@ -148,31 +155,75 @@ in ( }; }; - args = builderCfg: ( - # Base args - [ - "-X" - "compile" - "%f" - ] - # Flags - ++ (optionals builderCfg.keepIntermediates ["--keep-intermediates"]) - ++ (optionals builderCfg.keepLogs ["--keep-logs"]) - ++ (optionals builderCfg.onlyCached ["--only-cached"]) - ++ (optionals builderCfg.synctex ["--synctex"]) - ++ (optionals builderCfg.untrustedInput ["--untrusted"]) - # Options - ++ (optionals (builderCfg.reruns > 0) ["--reruns" "${toString builderCfg.reruns}"]) - ++ (optionals (builderCfg.bundle != null) ["--bundle" "${toString builderCfg.bundle}"]) - ++ (optionals (builderCfg.webBundle != null) ["--web-bundle" "${toString builderCfg.webBundle}"]) - ++ (optionals (builderCfg.outfmt != null) ["--outfmt" "${toString builderCfg.outfmt}"]) - ++ (concatLists (map (x: ["--hide" x]) builderCfg.hidePaths)) - ++ (optionals (builderCfg.format != null) ["--format" "${toString builderCfg.format}"]) - ++ (optionals (builderCfg.color != null) ["--color" "${toString builderCfg.color}"]) - # Still options but these are not defined by builder specific options but - # instead synchronize options between the global build options and builder - # specific options - ++ (optionals (!(elem cfg.build.pdfDirectory ["." ""])) ["--outdir" "${cfg.build.pdfDirectory}"]) - ); + # args = builderCfg: ( + # # Base args + # [ + # "-X" + # "compile" + # "%f" + # ] + # # Flags + # ++ (optionals builderCfg.keepIntermediates ["--keep-intermediates"]) + # ++ (optionals builderCfg.keepLogs ["--keep-logs"]) + # ++ (optionals builderCfg.onlyCached ["--only-cached"]) + # ++ (optionals builderCfg.synctex ["--synctex"]) + # ++ (optionals builderCfg.untrustedInput ["--untrusted"]) + # # Options + # ++ (optionals (builderCfg.reruns > 0) ["--reruns" "${toString builderCfg.reruns}"]) + # ++ (optionals (builderCfg.bundle != null) ["--bundle" "${toString builderCfg.bundle}"]) + # ++ (optionals (builderCfg.webBundle != null) ["--web-bundle" "${toString builderCfg.webBundle}"]) + # ++ (optionals (builderCfg.outfmt != null) ["--outfmt" "${toString builderCfg.outfmt}"]) + # ++ (concatLists (map (x: ["--hide" x]) builderCfg.hidePaths)) + # ++ (optionals (builderCfg.format != null) ["--format" "${toString builderCfg.format}"]) + # ++ (optionals (builderCfg.color != null) ["--color" "${toString builderCfg.color}"]) + # # Still options but these are not defined by builder specific options but + # # instead synchronize options between the global build options and builder + # # specific options + # ++ (optionals (!(elem cfg.build.pdfDirectory ["." ""])) ["--outdir" "${cfg.build.pdfDirectory}"]) + # ); + + args = builderCfg: let + option = setCheck: flag: {inherit setCheck flag;}; + args = { + baseArgs = ["-X" "compile" "%f"]; + + flags = { + keepIntermediates = "--keep-intermediates"; + keepLogs = "--keep-logs"; + onlyCached = "--only-cached"; + synctex = "--synctex"; + untrustedInput = "--untrusted"; + }; + + options = { + reruns = option (x: x > 0) "--reruns"; + bundle = option notNull "--bundle"; + webBundle = option notNull "--web-bundle"; + outfmt = option notNull "--outfmt"; + format = option notNull "--format"; + color = option notNull "--color"; + hidePaths = option forceCheck "--hide"; + }; + + externalOptions = concatLists [ + (optionals (!(elem cfg.build.pdfDirectory ["." ""])) ["--outdir" "${cfg.build.pdfDirectory}"]) + ]; + }; + + flags = map (flag: args.flags.${flag}) (filter (flag: builderCfg.${flag}) (attrNames args.flags)); + options = let + getOptionFlagsList = opt: + concatLists ( + map + (y: [args.options."${opt}".flag "${toString y}"]) + (toList builderCfg."${opt}") + ); + processOption = opt: + optionals + (args.options."${opt}".setCheck builderCfg."${opt}") + (getOptionFlagsList opt); + in (concatLists (map processOption (attrNames args.options))); + in + concatLists (with args; [baseArgs flags options externalOptions]); } ) From cc5e7c9730cac8b96c15f537746943406c92afaf Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Wed, 12 Feb 2025 01:07:42 -0700 Subject: [PATCH 69/76] Reword doc description --- modules/plugins/languages/tex/build/builders/tectonic.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix b/modules/plugins/languages/tex/build/builders/tectonic.nix index bdacd1e2..fb0a187d 100644 --- a/modules/plugins/languages/tex/build/builders/tectonic.nix +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix @@ -81,8 +81,8 @@ in ( type = nullOr str; default = null; description = '' - Use this directory or Zip-format bundle file to find resource files - instead of the default. + The directory or Zip-format bundle file to find resource files instead + of the default. ''; }; From 91a3f67a9e6d3d557849d4a3708daeb2b8df559a Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Wed, 12 Feb 2025 01:17:32 -0700 Subject: [PATCH 70/76] Altered mkEnableTreesitterOption functionallity to take in a boolean instead of all of config --- lib/types/languages.nix | 4 ++-- modules/plugins/languages/tex/treesitter.nix | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/types/languages.nix b/lib/types/languages.nix index 29639047..5e935159 100644 --- a/lib/types/languages.nix +++ b/lib/types/languages.nix @@ -33,10 +33,10 @@ default = ["vimPlugins" "nvim-treesitter" "builtGrammars" grammar]; }; - mkEnableTreesitterOption = config: language: + mkEnableTreesitterOption = defaultCondition: language: mkOption { type = bool; - default = config.vim.languages.enableTreesitter; + default = defaultCondition; description = "Whether to enable ${language} treesitter"; }; in { diff --git a/modules/plugins/languages/tex/treesitter.nix b/modules/plugins/languages/tex/treesitter.nix index fcebaa99..d9c3754b 100644 --- a/modules/plugins/languages/tex/treesitter.nix +++ b/modules/plugins/languages/tex/treesitter.nix @@ -5,17 +5,19 @@ ... }: let inherit (lib.modules) mkIf mkMerge; - inherit (lib.nvim.types) mkGrammarOption mkEnableTreesitterOption; + inherit (lib.nvim.types) mkGrammarOption; + + mkEnableTreesitterOption = lib.nvim.types.mkEnableTreesitterOption config.vim.languages.enableTreesitter; cfg = config.vim.languages.tex; in { options.vim.languages.tex.treesitter = { latex = { - enable = mkEnableTreesitterOption config "latex"; + enable = mkEnableTreesitterOption "latex"; package = mkGrammarOption pkgs "latex"; }; bibtex = { - enable = mkEnableTreesitterOption config "bibtex"; + enable = mkEnableTreesitterOption "bibtex"; package = mkGrammarOption pkgs "bibtex"; }; }; From cafa0a1661395de8122946efbed8422fec16eec8 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Mon, 17 Feb 2025 17:33:24 -0700 Subject: [PATCH 71/76] Changed the new-file-template-nvim npin to the fork that adds escaping newline characters to support tex templates properly --- npins/sources.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index d6fb562f..8472bb77 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1266,13 +1266,13 @@ "type": "Git", "repository": { "type": "GitHub", - "owner": "otavioschwanck", + "owner": "isaacST08", "repo": "new-file-template.nvim" }, - "branch": "main", - "revision": "6ac66669dbf2dc5cdee184a4fe76d22465ca67e8", - "url": "https://github.com/otavioschwanck/new-file-template.nvim/archive/6ac66669dbf2dc5cdee184a4fe76d22465ca67e8.tar.gz", - "hash": "0c7378c3w6bniclp666rq15c28akb0sjy58ayva0wpyin4k26hl3" + "branch": "master", + "revision": "dc3a58b1f490c86075c96670b9eb81370c2f2ca1", + "url": "https://github.com/isaacST08/new-file-template.nvim/archive/dc3a58b1f490c86075c96670b9eb81370c2f2ca1.tar.gz", + "hash": "0y6ip3k6bjaf32x1y1p6mmkwwdi71yvwr6klr26m252jrg8352pf" }, "noice-nvim": { "type": "Git", @@ -2068,4 +2068,4 @@ } }, "version": 3 -} \ No newline at end of file +} From 6be82071a489dd15b91fb56d23e1878732c4a2d7 Mon Sep 17 00:00:00 2001 From: isaacST08 <106057977+isaacST08@users.noreply.github.com> Date: Fri, 7 Mar 2025 12:19:14 -0700 Subject: [PATCH 72/76] Fixed missing mkOption function call in tectonic.nix --- modules/plugins/languages/tex/build/builders/tectonic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix b/modules/plugins/languages/tex/build/builders/tectonic.nix index fb0a187d..13bab492 100644 --- a/modules/plugins/languages/tex/build/builders/tectonic.nix +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix @@ -143,7 +143,7 @@ in ( description = "Enable/disable colorful log output"; }; - extraOptions = { + extraOptions = mkOption { type = listOf str; default = []; description = '' From fa55d3a7665b7f8dab14d15485af5d6f8d928840 Mon Sep 17 00:00:00 2001 From: isaacST08 <106057977+isaacST08@users.noreply.github.com> Date: Fri, 7 Mar 2025 12:29:01 -0700 Subject: [PATCH 73/76] Fixed typo in default.nix --- modules/plugins/languages/tex/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/languages/tex/default.nix b/modules/plugins/languages/tex/default.nix index e427f8a3..7b1df4cd 100644 --- a/modules/plugins/languages/tex/default.nix +++ b/modules/plugins/languages/tex/default.nix @@ -47,7 +47,7 @@ in { flavor = mkOption { type = enum [ "plaintex" - "contex" + "context" "tex" ]; default = "plaintex"; From 9a9c3b9e54cfa408366b00473152fc956c32a106 Mon Sep 17 00:00:00 2001 From: isaacST08 <106057977+isaacST08@users.noreply.github.com> Date: Fri, 7 Mar 2025 12:31:14 -0700 Subject: [PATCH 74/76] Fixed typo in tectonic.nix --- modules/plugins/languages/tex/build/builders/tectonic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/languages/tex/build/builders/tectonic.nix b/modules/plugins/languages/tex/build/builders/tectonic.nix index 13bab492..6c680cff 100644 --- a/modules/plugins/languages/tex/build/builders/tectonic.nix +++ b/modules/plugins/languages/tex/build/builders/tectonic.nix @@ -60,7 +60,7 @@ in ( ''; synctex = mkBool true "Whether to generate SyncTeX data"; untrustedInput = mkBool false '' - Whether to diable all known-insecure features if the input is untrusted + Whether to disable all known-insecure features if the input is untrusted ''; # -- Options -- From 230d216cb35051fe5f3aed59200b012551d16af1 Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Mon, 10 Mar 2025 10:00:26 -0600 Subject: [PATCH 75/76] Started work to resolve infrec error --- .../languages/tex/pdfViewer/default.nix | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/modules/plugins/languages/tex/pdfViewer/default.nix b/modules/plugins/languages/tex/pdfViewer/default.nix index 18d5bd58..6d6dcd7e 100644 --- a/modules/plugins/languages/tex/pdfViewer/default.nix +++ b/modules/plugins/languages/tex/pdfViewer/default.nix @@ -5,7 +5,15 @@ }: let defaultPdfViewerName = "okular"; - inherit (builtins) filter isAttrs hasAttr attrNames length elemAt; + inherit + (builtins) + filter + isAttrs + hasAttr + attrNames + length + elemAt + ; inherit (lib.modules) mkIf; inherit (lib.options) mkOption; inherit (lib.types) str package listOf; @@ -24,13 +32,9 @@ pdfViewerNamesList ? ( filter ( x: let - y = viewerCfg.${x}; + y = viewerCfg."${x}"; in ( - isAttrs y - && hasAttr "enable" y - && hasAttr "package" y - && hasAttr "executable" y - && hasAttr "args" y + isAttrs y && hasAttr "enable" y && hasAttr "package" y && hasAttr "executable" y && hasAttr "args" y ) ) (attrNames viewerCfg) ), @@ -40,7 +44,7 @@ currentPdfViewerName = elemAt pdfViewerNamesList index; # Get the current pdf viewer object - currentPdfViewer = viewerCfg.${currentPdfViewerName}; + currentPdfViewer = viewerCfg."${currentPdfViewerName}"; # Get the index that will be used for the next iteration nextIndex = index + 1; @@ -77,7 +81,7 @@ }; in (getEnabledPdfViewersInfo {}); - enabledPdfViewerCfg = viewerCfg.${enabledPdfViewersInfo.enabledViewerName}; + enabledPdfViewerCfg = viewerCfg."${enabledPdfViewersInfo.enabledViewerName}"; in { imports = [ ./custom.nix From 664b27cb2c64d854facc022740c11540fb4e378c Mon Sep 17 00:00:00 2001 From: isaacST08 Date: Sat, 3 May 2025 18:51:58 -0600 Subject: [PATCH 76/76] Refactored pdfViewer and fixed infrec error --- modules/plugins/languages/tex/default.nix | 3 +- modules/plugins/languages/tex/lsp/default.nix | 12 +- modules/plugins/languages/tex/lsp/texlab.nix | 9 +- .../languages/tex/pdfViewer/custom.nix | 43 ---- .../languages/tex/pdfViewer/default.nix | 208 +++++++----------- .../tex/pdfViewer/getEnabledPdfViewer.nix | 22 ++ .../languages/tex/pdfViewer/okular.nix | 41 ---- .../tex/pdfViewer/premadePdfViewers.nix | 80 +++++++ .../languages/tex/pdfViewer/qpdfview.nix | 41 ---- .../languages/tex/pdfViewer/sioyek.nix | 55 ----- .../tex/pdfViewer/viewerTemplate.nix | 68 ------ .../languages/tex/pdfViewer/zathura.nix | 42 ---- 12 files changed, 194 insertions(+), 430 deletions(-) delete mode 100644 modules/plugins/languages/tex/pdfViewer/custom.nix create mode 100644 modules/plugins/languages/tex/pdfViewer/getEnabledPdfViewer.nix delete mode 100644 modules/plugins/languages/tex/pdfViewer/okular.nix create mode 100644 modules/plugins/languages/tex/pdfViewer/premadePdfViewers.nix delete mode 100644 modules/plugins/languages/tex/pdfViewer/qpdfview.nix delete mode 100644 modules/plugins/languages/tex/pdfViewer/sioyek.nix delete mode 100644 modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix delete mode 100644 modules/plugins/languages/tex/pdfViewer/zathura.nix diff --git a/modules/plugins/languages/tex/default.nix b/modules/plugins/languages/tex/default.nix index 7b1df4cd..7dbe7e3a 100644 --- a/modules/plugins/languages/tex/default.nix +++ b/modules/plugins/languages/tex/default.nix @@ -44,6 +44,7 @@ in { `vim.g.tex_flavor = ` line from your lua config entirely (unless you manually set it elsewhere of course). ''; + flavor = mkOption { type = enum [ "plaintex" @@ -71,7 +72,7 @@ in { config = mkIf cfg.enable (mkMerge [ # Extra Lua config options (mkIf cfg.extraOpts.texFlavor.enable { - vim.globals.tex_flavor = "${cfg.extraOpts.texFlavor.flavor}"; + vim.globals.tex_flavor = lib.mkDefault "${cfg.extraOpts.texFlavor.flavor}"; }) ]); } diff --git a/modules/plugins/languages/tex/lsp/default.nix b/modules/plugins/languages/tex/lsp/default.nix index affb272a..244829d0 100644 --- a/modules/plugins/languages/tex/lsp/default.nix +++ b/modules/plugins/languages/tex/lsp/default.nix @@ -12,7 +12,13 @@ in { ./texlab.nix ]; - config = mkIf (cfg.enable && (any (x: x.enable) (attrValues cfg.lsp))) { - vim.lsp.lspconfig.enable = true; # Enable lspconfig when any of the lsps are enabled - }; + config = + mkIf + ( + cfg.enable # Check if nvf is enabled. + && (any (x: x.enable) (attrValues cfg.lsp)) # Check if any of the LSPs have been enabled. + ) + { + vim.lsp.lspconfig.enable = lib.mkDefault true; # Enable lspconfig when any of the lsps are enabled + }; } diff --git a/modules/plugins/languages/tex/lsp/texlab.nix b/modules/plugins/languages/tex/lsp/texlab.nix index 963d280a..339fb40c 100644 --- a/modules/plugins/languages/tex/lsp/texlab.nix +++ b/modules/plugins/languages/tex/lsp/texlab.nix @@ -26,6 +26,9 @@ cfg = config.vim.languages.tex; texlabCfg = cfg.lsp.texlab; builderCfg = cfg.build.builder; + + # Get the enabled pdf viewer. + pdfViewer = import ../pdfViewer/getEnabledPdfViewer.nix {inherit lib config;}; in { options.vim.languages.tex.lsp.texlab = { enable = mkBool config.vim.languages.enableLSP '' @@ -271,7 +274,7 @@ in { package = mkOption { type = package; - default = cfg.pdfViewer.package; + default = pdfViewer.package; description = '' The package to use as your PDF viewer. This viewer needs to support Synctex. @@ -282,7 +285,7 @@ in { executable = mkOption { type = str; - default = cfg.pdfViewer.executable; + default = pdfViewer.executable; description = '' Defines the executable of the PDF previewer. The previewer needs to support SyncTeX. @@ -293,7 +296,7 @@ in { args = mkOption { type = listOf str; - default = cfg.pdfViewer.args; + default = pdfViewer.args; description = '' Defines additional arguments that are passed to the configured previewer to perform the forward search. diff --git a/modules/plugins/languages/tex/pdfViewer/custom.nix b/modules/plugins/languages/tex/pdfViewer/custom.nix deleted file mode 100644 index 7b8a9de4..00000000 --- a/modules/plugins/languages/tex/pdfViewer/custom.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - pkgs, - lib, - ... -} @ moduleInheritancePackage: let - # The name of the pdf viewer - name = "custom"; - - # The viewer template - template = import ./viewerTemplate.nix; - - inherit (lib.options) mkOption mkEnableOption mkPackageOption; - inherit (lib.types) str listOf; -in ( - template { - inherit name moduleInheritancePackage; - - options = { - enable = mkEnableOption "enable using a custom pdf viewer."; - - package = mkPackageOption pkgs "okular" { - extraDescription = "custom viewer package"; - }; - - executable = mkOption { - type = str; - example = "okular"; - description = "The executable name to call the viewer."; - }; - - args = mkOption { - type = listOf str; - example = [ - "--unique" - "file:%p#src:%l%f" - ]; - description = "Arguments to pass to the viewer."; - }; - }; - - argsFunction = viewerCfg: (viewerCfg.args); - } -) diff --git a/modules/plugins/languages/tex/pdfViewer/default.nix b/modules/plugins/languages/tex/pdfViewer/default.nix index 6d6dcd7e..ffa946af 100644 --- a/modules/plugins/languages/tex/pdfViewer/default.nix +++ b/modules/plugins/languages/tex/pdfViewer/default.nix @@ -1,162 +1,104 @@ { config, lib, + pkgs, ... }: let - defaultPdfViewerName = "okular"; - - inherit - (builtins) - filter - isAttrs - hasAttr - attrNames - length - elemAt - ; - inherit (lib.modules) mkIf; inherit (lib.options) mkOption; inherit (lib.types) str package listOf; cfg = config.vim.languages.tex; - viewerCfg = cfg.pdfViewer; - enabledPdfViewersInfo = let - # This function will sort through the pdf viewer options and count how many - # pdf viewers have been enabled. - # If no viewers have been enabled, the count will be 0 and the name of the - # enabled viewer will be the default pdf viewer defined above. - getEnabledPdfViewersInfo = { - enabledPdfViewersCount ? 0, - index ? 0, - pdfViewerNamesList ? ( - filter ( - x: let - y = viewerCfg."${x}"; - in ( - isAttrs y && hasAttr "enable" y && hasAttr "package" y && hasAttr "executable" y && hasAttr "args" y - ) - ) (attrNames viewerCfg) - ), - currentEnabledPdfViewerName ? defaultPdfViewerName, - }: let - # Get the name of the current pdf viewer being checked if it is enabled - currentPdfViewerName = elemAt pdfViewerNamesList index; + pdfViewer = {name, ...}: { + options = { + enable = lib.mkEnableOption "${builtins.toString name} pdf viewer"; - # Get the current pdf viewer object - currentPdfViewer = viewerCfg."${currentPdfViewerName}"; + name = mkOption { + type = str; + example = "okular"; + description = '' + The name of the pdf viewer to use. - # Get the index that will be used for the next iteration - nextIndex = index + 1; + This value will be automatically set when any of the viewers are + enabled. - # Increment the count that is recording the number of enabled pdf viewers - # if this viewer is enabled, otherwise leave it as is. - newEnabledPdfViewersCount = - if currentPdfViewer.enable - then enabledPdfViewersCount + 1 - else enabledPdfViewersCount; + This value will be automatically set to the value of the parent + attribute set. ex. `...tex.pdfViewer..name = "$${name}"` + This value cannot and should not be changed to be different from this + parent value. - # If this pdf viewer is enabled, set is as the enabled viewer. - newEnabledPdfViewerName = - if currentPdfViewer.enable - then currentPdfViewerName - else currentEnabledPdfViewerName; - in - # Check that the end of the list of viewers has not been reached - if length pdfViewerNamesList > nextIndex - # If the end of the viewers list has not been reached, call the next iteration - # of the function to process the next viewer - then - getEnabledPdfViewersInfo { - inherit pdfViewerNamesList; - enabledPdfViewersCount = newEnabledPdfViewersCount; - index = nextIndex; - currentEnabledPdfViewerName = newEnabledPdfViewerName; - } - # If the end of the viewers list has been reached, then return the total number - # of viewers that have been enabled and the name of the last viewer that was enabled. - else { - count = newEnabledPdfViewersCount; - enabledViewerName = newEnabledPdfViewerName; + Default values already exist such as `...tex.pdfViewer.okular` but + you can override the default values or created completely custom + pdf viewers should you wish. + ''; }; - in (getEnabledPdfViewersInfo {}); - enabledPdfViewerCfg = viewerCfg."${enabledPdfViewersInfo.enabledViewerName}"; + package = mkOption { + type = package; + example = pkgs.kdePackages.okular; + description = "The package of the pdf viewer to use."; + }; + + executable = mkOption { + type = str; + default = "${builtins.toString name}"; + description = '' + The executable for the pdf viewer to use. + + It will be called as `/bin/`. + + By default, the name of the pdf viewer will be used. + ''; + }; + + args = mkOption { + type = listOf str; + default = []; + description = '' + The command line arguments to use when calling the pdf viewer command. + + These will be called as + `/bin/ ...`. + ''; + }; + }; + + # The name of the pdf viewer must be set to the parent attribute set name. + config.name = lib.mkForce name; + }; in { imports = [ - ./custom.nix - ./okular.nix - ./qpdfview.nix - ./sioyek.nix - ./zathura.nix + ./premadePdfViewers.nix ]; - options.vim.languages.tex.pdfViewer = { - name = mkOption { - type = str; - default = enabledPdfViewerCfg.name; - description = '' - The name of the pdf viewer to use. + options.vim.languages.tex.pdfViewer = mkOption { + type = with lib.types; attrsOf (submodule pdfViewer); + default = {}; + example = { + zathura.enable = true; - This value will be automatically set when any of the viewers are - enabled. - - Setting this option option manually is not recommended but can be used - for some very technical nix-ing. If you wish to use a custom viewer, - please use the `custom` entry provided under `viewers`. - ''; - }; - - package = mkOption { - type = package; - default = enabledPdfViewerCfg.package; - description = '' - The package of the pdf viewer to use. - - This value will be automatically set when any of the viewers are - enabled. - - Setting this option option manually is not recommended but can be used - for some very technical nix-ing. If you wish to use a custom viewer, - please use the `custom` entry provided under `viewers`. - ''; - }; - - executable = mkOption { - type = str; - default = enabledPdfViewerCfg.executable; - description = '' - The executable for the pdf viewer to use. - - This value will be automatically set when any of the viewers are - enabled. - - Setting this option option manually is not recommended but can be used - for some very technical nix-ing. If you wish to use a custom viewer, - please use the `custom` entry provided under `viewers`. - ''; - }; - - args = mkOption { - type = listOf str; - default = enabledPdfViewerCfg.args; - description = '' - The command line arguments to use when calling the pdf viewer command. - - This value will be automatically set when any of the viewers are - enabled. - - Setting this option option manually is not recommended but can be used - for some very technical nix-ing. If you wish to use a custom viewer, - please use the `custom` entry provided under `viewers`. - ''; + customOkular = { + enable = false; + package = pkgs.kdePackages.okular; + executable = "okular"; + args = [ + "--unique" + "file:%p#src:%l%f" + ]; + }; }; }; - config = mkIf (enabledPdfViewersInfo.count > 0) { + config = let + # List form of all pdf viewers. + pdfViewers = builtins.attrValues cfg.pdfViewer; + + countPdfViewers = viewers: (lib.lists.count (x: x.enable) viewers); + in { assertions = [ { - assertion = enabledPdfViewersInfo.count < 2; + # Assert that there is only one enabled pdf viewer. + assertion = (countPdfViewers pdfViewers) < 2; message = '' The nvf-tex-language implementation does not support having more than 1 pdf viewers enabled. diff --git a/modules/plugins/languages/tex/pdfViewer/getEnabledPdfViewer.nix b/modules/plugins/languages/tex/pdfViewer/getEnabledPdfViewer.nix new file mode 100644 index 00000000..e8790c84 --- /dev/null +++ b/modules/plugins/languages/tex/pdfViewer/getEnabledPdfViewer.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + ... +}: let + # The attribute set of pdf viewers in this configuration. + pdfViewers = config.vim.languages.tex.pdfViewer; + + # The list of pdf viewers in this configuration. + pdfViewersList = builtins.attrValues pdfViewers; + + # The list of enabled pdf viewers. + enabledPdfViewersList = builtins.filter (x: x.enable) pdfViewersList; + + # The number of enabled pdf viewers. + enabledPdfViewersCount = lib.lists.count (x: x.enable) pdfViewersList; +in + if (enabledPdfViewersCount == 0) + # Use the fallback if no pdf viewer was enabled. + then pdfViewers.fallback + # Otherwise get the first enabled viewer. + else builtins.head enabledPdfViewersList diff --git a/modules/plugins/languages/tex/pdfViewer/okular.nix b/modules/plugins/languages/tex/pdfViewer/okular.nix deleted file mode 100644 index 0c3d7f8d..00000000 --- a/modules/plugins/languages/tex/pdfViewer/okular.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - pkgs, - lib, - ... -} @ moduleInheritancePackage: let - # The name of the pdf viewer - name = "okular"; - - # The viewer template - template = import ./viewerTemplate.nix; - - inherit (lib.options) mkOption mkEnableOption mkPackageOption; - inherit (lib.types) str listOf; -in ( - template { - inherit name moduleInheritancePackage; - - options = { - enable = mkEnableOption "enable okular as the pdf file previewer."; - - package = mkPackageOption pkgs "okular" {}; - - executable = mkOption { - type = str; - default = "okular"; - description = "The executable name to call the viewer."; - }; - - args = mkOption { - type = listOf str; - default = [ - "--unique" - "file:%p#src:%l%f" - ]; - description = "Arguments to pass to the viewer."; - }; - }; - - argsFunction = viewerCfg: (viewerCfg.args); - } -) diff --git a/modules/plugins/languages/tex/pdfViewer/premadePdfViewers.nix b/modules/plugins/languages/tex/pdfViewer/premadePdfViewers.nix new file mode 100644 index 00000000..622a058e --- /dev/null +++ b/modules/plugins/languages/tex/pdfViewer/premadePdfViewers.nix @@ -0,0 +1,80 @@ +{ + pkgs, + lib, + ... +}: let + inherit (lib) mkDefault mkForce; + + mkPdfViewerDefaults = { + package, + executable, + args ? [], + }: { + package = mkDefault package; + executable = mkDefault executable; + args = mkDefault args; + }; +in { + config.vim.languages.tex.pdfViewer = { + okular = mkPdfViewerDefaults { + package = pkgs.kdePackages.okular; + executable = "okular"; + args = [ + "--unique" + "file:%p#src:%l%f" + ]; + }; + + sioyek = mkPdfViewerDefaults { + package = pkgs.sioyek; + executable = "sioyek"; + args = [ + "--reuse-window" + "--execute-command" + "toggle_synctex" + "--inverse-search" + "texlab inverse-search -i \"%%1\" -l %%2" + "--forward-search-file" + "%f" + "--forward-search-line" + "%l" + "%p" + ]; + }; + + qpdfview = mkPdfViewerDefaults { + package = pkgs.qpdfview; + executable = "qpdfview"; + args = [ + "--unique" + "%p#src:%f:%l:1" + ]; + }; + + zathura = mkPdfViewerDefaults { + package = pkgs.zathura; + executable = "zathura"; + args = [ + "--synctex-forward" + "%l:1:%f" + "%p" + ]; + }; + + # This is a special pdf viewer. It is force set to a basic and known + # working configuration of okular and is used where needed in the + # rest of the tex language configuration encase no other pdf viewer + # was enabled. + # It cannot be enabled on its own and exists purely as a fallback + # option for internal use. + fallback = { + enable = mkForce false; + package = mkForce pkgs.kdePackages.okular; + executable = mkForce "okular"; + args = mkForce [ + "--unique" + "file:%p#src:%l%f" + ]; + }; + }; +} diff --git a/modules/plugins/languages/tex/pdfViewer/qpdfview.nix b/modules/plugins/languages/tex/pdfViewer/qpdfview.nix deleted file mode 100644 index 1938fb94..00000000 --- a/modules/plugins/languages/tex/pdfViewer/qpdfview.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - pkgs, - lib, - ... -} @ moduleInheritancePackage: let - # The name of the pdf viewer - name = "qpdfview"; - - # The viewer template - template = import ./viewerTemplate.nix; - - inherit (lib.options) mkOption mkEnableOption mkPackageOption; - inherit (lib.types) str listOf; -in ( - template { - inherit name moduleInheritancePackage; - - options = { - enable = mkEnableOption "enable qpdfview as the pdf file previewer."; - - package = mkPackageOption pkgs "qpdfview" {}; - - executable = mkOption { - type = str; - default = "qpdfview"; - description = "The executable name to call the viewer."; - }; - - args = mkOption { - type = listOf str; - default = [ - "--unique" - "%p#src:%f:%l:1" - ]; - description = "Arguments to pass to the viewer."; - }; - }; - - argsFunction = viewerCfg: (viewerCfg.args); - } -) diff --git a/modules/plugins/languages/tex/pdfViewer/sioyek.nix b/modules/plugins/languages/tex/pdfViewer/sioyek.nix deleted file mode 100644 index ad0b4943..00000000 --- a/modules/plugins/languages/tex/pdfViewer/sioyek.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - pkgs, - lib, - ... -} @ moduleInheritancePackage: let - # The name of the pdf viewer - name = "sioyek"; - - # The viewer template - template = import ./viewerTemplate.nix; - - inherit (lib.options) mkOption mkEnableOption mkPackageOption; - inherit (lib.types) str listOf; -in ( - template { - inherit name moduleInheritancePackage; - - options = { - enable = mkEnableOption "sioyek as the pdf file previewer."; - - package = mkPackageOption pkgs "sioyek" {}; - - executable = mkOption { - type = str; - default = "sioyek"; - description = "The executable name to call the viewer."; - }; - - args = mkOption { - type = listOf str; - default = [ - "--reuse-window" - "--execute-command" - "toggle_synctex" - "--inverse-search" - "texlab inverse-search -i \"%%1\" -l %%2" - "--forward-search-file" - "%f" - "--forward-search-line" - "%l" - "%p" - ]; - description = '' - Arguments to pass to the viewer. - - By default, this is the only viewer that supports the inverse search - feature by command line arguments and doesn't explicitly require extra - tinkering else where in your config. - ''; - }; - }; - - argsFunction = viewerCfg: (viewerCfg.args); - } -) diff --git a/modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix b/modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix deleted file mode 100644 index 72c52877..00000000 --- a/modules/plugins/languages/tex/pdfViewer/viewerTemplate.nix +++ /dev/null @@ -1,68 +0,0 @@ -# This function acts as a template for creating new pdf viewers. -# It enforces providing all the parameters required for creating -# a new pdf viewer for it to be able to work in the existing code. -# -# The first layer requirements are as follows: -{ - # This is the name of the pdf viewer, it will only be used internally and - # MUST match the .nix file that the pdf viewer is implemented in. - name, - # - # Module attribute set. This is the attribute set that the module that is - # defining a pdf viewer is passed as its input. - moduleInheritancePackage, - # - # These are the standard options for the pdf viewer just like creating any - # other module. Some options are required and are described below but - # it will also accept any other options that are provided to it. - options, - # - # These are the command line arguments that will accompany the executable - # when the view command is called. - # This is a function that will take in the cfg of its own pdf viewer. - # i.e. it will be called as "args cfg.pdfViewer.${name}" - argsFunction, - ... -}: let - # Inherit the necessary variables available to any module. - inherit (moduleInheritancePackage) lib config; - # - # Inherit other useful functions. - inherit (lib.modules) mkIf; - # - # Set the cfg variable - cfg = config.vim.languages.tex; - # - # Set the cfg of the viewer itself - viewerCfg = cfg.pdfViewer.${name}; -in { - # These are the options for the pdf viewer. It will accept any options - # provided to it but some options are mandatory: - options.vim.languages.tex.pdfViewer.${name} = ({ - # The enable option. This one is self explanatory. - enable, - # - # This is the package option for the pdf viewer. - package, - # - # This is the executable that will be used to call the pdf viewer. - # It, along with package will result in: - # "/bin/" - executable, - # - # Any other options provided are accepted. - ... - } @ opts: - opts) - options; - - # Check that the language and this pdf viewer have been enabled before making - # any config. - config = mkIf (cfg.enable && viewerCfg.enable) { - vim.languages.tex.pdfViewer = { - inherit name; - inherit (viewerCfg) package executable; - args = argsFunction viewerCfg; - }; - }; -} diff --git a/modules/plugins/languages/tex/pdfViewer/zathura.nix b/modules/plugins/languages/tex/pdfViewer/zathura.nix deleted file mode 100644 index f1fd16d5..00000000 --- a/modules/plugins/languages/tex/pdfViewer/zathura.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - pkgs, - lib, - ... -} @ moduleInheritancePackage: let - # The name of the pdf viewer - name = "zathura"; - - # The viewer template - template = import ./viewerTemplate.nix; - - inherit (lib.options) mkOption mkEnableOption mkPackageOption; - inherit (lib.types) str listOf; -in ( - template { - inherit name moduleInheritancePackage; - - options = { - enable = mkEnableOption "enable zathura as the pdf file previewer."; - - package = mkPackageOption pkgs "zathura" {}; - - executable = mkOption { - type = str; - default = "zathura"; - description = "The executable name to call the viewer."; - }; - - args = mkOption { - type = listOf str; - default = [ - "--synctex-forward" - "%l:1:%f" - "%p" - ]; - description = "Arguments to pass to the viewer."; - }; - }; - - argsFunction = viewerCfg: (viewerCfg.args); - } -)