diff --git a/.editorconfig b/.editorconfig index 1f39b72e..f316f5ab 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,6 +13,7 @@ trim_trailing_whitespace = true indent_style = space indent_size = 2 trim_trailing_whitespace = false +max_line_length = 80 [*.{js,json,nix,yml,yaml,toml}] indent_style = space diff --git a/docs/manual.nix b/docs/manual.nix index 132c20ef..4bbd75a0 100644 --- a/docs/manual.nix +++ b/docs/manual.nix @@ -31,13 +31,10 @@ in # Generate the final manual from a set of parameters. This uses # feel-co/ndg to render the web manual. - ndg html \ + ndg --config-file ${./ndg.toml} html \ --jobs $NIX_BUILD_CORES --title "NVF" \ --module-options ${optionsJSON}/share/doc/nixos/options.json \ --manpage-urls ${path}/doc/manpage-urls.json \ - --options-depth 3 \ - --generate-search \ - --highlight-code \ --input-dir ./manual \ --output-dir "$out/share/doc" diff --git a/docs/manual/configuring/custom-plugins/configuring.md b/docs/manual/configuring/custom-plugins/configuring.md index a4b3ce19..c7ac8996 100644 --- a/docs/manual/configuring/custom-plugins/configuring.md +++ b/docs/manual/configuring/custom-plugins/configuring.md @@ -19,7 +19,7 @@ hooks should do what you need. ```nix { config.vim.lazy.plugins = { - aerial.nvim = { + "aerial.nvim" = { # ^^^^^^^^^ this name should match the package.pname or package.name package = aerial-nvim; diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index e5c8833d..2a83e2e2 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -143,7 +143,8 @@ Some other settings and commands are now deprecated but are still supported. - Added [sqruff](https://github.com/quarylabs/sqruff) support to `languages.sql` -- Added [Pyrefly](https://pyrefly.org/) support to `languages.python` +- Added [Pyrefly](https://pyrefly.org/) and [zuban](https://zubanls.com/) + support to `languages.python` - Added TOML support via {option}`languages.toml` and the [Tombi](https://tombi-toml.github.io/tombi/) language server, linter, and @@ -155,3 +156,8 @@ Some other settings and commands are now deprecated but are still supported. [Machshev](https://github.com/machshev): - Added `ruff` and `ty` LSP support for Python under `programs.python`. + +[Snoweuph](https://github.com/snoweuph) + +- Added [Selenen](https://github.com/kampfkarren/selene) for more diagnostics in + `languages.lua`. diff --git a/docs/ndg.toml b/docs/ndg.toml new file mode 100644 index 00000000..7105c709 --- /dev/null +++ b/docs/ndg.toml @@ -0,0 +1,28 @@ +# NDG Configuration File + +# Input directory containing markdown files +input_dir = "docs" + +# Output directory for generated documentation +output_dir = "build" + +# Title for the documentation +title = "NVF" + +# Footer text for the documentation +footer_text = "Generated with ndg" + +generate_anchors = true + +# Search configuration +[search] +enable = true +highlight_code = true +tab_style = "none" +revision = "main" + +# Maximum heading level to index +max_heading_level = 3 + +# Depth of parent categories in options TOC +options_toc_depth = 2 diff --git a/flake.lock b/flake.lock index 0810a856..1081a12c 100644 --- a/flake.lock +++ b/flake.lock @@ -38,11 +38,11 @@ }, "mnw": { "locked": { - "lastModified": 1767030222, + "lastModified": 1768701608, "narHash": "sha256-kSvWF3Xt2HW9hmV5V7i8PqeWJIBUKmuKoHhOgj3Znzs=", "owner": "Gerg-L", "repo": "mnw", - "rev": "75bb637454b0fbbb5ed652375a4bf7ffd28bcf6f", + "rev": "20d63a8a1ae400557c770052a46a9840e768926b", "type": "github" }, "original": { @@ -74,11 +74,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1768395095, - "narHash": "sha256-ZhuYJbwbZT32QA95tSkXd9zXHcdZj90EzHpEXBMabaw=", + "lastModified": 1768875095, + "narHash": "sha256-dYP3DjiL7oIiiq3H65tGIXXIT1Waiadmv93JS0sS+8A=", "owner": "nixos", "repo": "nixpkgs", - "rev": "13868c071cc73a5e9f610c47d7bb08e5da64fdd5", + "rev": "ed142ab1b3a092c4d149245d0c4126a5d7ea00b0", "type": "github" }, "original": { diff --git a/modules/plugins/assistant/avante/config.nix b/modules/plugins/assistant/avante/config.nix index e140de89..bb97780f 100644 --- a/modules/plugins/assistant/avante/config.nix +++ b/modules/plugins/assistant/avante/config.nix @@ -4,25 +4,16 @@ ... }: let inherit (lib.modules) mkIf; - inherit (lib.lists) optionals; cfg = config.vim.assistant.avante-nvim; in { config = mkIf cfg.enable { vim = { - startPlugins = - [ - "nvim-treesitter" - "plenary-nvim" - "dressing-nvim" - "nui-nvim" - ] - ++ (optionals config.vim.mini.pick.enable ["mini-pick"]) - ++ (optionals config.vim.telescope.enable ["telescope"]) - ++ (optionals config.vim.autocomplete.nvim-cmp.enable ["nvim-cmp"]) - ++ (optionals config.vim.fzf-lua.enable ["fzf-lua"]) - ++ (optionals config.vim.visuals.nvim-web-devicons.enable ["nvim-web-devicons"]) - ++ (optionals config.vim.utility.images.img-clip.enable ["img-clip"]); + startPlugins = [ + "plenary-nvim" + "dressing-nvim" + "nui-nvim" + ]; lazy.plugins = { avante-nvim = { diff --git a/modules/plugins/languages/lua.nix b/modules/plugins/languages/lua.nix index 276c9a6a..564fcece 100644 --- a/modules/plugins/languages/lua.nix +++ b/modules/plugins/languages/lua.nix @@ -9,7 +9,7 @@ inherit (lib.modules) mkIf mkMerge; inherit (lib.meta) getExe; inherit (lib.types) bool enum listOf; - inherit (lib.nvim.types) diagnostics mkGrammarOption deprecatedSingleOrListOf; + inherit (lib.nvim.types) diagnostics mkGrammarOption; inherit (lib.nvim.dag) entryBefore; inherit (lib.nvim.attrsets) mapListToAttrs; @@ -46,6 +46,9 @@ luacheck = { package = pkgs.luajitPackages.luacheck; }; + selene = { + package = pkgs.selene; + }; }; in { imports = [ @@ -79,7 +82,7 @@ in { description = "Enable Lua formatting"; }; type = mkOption { - type = deprecatedSingleOrListOf "vim.language.lua.format.type" (enum (attrNames formats)); + type = listOf (enum (attrNames formats)); default = defaultFormat; description = "Lua formatter to use"; }; diff --git a/modules/plugins/languages/python.nix b/modules/plugins/languages/python.nix index 0fffbbcc..04d2554f 100644 --- a/modules/plugins/languages/python.nix +++ b/modules/plugins/languages/python.nix @@ -169,6 +169,22 @@ ".git" ]; }; + + zuban = { + enable = true; + cmd = [(getExe pkgs.zuban) "server"]; + filetypes = ["python"]; + root_markers = [ + "pyproject.toml" + "setup.py" + "setup.cfg" + "requirements.txt" + "Pipfile" + ".git" + "mypy.ini" + ".mypy.ini" + ]; + }; }; defaultFormat = ["black"]; diff --git a/modules/plugins/utility/leetcode-nvim/config.nix b/modules/plugins/utility/leetcode-nvim/config.nix index be002727..e0b32938 100644 --- a/modules/plugins/utility/leetcode-nvim/config.nix +++ b/modules/plugins/utility/leetcode-nvim/config.nix @@ -10,7 +10,6 @@ in { config = mkIf cfg.enable { vim = { startPlugins = [ - "leetcode-nvim" "plenary-nvim" "fzf-lua" "nui-nvim" @@ -21,6 +20,8 @@ in { setupModule = "leetcode"; inherit (cfg) setupOpts; }; + + telescope.enable = true; }; }; }