Compare commits

...

20 commits

Author SHA1 Message Date
raf
79993c71d8
Merge pull request #898 from NotAShelf/ruby-fix
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
languages/ruby: fix missing semicolon
2025-05-13 14:53:39 +03:00
Soliprem
ae49dd7dd3
languages/ruby: fix missing semicolon
missing semicolon
2025-05-13 13:51:29 +02:00
raf
392f737401
Merge pull request #894 from cramt/add_ruby_lsp_as_ruby_server_option
add ruby lsp as ruby server option
2025-05-13 14:34:02 +03:00
raf
db2c5e6744
Merge pull request #897 from Gerg-L/blink
fix: install blink docs
2025-05-13 14:33:33 +03:00
Alexandra Østermark
3c79d4df64
Merge branch 'main' into add_ruby_lsp_as_ruby_server_option 2025-05-13 13:32:52 +02:00
Soliprem
55229043ba
neovim/clipboard: init module
neovim/clipboard: init module
2025-05-13 13:23:02 +02:00
Soliprem
89f1c02f04
Merge branch 'main' into clipboard-module 2025-05-13 13:21:22 +02:00
Gerg-L
e72bf9398d
fix: install blink docs 2025-05-12 20:04:29 -04:00
Alexandra Østermark
c2434da6b4
Merge remote-tracking branch 'origin/add_ruby_lsp_as_ruby_server_option' into add_ruby_lsp_as_ruby_server_option 2025-05-12 10:42:33 +02:00
Alexandra Østermark
8efdfd508e
add release notes 2025-05-12 10:41:58 +02:00
Alexandra Østermark
509c00c9de
Merge branch 'main' into add_ruby_lsp_as_ruby_server_option 2025-05-12 07:56:07 +02:00
Alexandra Østermark
a099cdaf97
add ruby lsp as ruby server option 2025-05-10 13:42:57 +02:00
Ching Pei Yang
b26e8b2db6
Merge branch 'main' into clipboard-module 2025-05-09 23:23:04 +02:00
raf
7365866e8d
Merge branch 'main' into clipboard-module 2025-05-09 14:12:31 +00:00
raf
ce08bf8d2c
Merge branch 'main' into clipboard-module 2025-05-09 02:36:05 +00:00
raf
60ab3c90b4
Merge branch 'main' into clipboard-module 2025-05-05 07:54:40 +00:00
raf
8162653c29
Merge branch 'main' into clipboard-module 2025-05-04 19:24:07 +00:00
raf
4b17e14f84
Merge branch 'main' into clipboard-module 2025-05-04 15:29:19 +00:00
69e75a00ed
neovim/basic: deprecate vim.useSystemClipboard 2025-05-04 18:23:54 +03:00
4678f73411
neovim/clipboard: init module 2025-05-04 18:23:48 +03:00
7 changed files with 133 additions and 11 deletions

View file

@ -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
@ -91,6 +96,11 @@
options for `vim.diagnostic.config()` can now be customized through the
[](#opt-vim.diagnostics.config) in nvf.
- 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):
[haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim
@ -377,3 +387,8 @@
- Add missing `right_align` option for existing `renderer.icons` options.
- Add missing `render.icons` options (`hidden_placement`,
`diagnostics_placement`, and `bookmarks_placement`).
[cramt](https://github.com/cramt):
- Add `rubylsp` option in `vim.languages.ruby.lsp.server` to use shopify's
ruby-lsp language server

View file

@ -14,8 +14,15 @@ rustPlatform.buildRustPackage (finalAttrs: {
hash = "sha256-bKe8SSg1HPWE7b4iRQJwiOVCrvvgttuHCOIa4U/38AY=";
};
forceShare = [
"man"
"info"
];
postInstall = ''
cp -r {lua,plugin} "$out"
mkdir -p "$out/doc"
cp 'doc/'*'.txt' "$out/doc/"
mkdir -p "$out/target"
mv "$out/lib" "$out/target/release"
'';

View file

@ -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.

View file

@ -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")
''}

View file

@ -0,0 +1,80 @@
{
config,
pkgs,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.options) mkOption mkEnableOption mkPackageOption;
inherit (lib.types) nullOr either str listOf submodule;
inherit (lib.attrsets) mapAttrs mapAttrsToList filterAttrs;
cfg = config.vim.clipboard;
in {
options = {
vim = {
clipboard = {
enable = mkEnableOption ''
clipboard management for Neovim. Users may still choose to manage their
clipboard through [](#opt-vim.options) should they wish to avoid using
this module.
'';
registers = mkOption {
type = either str (listOf str);
default = "";
example = "unnamedplus";
description = ''
The register to be used by the Neovim clipboard. Recognized types are:
* unnamed: Vim will use the clipboard register `"*"` for all yank, delete,
change and put operations which would normally go to the unnamed register.
* unnamedplus: A variant of the "unnamed" flag which uses the clipboard register
`"+"` ({command}`:h quoteplus`) instead of register `"*"` for all yank, delete,
change and put operations which would normally go to the unnamed register.
When `unnamed` and `unnamedplus` is included simultaneously yank and delete
operations (but not put) will additionally copy the text into register `"*"`.
Please see {command}`:h clipboard` for more details.
'';
};
providers = mkOption {
type = submodule {
options = let
clipboards = {
# name = "package name";
wl-copy = "wl-clipboard";
xclip = "xclip";
xsel = "xsel";
};
in
mapAttrs (name: pname: {
enable = mkEnableOption name;
package = mkPackageOption pkgs pname {nullable = true;};
})
clipboards;
};
default = {};
description = ''
Clipboard providers for which packages will be added to nvf's
{option}`extraPackages`. The `package` field may be set to `null`
if related packages are already found in system packages to
potentially reduce closure sizes.
'';
};
};
};
};
config = mkIf cfg.enable {
vim = {
options.clipboard = cfg.registers;
extraPackages = mapAttrsToList (_: v: v.package) (
filterAttrs (_: v: v.enable && v.package != null) cfg.providers
);
};
};
}

View file

@ -2,6 +2,7 @@
imports = [
./autocmds.nix
./basic.nix
./clipboard.nix
./debug.nix
./diagnostics.nix
./highlight.nix

View file

@ -9,6 +9,8 @@
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.nvim.types) mkGrammarOption diagnostics;
inherit (lib.nvim.lua) expToLua;
inherit (lib.lists) isList;
inherit (lib.types) either listOf package str enum;
cfg = config.vim.languages.ruby;
@ -24,7 +26,25 @@
flags = {
debounce_text_changes = 150,
},
cmd = { "${pkgs.solargraph}/bin/solargraph", "stdio" }
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{ "${cfg.lsp.package}/bin/solargraph", "stdio" }''
}
}
'';
};
rubylsp = {
package = pkgs.ruby-lsp;
lspConfig = ''
lspconfig.ruby_lsp.setup {
capabilities = capabilities,
on_attach = default_on_attach,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{ "${cfg.lsp.package}/bin/ruby-lsp" }''
}
}
'';
};