diff --git a/.editorconfig b/.editorconfig
index 43456223..5f4be94c 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -14,7 +14,7 @@ indent_style = space
indent_size = 2
trim_trailing_whitespace = false
-[*.{js,nix,yml,yaml}]
+[*.{nix,yml,yaml}]
indent_style = space
indent_size = 2
tab_width = 2
diff --git a/.github/README.md b/.github/README.md
index 5d10c73f..029f2fc8 100644
--- a/.github/README.md
+++ b/.github/README.md
@@ -69,7 +69,7 @@
[Home-Manager module]: https://notashelf.github.io/nvf/index.xhtml#ch-standalone-hm
- **Simple**: One language to rule them all! Use Nix to configure everything,
- with optional Lua support for robust configurability!
+ with additional Lua Support
- **Reproducible**: Your configuration will behave the same _anywhere_. No
surprises, promise!
- **Portable**: nvf depends _solely_ on your Nix store, and nothing else. No
@@ -77,9 +77,8 @@
- Options to install [standalone], [NixOS module] or [Home-Manager module].
- **Customizable**: There are _almost no defaults_ to annoy you. nvf is fully
customizable through the Nix module system.
- - Not comfortable with a full-nix config or want to bring your Lua config? You
- can do just that, no unnecessary restrictions.
- - Lazyloading? We got it! Lazyload both internal and external plugins at will.
+- Not comfortable with a full-nix config or want to bring your Lua config? You
+ can do just that, no unnecessary restrictions.
- **Well-documented**: Documentation is priority. You will _never_ face
undocumented, obscure behaviour.
- **Idiomatic**: nvf does things ✨ _the right way_ ✨ - the codebase is, and
@@ -168,19 +167,19 @@ fix.
## Frequently Asked Questions
-[issue template]: https://github.com/NotAShelf/nvf/issues/new/choose
+[appropriate issue template]: https://github.com/NotAShelf/nvf/issues/new/choose
[list of branches]: https://github.com/NotAShelf/nvf/branches
[list of open pull requests]: https://github.com/NotAShelf/nvf/pulls
**Q**: What platforms are supported?
-
**A**: nvf actively supports **Linux and Darwin** platforms using
-standalone Nix, NixOS or Home-Manager. Please take a look at the [nvf manual]
-for available installation instructions.
+
**A**: nvf actively supports Linux and Darwin platforms using standalone
+Nix, NixOS or Home-Manager. Please take a look at the [nvf manual] for available
+installation instructions.
**Q**: Can you add _X_?
**A**: Maybe! It is not one of our goals to support each and every Neovim
plugin, however, I am always open to new modules and plugin setup additions to
-**nvf**. Use the appropriate [issue template] and I will consider a module
+**nvf**. Use the [appropriate issue template] and I will consider a module
addition. As mentioned before, pull requests to add new features are also
welcome.
@@ -197,13 +196,6 @@ not noticed any activity on the main branch, consider taking a look at the
_testing_ those release branches to get access to new features ahead of time and
better prepare to breaking changes.
-**Q**: Will you support non-flake installations?
-
**A**: Quite possibly. **nvf** started as "neovim-flake", which does mean
-it is and will remain flakes-first but we might consider non-flakes
-compatibility. Though keep in mind that **nvf** under non-flake environments
-would lose customizability of plugin inputs, which is one of our primary
-features.
-
## Credits
### Contributors
diff --git a/configuration.nix b/configuration.nix
index 3be1d39b..aadd1f83 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -1,7 +1,3 @@
-# This is the sample configuration for nvf, aiming to give you a feel of the default options
-# while certain plugins are enabled. While it may act as one, this is not an overview of nvf's
-# module options. To find a complete overview of nvf's options and examples, visit the manual.
-# https://notashelf.github.io/nvf/options.html
isMaximal: {
config.vim = {
viAlias = true;
@@ -35,61 +31,54 @@ isMaximal: {
};
};
- # This section does not include a comprehensive list of available language modules.
- # To list all available language module options, please visit the nvf manual.
languages = {
enableLSP = true;
enableFormat = true;
enableTreesitter = true;
enableExtraDiagnostics = true;
- # Languages that will be supported in default and maximal configurations.
- nix.enable = true;
- markdown.enable = true;
-
- # Languages that are enabled in the maximal configuration.
- bash.enable = isMaximal;
- clang.enable = isMaximal;
- css.enable = isMaximal;
- html.enable = isMaximal;
- sql.enable = isMaximal;
- java.enable = isMaximal;
- kotlin.enable = isMaximal;
- ts.enable = isMaximal;
- go.enable = isMaximal;
- lua.enable = isMaximal;
- zig.enable = isMaximal;
- python.enable = isMaximal;
- typst.enable = isMaximal;
- rust = {
- enable = isMaximal;
- crates.enable = isMaximal;
- };
-
- # Language modules that are not as common.
- assembly.enable = false;
- astro.enable = false;
- nu.enable = false;
- csharp.enable = false;
- julia.enable = false;
- vala.enable = false;
- scala.enable = false;
- r.enable = false;
- gleam.enable = false;
- dart.enable = false;
- ocaml.enable = false;
- elixir.enable = false;
- haskell.enable = false;
-
- tailwind.enable = false;
- svelte.enable = false;
-
# Nim LSP is broken on Darwin and therefore
# should be disabled by default. Users may still enable
# `vim.languages.vim` to enable it, this does not restrict
# that.
# See:
nim.enable = false;
+
+ nix.enable = true;
+
+ # Assembly is not common, and the asm LSP is a major hit-or-miss
+ assembly.enable = false;
+ astro.enable = false;
+ markdown.enable = isMaximal;
+ html.enable = isMaximal;
+ css.enable = isMaximal;
+ sql.enable = isMaximal;
+ java.enable = isMaximal;
+ kotlin.enable = isMaximal;
+ ts.enable = isMaximal;
+ svelte.enable = isMaximal;
+ go.enable = isMaximal;
+ lua.enable = isMaximal;
+ elixir.enable = isMaximal;
+ zig.enable = isMaximal;
+ ocaml.enable = isMaximal;
+ python.enable = isMaximal;
+ dart.enable = isMaximal;
+ bash.enable = isMaximal;
+ gleam.enable = false;
+ r.enable = isMaximal;
+ tailwind.enable = isMaximal;
+ typst.enable = isMaximal;
+ clang.enable = isMaximal;
+ scala.enable = isMaximal;
+ rust = {
+ enable = isMaximal;
+ crates.enable = isMaximal;
+ };
+ csharp.enable = isMaximal;
+ julia.enable = isMaximal;
+ vala.enable = isMaximal;
+ nu.enable = false;
};
visuals = {
diff --git a/docs/manual.nix b/docs/manual.nix
index 4becdf2d..113fb789 100644
--- a/docs/manual.nix
+++ b/docs/manual.nix
@@ -62,8 +62,7 @@ in
# Copy anchor scripts to the script directory in document root.
cp -vt "$dest"/script \
${./static/script}/anchor-min.js \
- ${./static/script}/anchor-use.js \
- ${./static/script}/search.js
+ ${./static/script}/anchor-use.js
substituteInPlace ./options.md \
--subst-var-by OPTIONS_JSON ./config-options.json
@@ -101,7 +100,6 @@ in
--script highlightjs/loader.js \
--script script/anchor-use.js \
--script script/anchor-min.js \
- --script script/search.js \
--toc-depth 2 \
--section-toc-depth 1 \
manual.md \
diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md
deleted file mode 100644
index 03d4d010..00000000
--- a/docs/release-notes/rl-0.8.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Release 0.8 {#sec-release-0.8}
-
-[NotAShelf](https://github.com/notashelf):
-
-[typst-preview.nvim]: https://github.com/chomosuke/typst-preview.nvim
-
-- Add [typst-preview.nvim] under
- `languages.typst.extensions.typst-preview-nvim`.
-
-- Add a search widget to the options page in the nvf manual.
-
-[amadaluzia](https://github.com/amadaluzia):
-
-[haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim
-
-- Add Haskell support under `vim.languages.haskell` using [haskell-tools.nvim].
-
-[diniamo](https://github.com/diniamo):
-
-- Add Odin support under `vim.languages.odin`.
diff --git a/docs/static/script/search.js b/docs/static/script/search.js
deleted file mode 100644
index e20c2314..00000000
--- a/docs/static/script/search.js
+++ /dev/null
@@ -1,58 +0,0 @@
-document.addEventListener("DOMContentLoaded", () => {
- if (!window.location.pathname.endsWith("options.html")) return;
-
- const searchDiv = document.createElement("div");
- searchDiv.id = "search-bar";
- searchDiv.innerHTML = `
-
-
- `;
- document.body.prepend(searchDiv);
-
- const dtElements = Array.from(document.querySelectorAll("dt"));
- const ddElements = Array.from(document.querySelectorAll("dd"));
- const dtOptionIds = dtElements.map(
- (dt) => dt.querySelector("a")?.id.toLowerCase() || "",
- );
-
- if (dtElements.length === 0 || ddElements.length === 0) {
- console.warn("Something went wrong, page may be loaded incorrectly.");
- return;
- }
-
- const dtElementsData = dtElements.map((dt, index) => ({
- element: dt,
- id: dtOptionIds[index],
- ddElement: ddElements[index],
- }));
-
- const hiddenClass = "hidden";
- const hiddenStyle = document.createElement("style");
- hiddenStyle.innerHTML = `.${hiddenClass} { display: none; }`;
- document.head.appendChild(hiddenStyle);
-
- let debounceTimeout;
- document.getElementById("search-input").addEventListener("input", (event) => {
- clearTimeout(debounceTimeout);
- debounceTimeout = setTimeout(() => {
- const query = event.target.value.toLowerCase();
-
- const matches = [];
- const nonMatches = [];
-
- dtElementsData.forEach(({ element, id, ddElement }) => {
- const isMatch = id.includes(query);
- if (isMatch) {
- matches.push(element, ddElement);
- } else {
- nonMatches.push(element, ddElement);
- }
- });
-
- requestAnimationFrame(() => {
- matches.forEach((el) => el?.classList.remove(hiddenClass));
- nonMatches.forEach((el) => el?.classList.add(hiddenClass));
- });
- }, 200);
- });
-});
diff --git a/docs/static/style.scss b/docs/static/style.scss
index d6becd0c..718302f3 100644
--- a/docs/static/style.scss
+++ b/docs/static/style.scss
@@ -189,16 +189,14 @@ th {
dt {
margin: 1.2rem 0 0.8rem;
- content-visibility: auto;
- contain-intrinsic-size: auto 42px;
-}
-dd {
- margin-left: 2rem;
- content-visibility: auto;
- contain-intrinsic-size: auto 500px;
}
-div.book {}
+dd {
+ margin-left: 2rem;
+}
+
+div.book {
+}
ul {
@include margined;
@@ -235,33 +233,6 @@ li {
}
}
-#search-bar {
- position: sticky;
- top: 0;
- background: white;
- padding: 10px;
- border-bottom: 1px solid $color-gray-200;
- z-index: 1000;
- @media (prefers-color-scheme: dark) {
- background: $color-gray-900;
- color: $color-gray-50;
- border-bottom: 1px solid black;
- }
-}
-
-#search-input {
- width: 100%;
- padding: 8px;
- border: 1px solid #ccc;
- border-radius: 4px;
- background: inherit;
- color: inherit;
-}
-
-.hidden {
- display: none;
-}
-
div.titlepage {
margin: 40px 0;
diff --git a/flake.lock b/flake.lock
index 97ff6754..e84beb3a 100644
--- a/flake.lock
+++ b/flake.lock
@@ -684,22 +684,6 @@
"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": {
@@ -1729,11 +1713,11 @@
"plugin-run-nvim": {
"flake": false,
"locked": {
- "lastModified": 1734816675,
- "narHash": "sha256-Wuk5HG+vHXAbifzp5YB5V/FxBhBRNWLeypkRczpXbvQ=",
+ "lastModified": 1732918526,
+ "narHash": "sha256-kiszNmZZDXG8tAPMQKuGJDCkqCMzsWT7BkCvkVsH2lA=",
"owner": "diniamo",
"repo": "run.nvim",
- "rev": "6cd971afdce6443d7a070dcc23af51da1cc932f9",
+ "rev": "d867466e01b8fa4e54a589b9ef446cf43fb966de",
"type": "github"
},
"original": {
@@ -1918,22 +1902,6 @@
"type": "github"
}
},
- "plugin-typst-preview-nvim": {
- "flake": false,
- "locked": {
- "lastModified": 1733120663,
- "narHash": "sha256-uYMZ2PONiiI3UDvCgNvyy4+jhzmUDbAyxX0phKxELXw=",
- "owner": "chomosuke",
- "repo": "typst-preview.nvim",
- "rev": "0cb5f5627312f50ce089f785ec42b55a85f30ce7",
- "type": "github"
- },
- "original": {
- "owner": "chomosuke",
- "repo": "typst-preview.nvim",
- "type": "github"
- }
- },
"plugin-vim-dirtytalk": {
"flake": false,
"locked": {
@@ -2107,7 +2075,6 @@
"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",
@@ -2184,7 +2151,6 @@
"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",
diff --git a/flake.nix b/flake.nix
index 161ba43f..e52f9416 100644
--- a/flake.nix
+++ b/flake.nix
@@ -206,11 +206,6 @@
flake = false;
};
- plugin-typst-preview-nvim = {
- url = "github:chomosuke/typst-preview.nvim";
- flake = false;
- };
-
plugin-nvim-metals = {
url = "github:scalameta/nvim-metals";
flake = false;
@@ -720,10 +715,5 @@
url = "github:otavioschwanck/new-file-template.nvim";
flake = false;
};
-
- plugin-haskell-tools-nvim = {
- url = "github:mrcjkb/haskell-tools.nvim";
- flake = false;
- };
};
}
diff --git a/modules/plugins/filetree/nvimtree/config.nix b/modules/plugins/filetree/nvimtree/config.nix
index 11fa9fed..8a34a0b7 100644
--- a/modules/plugins/filetree/nvimtree/config.nix
+++ b/modules/plugins/filetree/nvimtree/config.nix
@@ -78,7 +78,7 @@ in {
local real_file = vim.fn.filereadable(data.file) == 1
-- buffer is a directory
- local directory = vim.fn.isdirectory(data.file) == 1
+ local directory = vim.fn.isdirectory(data.file) == 1
-- buffer is a [No Name]
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
diff --git a/modules/plugins/languages/default.nix b/modules/plugins/languages/default.nix
index ee9f55e1..a69d3e8d 100644
--- a/modules/plugins/languages/default.nix
+++ b/modules/plugins/languages/default.nix
@@ -14,7 +14,6 @@ in {
./hcl.nix
./kotlin.nix
./html.nix
- ./haskell.nix
./java.nix
./lua.nix
./markdown.nix
@@ -37,7 +36,6 @@ in {
./csharp.nix
./julia.nix
./nu.nix
- ./odin.nix
];
options.vim.languages = {
diff --git a/modules/plugins/languages/haskell.nix b/modules/plugins/languages/haskell.nix
deleted file mode 100644
index 62f4cd41..00000000
--- a/modules/plugins/languages/haskell.nix
+++ /dev/null
@@ -1,104 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}: let
- inherit (builtins) isList;
- inherit (lib.types) either package listOf str;
- inherit (lib.options) mkEnableOption mkOption;
- inherit (lib.strings) optionalString;
- inherit (lib.modules) mkIf mkMerge;
- inherit (lib.nvim.types) mkGrammarOption;
- inherit (lib.nvim.dag) entryAfter;
- inherit (lib.nvim.lua) expToLua;
- inherit (pkgs) haskellPackages;
-
- cfg = config.vim.languages.haskell;
-in {
- options.vim.languages.haskell = {
- enable = mkEnableOption "Haskell support";
-
- treesitter = {
- enable = mkEnableOption "Treesitter support for Haskell" // {default = config.vim.languages.enableTreesitter;};
- package = mkGrammarOption pkgs "haskell";
- };
-
- lsp = {
- enable = mkEnableOption "LSP support for Haskell" // {default = config.vim.languages.enableLSP;};
- package = mkOption {
- description = "Haskell LSP package or command to run the Haskell LSP";
- example = ''[ (lib.getExe pkgs.haskellPackages.haskell-language-server) "--debug" ]'';
- default = haskellPackages.haskell-language-server;
- type = either package (listOf str);
- };
- };
-
- dap = {
- enable = mkEnableOption "DAP support for Haskell" // {default = config.vim.languages.enableDAP;};
- package = mkOption {
- description = "Haskell DAP package or command to run the Haskell DAP";
- default = haskellPackages.haskell-debug-adapter;
- type = either package (listOf str);
- };
- };
- };
-
- config = mkIf cfg.enable (mkMerge [
- (mkIf cfg.treesitter.enable {
- vim.treesitter = {
- enable = true;
- grammars = [cfg.treesitter.package];
- };
- })
-
- (mkIf (cfg.dap.enable || cfg.lsp.enable) {
- vim = {
- startPlugins = ["haskell-tools-nvim"];
- luaConfigRC.haskell-tools-nvim =
- entryAfter
- ["lsp-setup"]
- ''
- vim.g.haskell_tools = {
- ${optionalString cfg.lsp.enable ''
- -- LSP
- tools = {
- hover = {
- enable = true,
- },
- },
- hls = {
- cmd = ${
- if isList cfg.lsp.package
- then expToLua cfg.lsp.package
- else ''{"${cfg.lsp.package}/bin/haskell-language-server-wrapper"}''
- },
- on_attach = function(client, bufnr, ht)
- default_on_attach(client, bufnr, ht)
- local opts = { noremap = true, silent = true, buffer = bufnr }
- vim.keymap.set('n', 'cl', vim.lsp.codelens.run, opts)
- vim.keymap.set('n', 'hs', ht.hoogle.hoogle_signature, opts)
- vim.keymap.set('n', 'ea', ht.lsp.buf_eval_all, opts)
- vim.keymap.set('n', 'rr', ht.repl.toggle, opts)
- vim.keymap.set('n', 'rf', function()
- ht.repl.toggle(vim.api.nvim_buf_get_name(0))
- end, opts)
- vim.keymap.set('n', 'rq', ht.repl.quit, opts)
- end,
- },
- ''}
- ${optionalString cfg.dap.enable ''
- dap = {
- cmd = ${
- if isList cfg.dap.package
- then expToLua cfg.dap.package
- else ''{"${cfg.dap.package}/bin/haskell-debug-adapter"}''
- },
- },
- ''}
- }
- '';
- };
- })
- ]);
-}
diff --git a/modules/plugins/languages/odin.nix b/modules/plugins/languages/odin.nix
deleted file mode 100644
index 7a32db93..00000000
--- a/modules/plugins/languages/odin.nix
+++ /dev/null
@@ -1,71 +0,0 @@
-{
- config,
- pkgs,
- lib,
- ...
-}: let
- inherit (builtins) attrNames;
- inherit (lib.options) mkEnableOption mkOption;
- inherit (lib.modules) mkIf mkMerge;
- inherit (lib.lists) isList;
- inherit (lib.types) either listOf package str enum;
- inherit (lib.nvim.lua) expToLua;
- inherit (lib.nvim.types) mkGrammarOption;
-
- defaultServer = "ols";
- servers = {
- ols = {
- package = pkgs.ols;
- lspConfig = ''
- lspconfig.ols.setup {
- capabilities = capabilities,
- on_attach = default_on_attach,
- cmd = ${
- if isList cfg.lsp.package
- then expToLua cfg.lsp.package
- else "{'${cfg.lsp.package}/bin/ols'}"
- }
- }
- '';
- };
- };
-
- cfg = config.vim.languages.odin;
-in {
- options.vim.languages.odin = {
- enable = mkEnableOption "Odin language support";
-
- treesitter = {
- enable = mkEnableOption "Odin treesitter" // {default = config.vim.languages.enableTreesitter;};
- package = mkGrammarOption pkgs "odin";
- };
-
- lsp = {
- enable = mkEnableOption "Odin LSP support" // {default = config.vim.languages.enableLSP;};
-
- server = mkOption {
- type = enum (attrNames servers);
- default = defaultServer;
- description = "Odin LSP server to use";
- };
-
- package = mkOption {
- description = "Ols package, or the command to run as a list of strings";
- type = either package (listOf str);
- default = pkgs.ols;
- };
- };
- };
-
- config = mkIf cfg.enable (mkMerge [
- (mkIf cfg.treesitter.enable {
- vim.treesitter.enable = true;
- vim.treesitter.grammars = [cfg.treesitter.package];
- })
-
- (mkIf cfg.lsp.enable {
- vim.lsp.lspconfig.enable = true;
- vim.lsp.lspconfig.sources.odin-lsp = servers.${cfg.lsp.server}.lspConfig;
- })
- ]);
-}
diff --git a/modules/plugins/languages/rust.nix b/modules/plugins/languages/rust.nix
index 7e9cb627..ec1887cb 100644
--- a/modules/plugins/languages/rust.nix
+++ b/modules/plugins/languages/rust.nix
@@ -13,7 +13,7 @@
inherit (lib.types) bool package str listOf either enum;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.lua) expToLua;
- inherit (lib.nvim.dag) entryAfter entryAnywhere;
+ inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.languages.rust;
@@ -127,7 +127,7 @@ in {
vim = {
startPlugins = ["rustaceanvim"];
- pluginRC.rustaceanvim = entryAfter ["lsp-setup"] ''
+ luaConfigRC.rustaceanvim = entryAnywhere ''
vim.g.rustaceanvim = {
${optionalString cfg.lsp.enable ''
-- LSP
diff --git a/modules/plugins/languages/ts.nix b/modules/plugins/languages/ts.nix
index 2530d352..8843cc46 100644
--- a/modules/plugins/languages/ts.nix
+++ b/modules/plugins/languages/ts.nix
@@ -23,11 +23,8 @@
package = pkgs.typescript-language-server;
lspConfig = ''
lspconfig.ts_ls.setup {
- capabilities = capabilities,
- on_attach = function(client, bufnr)
- attach_keymaps(client, bufnr);
- client.server_capabilities.documentFormattingProvider = false;
- end,
+ capabilities = capabilities;
+ on_attach = attach_keymaps,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
@@ -82,7 +79,6 @@
ls_sources,
null_ls.builtins.formatting.prettier.with({
command = "${cfg.format.package}/bin/prettier",
- filetypes = { "typescript" },
})
)
'';
diff --git a/modules/plugins/languages/typst.nix b/modules/plugins/languages/typst.nix
index 24097e2c..fbb090e8 100644
--- a/modules/plugins/languages/typst.nix
+++ b/modules/plugins/languages/typst.nix
@@ -7,13 +7,10 @@
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
- inherit (lib.types) nullOr enum either attrsOf listOf package str;
+ inherit (lib.types) enum either listOf package str;
inherit (lib.attrsets) attrNames;
- inherit (lib.generators) mkLuaInline;
- inherit (lib.meta) getExe;
- inherit (lib.nvim.lua) expToLua toLuaObject;
- inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption;
- inherit (lib.nvim.dag) entryAnywhere;
+ inherit (lib.nvim.lua) expToLua;
+ inherit (lib.nvim.types) mkGrammarOption;
cfg = config.vim.languages.typst;
@@ -36,7 +33,6 @@
}
'';
};
-
tinymist = {
package = pkgs.tinymist;
lspConfig = ''
@@ -124,50 +120,6 @@ in {
default = formats.${cfg.format.type}.package;
};
};
-
- extensions = {
- typst-preview-nvim = {
- enable =
- mkEnableOption ''
- [typst-preview.nvim]: https://github.com/chomosuke/typst-preview.nvim
-
- Low latency typst preview for Neovim via [typst-preview.nvim]
- ''
- // {default = true;};
-
- setupOpts = mkPluginSetupOption "typst-preview-nvim" {
- open_cmd = mkOption {
- type = nullOr str;
- default = null;
- example = "firefox %s -P typst-preview --class typst-preview";
- description = ''
- Custom format string to open the output link provided with `%s`
- '';
- };
-
- dependencies_bin = mkOption {
- type = attrsOf str;
- default = {
- "tinymist" = getExe servers.tinymist.package;
- "websocat" = getExe pkgs.websocat;
- };
-
- description = ''
- Provide the path to binaries for dependencies. Setting this
- to a non-null value will skip the download of the binary by
- the plugin.
- '';
- };
-
- extra_args = mkOption {
- type = nullOr (listOf str);
- default = null;
- example = ["--input=ver=draft" "--ignore-system-fonts"];
- description = "A list of extra arguments (or `null`) to be passed to previewer";
- };
- };
- };
- };
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
@@ -184,13 +136,5 @@ in {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.typst-lsp = servers.${cfg.lsp.server}.lspConfig;
})
-
- # Extensions
- (mkIf cfg.extensions.typst-preview-nvim.enable {
- vim.startPlugins = ["typst-preview-nvim"];
- vim.pluginRC.typst-preview-nvim = entryAnywhere ''
- require("typst-preview").setup(${toLuaObject cfg.extensions.typst-preview-nvim.setupOpts})
- '';
- })
]);
}
diff --git a/modules/plugins/languages/zig.nix b/modules/plugins/languages/zig.nix
index 3618d6d8..7ae8a5c2 100644
--- a/modules/plugins/languages/zig.nix
+++ b/modules/plugins/languages/zig.nix
@@ -57,7 +57,6 @@ in {
};
};
};
-
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
diff --git a/modules/plugins/lsp/lightbulb/config.nix b/modules/plugins/lsp/lightbulb/config.nix
index f17b8ad9..f44c2ddb 100644
--- a/modules/plugins/lsp/lightbulb/config.nix
+++ b/modules/plugins/lsp/lightbulb/config.nix
@@ -5,7 +5,6 @@
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere;
- inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.lsp;
in {
@@ -17,7 +16,7 @@ in {
vim.api.nvim_command('autocmd CursorHold,CursorHoldI * lua require\'nvim-lightbulb\'.update_lightbulb()')
-- Enable trouble diagnostics viewer
- require'nvim-lightbulb'.setup(${toLuaObject cfg.lightbulb.setupOpts})
+ require'nvim-lightbulb'.setup()
'';
};
};
diff --git a/modules/plugins/lsp/lightbulb/lightbulb.nix b/modules/plugins/lsp/lightbulb/lightbulb.nix
index 4341cac6..ef101a0e 100644
--- a/modules/plugins/lsp/lightbulb/lightbulb.nix
+++ b/modules/plugins/lsp/lightbulb/lightbulb.nix
@@ -1,11 +1,9 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
- inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.lsp = {
lightbulb = {
enable = mkEnableOption "Lightbulb for code actions. Requires an emoji font";
- setupOpts = mkPluginSetupOption "nvim-lightbulb" {};
};
};
}
diff --git a/modules/plugins/statusline/lualine/lualine.nix b/modules/plugins/statusline/lualine/lualine.nix
index 6e95f03b..1f694eaf 100644
--- a/modules/plugins/statusline/lualine/lualine.nix
+++ b/modules/plugins/statusline/lualine/lualine.nix
@@ -13,43 +13,41 @@
builtin_themes = [
"auto"
"16color"
+ "gruvbox"
"ayu_dark"
"ayu_light"
"ayu_mirage"
"ayu"
- "base16"
"codedark"
"dracula"
"everforest"
"gruvbox"
"gruvbox_dark"
"gruvbox_light"
- "gruvbox-material"
+ "gruvbox_material"
"horizon"
"iceberg_dark"
"iceberg_light"
"iceberg"
"jellybeans"
"material"
- "modus-vivendi"
+ "modus_vivendi"
"molokai"
"moonfly"
"nightfly"
"nord"
- "OceanicNext"
+ "oceanicnext"
"onedark"
"onelight"
"palenight"
"papercolor_dark"
"papercolor_light"
- "PaperColor"
"powerline_dark"
"powerline"
- "pywal"
"seoul256"
"solarized_dark"
"solarized_light"
- "Tomorrow"
+ "tomorrow"
"wombat"
];
in {
diff --git a/modules/plugins/ui/notifications/nvim-notify/config.nix b/modules/plugins/ui/notifications/nvim-notify/config.nix
index 50972176..0ee23017 100644
--- a/modules/plugins/ui/notifications/nvim-notify/config.nix
+++ b/modules/plugins/ui/notifications/nvim-notify/config.nix
@@ -14,9 +14,17 @@ in {
startPlugins = ["nvim-notify"];
pluginRC.nvim-notify = entryAnywhere ''
- local notify = require("notify")
- notify.setup(${toLuaObject cfg.setupOpts})
- vim.notify = notify
+ require('notify').setup(${toLuaObject cfg.setupOpts})
+
+ -- required to fix offset_encoding errors
+ local notify = vim.notify
+ vim.notify = function(msg, ...)
+ if msg:match("warning: multiple different client offset_encodings") then
+ return
+ end
+
+ notify(msg, ...)
+ end
'';
};
};
diff --git a/modules/plugins/ui/notifications/nvim-notify/nvim-notify.nix b/modules/plugins/ui/notifications/nvim-notify/nvim-notify.nix
index b09100da..f30d19cd 100644
--- a/modules/plugins/ui/notifications/nvim-notify/nvim-notify.nix
+++ b/modules/plugins/ui/notifications/nvim-notify/nvim-notify.nix
@@ -28,7 +28,7 @@ in {
};
stages = mkOption {
- type = enum ["fade_in_slide_out" "fade" "slide" "static"];
+ type = enum ["fade_in_slide_out" "fade_in" "slide_out" "none"];
default = "fade_in_slide_out";
description = "The stages of the notification";
};
@@ -41,7 +41,7 @@ in {
background_colour = mkOption {
type = str;
- default = "NotifyBackground";
+ default = "#000000";
description = "The background colour of the notification";
};
diff --git a/modules/plugins/utility/preview/markdown-preview/config.nix b/modules/plugins/utility/preview/markdown-preview/config.nix
index 50fec81a..8349d3fc 100644
--- a/modules/plugins/utility/preview/markdown-preview/config.nix
+++ b/modules/plugins/utility/preview/markdown-preview/config.nix
@@ -4,8 +4,8 @@
lib,
...
}: let
+ inherit (lib.strings) concatMapStringsSep;
inherit (lib.modules) mkIf;
-
cfg = config.vim.utility.preview.markdownPreview;
in {
config = mkIf cfg.enable {
@@ -15,7 +15,7 @@ in {
mkdp_auto_start = cfg.autoStart;
mkdp_auto_close = cfg.autoClose;
mkdp_refresh_slow = cfg.lazyRefresh;
- mkdp_filetypes = cfg.filetypes;
+ mkdp_filetypes = [(concatMapStringsSep ", " (x: "'" + x + "'") cfg.filetypes)];
mkdp_command_for_global = cfg.alwaysAllowPreview;
mkdp_open_to_the_world = cfg.broadcastServer;
mkdp_open_ip = cfg.customIP;
diff --git a/modules/plugins/utility/surround/config.nix b/modules/plugins/utility/surround/config.nix
index 31b4033d..7161cf6b 100644
--- a/modules/plugins/utility/surround/config.nix
+++ b/modules/plugins/utility/surround/config.nix
@@ -4,33 +4,51 @@
...
}: let
inherit (lib.modules) mkIf;
+ inherit (lib.nvim.dag) entryAnywhere;
+ inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.utility.surround;
mkLznKey = mode: key: {
- inherit mode key;
+ inherit key mode;
};
in {
config = mkIf cfg.enable {
vim = {
+ startPlugins = ["nvim-surround"];
+ pluginRC.surround = entryAnywhere "require('nvim-surround').setup(${toLuaObject cfg.setupOpts})";
+
lazy.plugins.nvim-surround = {
package = "nvim-surround";
-
setupModule = "nvim-surround";
inherit (cfg) setupOpts;
- keys = [
- (mkLznKey "i" cfg.setupOpts.keymaps.insert)
- (mkLznKey "i" cfg.setupOpts.keymaps.insert_line)
- (mkLznKey "x" cfg.setupOpts.keymaps.visual)
- (mkLznKey "x" cfg.setupOpts.keymaps.visual_line)
- (mkLznKey "n" cfg.setupOpts.keymaps.normal)
- (mkLznKey "n" cfg.setupOpts.keymaps.normal_cur)
- (mkLznKey "n" cfg.setupOpts.keymaps.normal_line)
- (mkLznKey "n" cfg.setupOpts.keymaps.normal_cur_line)
- (mkLznKey "n" cfg.setupOpts.keymaps.delete)
- (mkLznKey "n" cfg.setupOpts.keymaps.change)
- (mkLznKey "n" cfg.setupOpts.keymaps.change_line)
- ];
+ keys =
+ [
+ (mkLznKey ["i"] cfg.setupOpts.keymaps.insert)
+ (mkLznKey ["i"] cfg.setupOpts.keymaps.insert_line)
+ (mkLznKey ["x"] cfg.setupOpts.keymaps.visual)
+ (mkLznKey ["x"] cfg.setupOpts.keymaps.visual_line)
+ (mkLznKey ["n"] cfg.setupOpts.keymaps.normal)
+ (mkLznKey ["n"] cfg.setupOpts.keymaps.normal_cur)
+ (mkLznKey ["n"] cfg.setupOpts.keymaps.normal_line)
+ (mkLznKey ["n"] cfg.setupOpts.keymaps.normal_cur_line)
+ (mkLznKey ["n"] cfg.setupOpts.keymaps.delete)
+ (mkLznKey ["n"] cfg.setupOpts.keymaps.change)
+ (mkLznKey ["n"] cfg.setupOpts.keymaps.change_line)
+ ]
+ ++ map (mkLznKey ["n" "i" "v"]) [
+ "(nvim-surround-insert)"
+ "(nvim-surround-insert-line)"
+ "(nvim-surround-normal)"
+ "(nvim-surround-normal-cur)"
+ "(nvim-surround-normal-line)"
+ "(nvim-surround-normal-cur-line)"
+ "(nvim-surround-visual)"
+ "(nvim-surround-visual-line)"
+ "(nvim-surround-delete)"
+ "(nvim-surround-change)"
+ "(nvim-surround-change-line)"
+ ];
};
};
};
diff --git a/modules/plugins/visuals/indent-blankline/indent-blankline.nix b/modules/plugins/visuals/indent-blankline/indent-blankline.nix
index 1133b80b..ff9bccc7 100644
--- a/modules/plugins/visuals/indent-blankline/indent-blankline.nix
+++ b/modules/plugins/visuals/indent-blankline/indent-blankline.nix
@@ -6,7 +6,6 @@
inherit (lib.modules) mkRenamedOptionModule;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) int bool str nullOr either listOf attrsOf;
- inherit (lib.nvim.types) mkPluginSetupOption;
cfg = config.vim.visuals;
in {
@@ -16,7 +15,7 @@ in {
options.vim.visuals.indent-blankline = {
enable = mkEnableOption "indentation guides [indent-blankline]";
- setupOpts = mkPluginSetupOption "indent-blankline" {
+ setupOpts = {
debounce = mkOption {
type = int;
description = "Debounce time in milliseconds";
diff --git a/modules/wrapper/lazy/config.nix b/modules/wrapper/lazy/config.nix
index 3468d5ec..6a9a6ea2 100644
--- a/modules/wrapper/lazy/config.nix
+++ b/modules/wrapper/lazy/config.nix
@@ -76,7 +76,6 @@
else
mkLuaInline ''
function()
- ${optionalString (spec.beforeSetup != null) spec.beforeSetup}
${
optionalString (spec.setupModule != null)
"require(${toJSON spec.setupModule}).setup(${toLuaObject spec.setupOpts})"
diff --git a/modules/wrapper/lazy/lazy.nix b/modules/wrapper/lazy/lazy.nix
index 730bf267..e0dbea85 100644
--- a/modules/wrapper/lazy/lazy.nix
+++ b/modules/wrapper/lazy/lazy.nix
@@ -74,15 +74,6 @@
'';
};
- beforeSetup = mkOption {
- type = nullOr lines;
- default = null;
- description = ''
- Lua code to run after the plugin is loaded, but before the setup
- function is called.
- '';
- };
-
setupModule = mkOption {
type = nullOr str;
default = null;
diff --git a/modules/wrapper/rc/options.nix b/modules/wrapper/rc/options.nix
index df3831ec..4680190a 100644
--- a/modules/wrapper/rc/options.nix
+++ b/modules/wrapper/rc/options.nix
@@ -12,28 +12,22 @@
cfg = config.vim;
in {
options.vim = {
- enableLuaLoader = mkOption {
- type = bool;
- default = false;
- example = true;
- description = ''
- [{option}`official documentation`]: https://neovim.io/doc/user/lua.html#vim.loader.enable()
+ enableLuaLoader = mkEnableOption ''
+ [{option}`official documentation`]: https://neovim.io/doc/user/lua.html#vim.loader.enable()
- the experimental Lua module loader to speed up the start up process
+ the experimental Lua module loader to speed up the start up process
- If `true`, this will enable the experimental Lua module loader which:
- - overrides loadfile
- - adds the lua loader using the byte-compilation cache
- - adds the libs loader
- - removes the default Neovim loader
+ If `true`, this will enable the experimental Lua module loader which:
+ - overrides loadfile
+ - adds the lua loader using the byte-compilation cache
+ - adds the libs loader
+ - removes the default Neovim loader
- ::: {.note}
- The Lua module loader is *disabled* by default. Before setting this option, please
- take a look at the [{option}`official documentation`]. This option may be enabled by
- default in the future.
- :::
- '';
- };
+ ::: {.note}
+ This is disabled by default. Before setting this option, please
+ take a look at the [{option}`official documentation`].
+ :::
+ '';
additionalRuntimePaths = mkOption {
type = listOf (either path str);
@@ -126,14 +120,16 @@ in {
example = {"some_variable" = 42;};
description = ''
- A freeform attribute set containing global variable values for setting vim
- variables as early as possible. If populated, this option will set vim variables
- in the built {option}`luaConfigRC` as the first item.
+ An attribute set containing global variable values
+ for storing vim variables as early as possible. If
+ populated, this option will set vim variables in the
+ built luaConfigRC as the first item.
::: {.note}
- `{foo = "bar";}` will set `vim.g.foo` to "bar", where the type of `bar` in the
- resulting Lua value will be inferred from the type of the value in the
- `{name = value;}` pair passed to the option.
+ `{foo = "bar";}` will set `vim.g.foo` to "bar", where
+ the type of `bar` in the resulting Lua value will be
+ inferred from the type of the value in the `{name = value;}`
+ pair passed to the option.
:::
'';
};
@@ -210,39 +206,21 @@ in {
default = true;
description = "Enable word wrapping.";
};
-
- tabstop = mkOption {
- type = int;
- default = 8; # Neovim default
- description = ''
- Number of spaces that a `` in the file counts for. Also see
- the {command}`:retab` command, and the {option}`softtabstop` option.
- '';
- };
-
- shiftwidth = mkOption {
- type = int;
- default = 8; # Neovim default
- description = ''
- Number of spaces to use for each step of (auto)indent. Used for
- {option}`cindent`, `>>`, `<<`, etc.
-
- When zero the {option}`tabstop` value will be used.
- '';
- };
};
};
example = {visualbell = true;};
description = ''
- A freeform attribute set containing vim options to be set as early as possible.
- If populated, this option will set vim options in the built {option}`luaConfigRC`
- after `basic` and before `pluginConfigs` DAG entries.
+ An attribute set containing vim options to be set
+ as early as possible. If populated, this option will
+ set vim options in the built luaConfigRC after `basic`
+ and before `pluginConfigs` DAG entries.
::: {.note}
- `{foo = "bar";}` will set `vim.o.foo` to "bar", where the type of `bar` in the
- resulting Lua value will be inferred from the type of the value in the
- `{name = value;}` pair passed to the option.
+ `{foo = "bar";}` will set `vim.o.foo` to "bar", where
+ the type of `bar` in the resulting Lua value will be
+ inferred from the type of the value in the`{name = value;}`
+ pair passed to the option.
:::
'';
};
diff --git a/release.json b/release.json
index a80b41ea..28c5eb7f 100644
--- a/release.json
+++ b/release.json
@@ -1,4 +1,4 @@
{
- "release": "v0.8",
- "isReleaseBranch": false
+ "release": "v0.7",
+ "isReleaseBranch": true
}