diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index f0f58e7c..014a4a23 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -19,6 +19,11 @@ unavailable as they have been refactored out of the main none-ls repository upstream. +- `vim.useSystemClipboard` has been deprecated as a part of removing most + top-level convenience options, and should instead be configured in the new + module interface. You may set [](#opt-vim.clipboard.registers) appropriately + to configure Neovim to use the system clipboard. + [NotAShelf](https://github.com/notashelf): [typst-preview.nvim]: https://github.com/chomosuke/typst-preview.nvim @@ -93,6 +98,8 @@ - Add `vim.clipboard` module for easily managing Neovim clipboard providers and relevant packages in a simple UI. + - This deprecates `vim.useSystemClipboard` as well, see breaking changes + section above for migration options. [amadaluzia](https://github.com/amadaluzia): diff --git a/modules/extra/deprecations.nix b/modules/extra/deprecations.nix index 86497130..91d8ef28 100644 --- a/modules/extra/deprecations.nix +++ b/modules/extra/deprecations.nix @@ -111,6 +111,15 @@ in { under the diagnostics module. Please consider using one of 'vim.diagnostics.config' or 'vim.luaConfigRC' to configure LSP lines for Neovim through its own diagnostics API. '') + + # 2025-05-04 + (mkRemovedOptionModule ["vim" "useSystemClipboard"] '' + Clipboard behaviour should now be controlled through the new, more fine-grained module + interface found in 'vim.clipboard'. To replicate previous behaviour, you may either + add 'vim.opt.clipboard:append("unnamedplus")' in luaConfigRC, or preferably set it + in 'vim.clipboard.registers'. Please see the documentation for the new module for more + details, or open an issue if you are confused. + '') ] # Migrated via batchRenameOptions. Further batch renames must be below this line. diff --git a/modules/neovim/init/basic.nix b/modules/neovim/init/basic.nix index 47bfe500..195ef5e7 100644 --- a/modules/neovim/init/basic.nix +++ b/modules/neovim/init/basic.nix @@ -34,12 +34,6 @@ in { description = "Enable syntax highlighting"; }; - useSystemClipboard = mkOption { - type = bool; - default = false; - description = "Make use of the clipboard for default yank and paste operations. Don't use * and +"; - }; - lineNumberMode = mkOption { type = enum ["relative" "number" "relNumber" "none"]; default = "relNumber"; @@ -144,10 +138,6 @@ in { # to pre-set Neovim options. Fear not, though as the Lua DAG is still as powerful as it # could be. luaConfigRC.basic = entryAfter ["globalsScript"] '' - ${optionalString cfg.useSystemClipboard '' - vim.opt.clipboard:append("unnamedplus") - ''} - ${optionalString cfg.syntaxHighlighting '' vim.cmd("syntax on") ''}