diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index d85c28da..436a68ec 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -16,7 +16,7 @@ If you have any questions regarding those files, feel free to open an issue or [
## Contributing
-The contribution process is mostly documented in the [pull request template](pull_request_template.md). You will find a checklist of items to complete before submitting a pull request. Please make sure you complete it before submitting a pull request. If you are unsure about any of the items, please ask.
+The contribution process is mostly documented in the [pull request template](.github/pull_request_template.md). You will find a checklist of items to complete before submitting a pull request. Please make sure you complete it before submitting a pull request. If you are unsure about any of the items, please ask.
### Guidelines
diff --git a/.github/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md
similarity index 100%
rename from .github/pull_request_template.md
rename to .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
diff --git a/.github/README.md b/.github/README.md
index 1c3e22c3..06c9eb7d 100644
--- a/.github/README.md
+++ b/.github/README.md
@@ -33,9 +33,10 @@
diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml
deleted file mode 100644
index 204dcba7..00000000
--- a/.github/workflows/cleanup.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: Cleanup
-on:
- workflow_dispatch:
- schedule:
- - cron: "0 4 1 * *" # 4AM on 1st of every month
- - cron: "0 4 15 * *" # 4AM on the 15th of every month
-jobs:
- branches:
- name: Cleanup old branches
- runs-on: ubuntu-latest
- steps:
- - name: "Checkout"
- uses: actions/checkout@v4
-
- - name: "Delete old branches"
- uses: beatlabs/delete-old-branches-action@v0.0.10
- with:
- repo_token: "${{ secrets.GITHUB_TOKEN }}"
- date: "1 months ago"
- dry_run: false
- delete_tags: false
- exclude_open_pr_branches: true
diff --git a/configuration.nix b/configuration.nix
index b21b26aa..08b0f9b6 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -19,7 +19,6 @@ isMaximal: {
lspsaga.enable = false;
trouble.enable = true;
lspSignature.enable = true;
- otter-nvim.enable = isMaximal;
lsplines.enable = isMaximal;
nvim-docs-view.enable = isMaximal;
};
@@ -156,7 +155,7 @@ isMaximal: {
};
utility = {
- ccc.enable = false;
+ ccc.enable = isMaximal;
vim-wakatime.enable = false;
icon-picker.enable = isMaximal;
surround.enable = isMaximal;
diff --git a/docs/manual/configuring/dag-entries.md b/docs/manual/configuring/dag-entries.md
index 402cde66..d5afa9b6 100644
--- a/docs/manual/configuring/dag-entries.md
+++ b/docs/manual/configuring/dag-entries.md
@@ -5,19 +5,16 @@ can add code that relies on other code. However, if you don't know what the
entries are called, it's hard to do that, so here is a list of the internal
entries in nvf:
-## `vim.luaConfigRC` (top-level DAG) {#ch-vim-luaconfigrc}
+`vim.luaConfigRC` (top-level DAG):
1. (`luaConfigPre`) - not a part of the actual DAG, instead, it's simply
inserted before the rest of the DAG
2. `globalsScript` - used to set globals defined in `vim.globals`
3. `basic` - used to set basic configuration options
-4. `optionsScript` - used to set options defined in `vim.o`
-5. `theme` (this is simply placed before `pluginConfigs`, meaning that
- surrounding entries don't depend on it) - used to set up the theme, which has
- to be done before other plugins
-6. `pluginConfigs` - the result of the nested `vim.pluginRC` (internal option,
- see the [Custom Plugins](/index.xhtml#ch-custom-plugins) page for adding your
- own plugins) DAG, used to set up internal plugins
-7. `extraPluginConfigs` - the result of `vim.extraPlugins`, which is not a
+4. `theme` (this is simply placed before `pluginConfigs`, meaning that surrounding entries don't depend on it) - used to set up the theme, which has to be done before other plugins
+5. `pluginConfigs` - the result of the nested `vim.pluginRC` (internal option,
+ see the [Custom Plugins](/index.xhtml#ch-custom-plugins) page for adding your own
+ plugins) DAG, used to set up internal plugins
+6. `extraPluginConfigs` - the result of `vim.extraPlugins`, which is not a
direct DAG, but is converted to, and resolved as one internally
-8. `mappings` - the result of `vim.maps`
+7. `mappings` - the result of `vim.maps`
diff --git a/docs/release-notes/rl-0.7.md b/docs/release-notes/rl-0.7.md
index a770952a..2d5d1f4d 100644
--- a/docs/release-notes/rl-0.7.md
+++ b/docs/release-notes/rl-0.7.md
@@ -212,12 +212,6 @@ everyone.
- Add [python-lsp-server](https://github.com/python-lsp/python-lsp-server) as an
additional Python LSP server.
-- Add [](#opt-vim.options) to set `vim.o` values in in your nvf configuration
- without using additional Lua. See option documentation for more details.
-
-- Add [](#opt-vim.dashboard.dashboard-nvim.setupOpts) to allow user
- configuration for [dashboard.nvim](https://github.com/nvimdev/dashboard-nvim)
-
[ppenguin](https://github.com/ppenguin):
- Telescope:
@@ -227,5 +221,3 @@ everyone.
[Soliprem](https://github.com/Soliprem)
- Add LSP and Treesitter support for R under `vim.languages.R`.
-- Add Otter support under `vim.lsp.otter` and an assert to prevent conflict with
- ccc
diff --git a/flake.lock b/flake.lock
index ecc02f27..91fc5060 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1373,22 +1373,6 @@
"type": "github"
}
},
- "plugin-otter-nvim": {
- "flake": false,
- "locked": {
- "lastModified": 1724585935,
- "narHash": "sha256-euHwoK2WHLF/hrjLY2P4yGrIbYyBN38FL3q4CKNZmLY=",
- "owner": "jmbuhr",
- "repo": "otter.nvim",
- "rev": "ca9ce67d0399380b659923381b58d174344c9ee7",
- "type": "github"
- },
- "original": {
- "owner": "jmbuhr",
- "repo": "otter.nvim",
- "type": "github"
- }
- },
"plugin-oxocarbon": {
"flake": false,
"locked": {
@@ -1877,7 +1861,6 @@
"plugin-obsidian-nvim": "plugin-obsidian-nvim",
"plugin-onedark": "plugin-onedark",
"plugin-orgmode-nvim": "plugin-orgmode-nvim",
- "plugin-otter-nvim": "plugin-otter-nvim",
"plugin-oxocarbon": "plugin-oxocarbon",
"plugin-plenary-nvim": "plugin-plenary-nvim",
"plugin-project-nvim": "plugin-project-nvim",
diff --git a/flake.nix b/flake.nix
index 987e3e59..c4996fcf 100644
--- a/flake.nix
+++ b/flake.nix
@@ -13,8 +13,8 @@
inherit inputs;
specialArgs = {inherit lib;};
} {
- # Allow users to bring their own systems.
- # «https://github.com/nix-systems/nix-systems»
+ # provide overridable systems
+ # https://github.com/nix-systems/nix-systems
systems = import inputs.systems;
imports = [
./flake/apps.nix
@@ -62,6 +62,7 @@
pkgs,
...
}: {
+ formatter = pkgs.alejandra;
devShells = {
default = self'.devShells.lsp;
nvim-nix = pkgs.mkShell {packages = [config.packages.nix];};
@@ -69,21 +70,6 @@
packages = with pkgs; [nil statix deadnix alejandra];
};
};
-
- # Provide the default formatter. `nix fmt` in project root
- # will format available files with the correct formatter.
- # P.S: Please do not format with nixfmt! It messes with many
- # syntax elements and results in unreadable code.
- formatter = pkgs.alejandra;
-
- # Check if codebase is properly formatted.
- # This can be initiated with `nix build .#checks.
.nix-fmt`
- # or with `nix flake check`
- checks = {
- nix-fmt = pkgs.runCommand "nix-fmt-check" {nativeBuildInputs = [pkgs.alejandra];} ''
- alejandra --check ${self} < /dev/null | tee $out
- '';
- };
};
};
@@ -170,11 +156,6 @@
flake = false;
};
- plugin-otter-nvim = {
- url = "github:jmbuhr/otter.nvim";
- flake = false;
- };
-
# Language support
plugin-sqls-nvim = {
url = "github:nanotee/sqls.nvim";
diff --git a/modules/plugins/dashboard/dashboard-nvim/config.nix b/modules/plugins/dashboard/dashboard-nvim/config.nix
index 7ded14c2..088842ad 100644
--- a/modules/plugins/dashboard/dashboard-nvim/config.nix
+++ b/modules/plugins/dashboard/dashboard-nvim/config.nix
@@ -5,17 +5,16 @@
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere;
- inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.dashboard.dashboard-nvim;
in {
config = mkIf cfg.enable {
- vim = {
- startPlugins = ["dashboard-nvim"];
+ vim.startPlugins = [
+ "dashboard-nvim"
+ ];
- pluginRC.dashboard-nvim = entryAnywhere ''
- require("dashboard").setup(${toLuaObject cfg.setupOpts})
- '';
- };
+ vim.pluginRC.dashboard-nvim = entryAnywhere ''
+ require("dashboard").setup{}
+ '';
};
}
diff --git a/modules/plugins/dashboard/dashboard-nvim/dashboard-nvim.nix b/modules/plugins/dashboard/dashboard-nvim/dashboard-nvim.nix
index cdc41fc7..518082eb 100644
--- a/modules/plugins/dashboard/dashboard-nvim/dashboard-nvim.nix
+++ b/modules/plugins/dashboard/dashboard-nvim/dashboard-nvim.nix
@@ -1,9 +1,7 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
- inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.dashboard.dashboard-nvim = {
enable = mkEnableOption "Fancy and Blazing Fast start screen plugin of neovim [dashboard.nvim]";
- setupOpts = mkPluginSetupOption "dashboard.nvim" {};
};
}
diff --git a/modules/plugins/languages/ts.nix b/modules/plugins/languages/ts.nix
index 5ceccecf..e6e718ed 100644
--- a/modules/plugins/languages/ts.nix
+++ b/modules/plugins/languages/ts.nix
@@ -226,7 +226,7 @@ in {
{
assertion = cfg.lsp.enable -> cfg.lsp.server != "tsserver";
message = ''
- As of a recent lspconfig update, the `tsserver` configuration has been renamed
+ As of a recent lspconfig update, he `tsserver` configuration has been renamed
to `ts_ls` to match upstream behaviour of `lspconfig`, and the name `tsserver`
is no longer considered valid by nvf. Please set `vim.languages.ts.lsp.server`
to `"ts_ls"` instead of to `${cfg.lsp.server}`
diff --git a/modules/plugins/lsp/default.nix b/modules/plugins/lsp/default.nix
index 421f5fda..a5d5163d 100644
--- a/modules/plugins/lsp/default.nix
+++ b/modules/plugins/lsp/default.nix
@@ -13,7 +13,6 @@
./trouble
./lsp-signature
./lightbulb
- ./otter
./lspkind
./lsplines
./nvim-docs-view
diff --git a/modules/plugins/lsp/otter/config.nix b/modules/plugins/lsp/otter/config.nix
deleted file mode 100644
index e5df92f7..00000000
--- a/modules/plugins/lsp/otter/config.nix
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- config,
- lib,
- ...
-}: let
- inherit (lib.modules) mkIf mkMerge;
- inherit (lib.nvim.dag) entryAnywhere;
- inherit (lib.nvim.lua) toLuaObject;
- inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding;
-
- cfg = config.vim.lsp;
-
- self = import ./otter.nix {inherit lib;};
- mappingDefinitions = self.options.vim.lsp.otter-nvim.mappings;
- mappings = addDescriptionsToMappings cfg.otter-nvim.mappings mappingDefinitions;
-in {
- config = mkIf (cfg.enable && cfg.otter-nvim.enable) {
- assertions = [
- {
- assertion = !config.vim.utility.ccc.enable;
- message = ''
- ccc and otter have a breaking conflict. It's been reported upstream. Until it's fixed, disable one of them
- '';
- }
- ];
- vim = {
- startPlugins = ["otter-nvim"];
-
- maps.normal = mkMerge [
- (mkSetBinding mappings.toggle "lua require'otter'.activate()")
- ];
-
- pluginRC.otter-nvim = entryAnywhere ''
- -- Enable otter diagnostics viewer
- require("otter").setup({${toLuaObject cfg.otter-nvim.setupOpts}})
- '';
- };
- };
-}
diff --git a/modules/plugins/lsp/otter/default.nix b/modules/plugins/lsp/otter/default.nix
deleted file mode 100644
index 935f1447..00000000
--- a/modules/plugins/lsp/otter/default.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- imports = [
- ./otter.nix
- ./config.nix
- ];
-}
diff --git a/modules/plugins/lsp/otter/otter.nix b/modules/plugins/lsp/otter/otter.nix
deleted file mode 100644
index 79797aaf..00000000
--- a/modules/plugins/lsp/otter/otter.nix
+++ /dev/null
@@ -1,64 +0,0 @@
-{lib, ...}: let
- inherit (lib.options) mkOption mkEnableOption;
- inherit (lib.nvim.binds) mkMappingOption;
- inherit (lib.types) bool str listOf;
- inherit (lib.nvim.types) mkPluginSetupOption;
-in {
- options.vim.lsp = {
- otter-nvim = {
- enable = mkEnableOption ''
- lsp features and a code completion source for code embedded in other documents [otter-nvim]
- '';
- mappings = {
- toggle = mkMappingOption "Activate LSP on Cursor Position [otter-nvim]" "lo";
- };
- setupOpts = mkPluginSetupOption "otter.nvim" {
- lsp = {
- diagnostic_update_event = mkOption {
- type = listOf str;
- default = ["BufWritePost"];
- description = ''
- `:h events` that cause the diagnostic to update.
- Set to: {"BufWritePost", "InsertLeave", "TextChanged" }
- for less performant but more instant diagnostic updates
- '';
- };
- };
- buffers = {
- set_filetype = mkOption {
- type = bool;
- default = false;
- description = ''
- if set to true, the filetype of the otterbuffers will be set. Other wide only
- the autocommand of lspconfig that attaches the language server will be
- executed without stting the filetype
- '';
- };
- write_to_disk = mkOption {
- type = bool;
- default = false;
- description = ''
- write .otter. files to disk on save of main buffer.
- Useful for some linters that require actual files.
- Otter files are deleted on quit or main buffer close
- '';
- };
- };
- strip_wrapping_quote_characters = mkOption {
- type = listOf str;
- default = ["'" ''"'' "`"];
- description = ''
- '';
- };
- handle_leading_whitespace = mkOption {
- type = bool;
- default = false;
- description = ''
- otter may not work the way you expect when entire code blocks are indented
- (eg. in Org files) When true, otter handles these cases fully.
- '';
- };
- };
- };
- };
-}
diff --git a/modules/wrapper/rc/config.nix b/modules/wrapper/rc/config.nix
index 6aa0b611..7baaed28 100644
--- a/modules/wrapper/rc/config.nix
+++ b/modules/wrapper/rc/config.nix
@@ -14,11 +14,10 @@
cfg = config.vim;
in {
config = let
+ filterNonNull = filterAttrs (_: value: value != null);
globalsScript =
- mapAttrsToList (name: value: "vim.g.${name} = ${toLuaObject value}") cfg.globals;
-
- optionsScript =
- mapAttrsToList (name: value: "vim.o.${name} = ${toLuaObject value}") cfg.options;
+ mapAttrsToList (name: value: "vim.g.${name} = ${toLuaObject value}")
+ (filterNonNull cfg.globals);
extraPluginConfigs = resolveDag {
name = "extra plugin configs";
@@ -78,12 +77,9 @@ in {
in {
vim = {
luaConfigRC = {
- # `vim.g` and `vim.o`
globalsScript = entryAnywhere (concatLines globalsScript);
- optionsScript = entryAfter ["basic"] (concatLines optionsScript);
-
- # Basic
- pluginConfigs = entryAfter ["optionsScript"] pluginConfigs;
+ # basic
+ pluginConfigs = entryAfter ["basic"] pluginConfigs;
extraPluginConfigs = entryAfter ["pluginConfigs"] extraPluginConfigs;
mappings = entryAfter ["extraPluginConfigs"] keymaps;
};
diff --git a/modules/wrapper/rc/options.nix b/modules/wrapper/rc/options.nix
index 70ab2a8a..4165da6d 100644
--- a/modules/wrapper/rc/options.nix
+++ b/modules/wrapper/rc/options.nix
@@ -129,38 +129,16 @@ in {
globals = mkOption {
type = attrs;
default = {};
- example = {"some_variable" = 42;};
description = ''
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.
- :::
- '';
- };
-
- options = mkOption {
- type = attrs;
- default = {};
- example = {visualbell = true;};
- description = ''
- 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.
- :::
+ E.g. {foo = "bar"} will set `vim.g.foo` to "bar" where
+ the type of `bar` in the resulting vimscript will be
+ infered from the type of the value in the `{name = value}`
+ pair.
'';
};