1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 19:46:06 +01:00
Commit graph

302 commits

Author SHA1 Message Date
Michael Goldberger
416de18306 modules/clipboard: add pbcopy clipboard provider 2025-10-27 21:42:13 +00:00
saygo-png
fc66d83c77 modules/dependencies: add jupytext dependency
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-10-27 03:03:18 +00:00
Gaetan Lepage
822e21e5b3 dependencies: add fd 2025-10-25 23:03:00 +00:00
Gaetan Lepage
593e8114cd plugins/efmls-configs: use dependencies for efm-langserver 2025-10-23 23:18:54 +00:00
saygo-png
cf32b498bc modules/autocmd: remove helpers
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-10-18 18:31:00 +00:00
Axel Karjalainen
4c4cac6445 docs: use official names of NixOS, Home Manager and nix-darwin 2025-10-18 00:05:26 +00:00
saygo-png
32a3fa118d plugins/nvim-osc52: remove module
The plugin is obsolete as the feature provided by it has been added to
Neovim itself.

Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-10-14 20:15:15 +00:00
Gaetan Lepage
c660702482 plugins/wtf: migrate to mkNeovimPlugin 2025-10-11 16:54:26 +00:00
Matt Sturgeon
bb9d744b64 modules/lsp: propagate pkgs arg to server modules
This allows simplifying the `importApply` and also paves the way for
custom server modules to define arbitrary package options.
2025-10-10 14:11:54 +00:00
Matt Sturgeon
9e77c8e4a9 modules/lsp: allow servers to install multiple packages
Adds two internal per-server options: `packages.prefix` & `packages.suffix`.

These options allow the server module to install multiple packages, and
control which end up being prefixed or suffixed on the PATH.

This simplifies the propagating code in `modules/lsp/servers/default.nix`,
which can now zip up the enabled server `packages` attrs.
2025-10-10 14:11:54 +00:00
Matt Sturgeon
2414e8e99f modules/lsp: auto-import per-server custom modules
Adding a module in the following places will import the module into that
specific server's submodule.

This allows creating server-specific options.

Added a test case to ensure all custom modules correspond to an actual
server option to avoid accidental dead code.
2025-10-10 14:11:54 +00:00
Matt Sturgeon
cf6c8ef1fa modules/lsp: be explicit about shorthandOnlyDefinesConfig
`shorthandOnlyDefinesConfig` is true by default for `lib.types.submodule`,
and false by default for `lib.types.submoduleWith` and `lib.evalModules`.

Since we rely on it for our `lsp.servers.*.config` option, let's enable
it explicitly.
2025-10-09 15:31:01 +00:00
Matt Sturgeon
9f336d2d71 modules/lsp: rename server settingsconfig
See RFC: https://github.com/nix-community/nixvim/issues/3745

This effectively reverts 21688b1d2a
2025-10-09 15:31:01 +00:00
Matt Sturgeon
20a7c92306 modules/lsp: handle missing package in server option desc
The `lsp.servers.<name>` option description links to the server's
homepage if it can evaluate the default package's `meta.homepage`.

However, users may evaluate this description, e.g. when building NixOS
docs with `documentation.nixos.includeAllModules`. Further, users may
have a different nixpkgs revisions to ours. Therefore, we need to allow
for the package not being in nixpkgs.

Since `mkPackageOption` will throw in the default, we can catch it with
`tryEval`.
2025-10-07 21:41:36 +00:00
Austin Horstman
a68291151c plugins/presence: rename module 2025-10-06 21:22:59 +00:00
Austin Horstman
98c0bd99a1 plugins/rust-tools: remove module 2025-10-06 21:21:49 +00:00
Austin Horstman
af69a39a5f dependencies: add rzls 2025-10-06 16:38:18 +00:00
Austin Horstman
6b3bea319b dependencies: add roslyn_ls 2025-10-05 10:29:09 +00:00
Austin Horstman
138a387afb dependencies: add copilot 2025-10-04 04:03:15 +00:00
Matt Sturgeon
fe059cd395 flake: add nixf-diagnose to treefmt config
Checks nixd's diagnostic lints using libnixf.
2025-10-01 00:42:40 +00:00
Austin Horstman
7038675452 modules/dependencies: add gemini and opencode 2025-10-01 00:18:41 +00:00
Matt Sturgeon
94331cc50d plugins/lsp: use the new lsp module under the hood
- Re-implement setup wrapping and capabilities to preserve existing
  behaviour
- Alias `package` options to new lsp module
- Alias `packageFallback` options to new lsp module
- Alias `preConfig` and `postConfig` to `lsp.luaConfig`
2025-09-30 20:16:00 +00:00
Matt Sturgeon
cb3653a1a8 modules/lsp: select relevant fields in keymaps table
We only use `mode`, `key`, `action`, and `options`; so explicitly
inherit those.

This means we don't serialise attrs that aren't needed at runtime,
such as `lspBufAction`.
2025-09-30 17:01:17 +00:00
Matt Sturgeon
f421af99fe modules/lsp: print keymaps table multiline
Makes `init.lua` easier to read.

Follow up to 9faa339d9e
2025-09-30 17:01:17 +00:00
Matt Sturgeon
d3e7315bf7 modules/test: add extraInputs option
Allows adding additional derivations to the build closure, useful for
including `pkgs.testers` or other derivations as part of a module test.
2025-09-30 17:01:17 +00:00
Gaetan Lepage
9faa339d9e modules/lsp: use a for loop to create LSP keymaps 2025-09-30 07:30:40 +00:00
Matt Sturgeon
167ea865e5 modules/lsp: port packageFallback option from plugins.lsp
Added to `plugins.lsp` in 6a054de04d
2025-09-28 23:07:35 +00:00
Gaetan Lepage
ef367c456b dependencies: move imagemagick definition in dependencies.nix 2025-09-16 14:59:17 +00:00
Gaetan Lepage
e1e056e82e dependencies: ensure __depPackages.foo.* options are set only once 2025-09-16 14:47:38 +00:00
saygo-png
cd427977f3 modules/performance: add excludedPlugins option to byte compilation
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-09-14 11:48:13 +00:00
Sandro Jäckel
51edc33c97 modules/output: add waylandSupport option 2025-09-09 17:09:44 +00:00
saygo-png
a04b93fa7b treewide: Disable fixup phase for builds
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-09-06 07:55:19 +00:00
Gaetan Lepage
8529f1c86b treewide: format with new treefmt 2025-07-25 16:18:00 +00:00
n0099
8c5257088b modules/files: improve extraFiles example 2025-07-08 17:11:55 +00:00
Gutyina Gergő
ef0fa015a8 top-level/output: add enablePrintInit option 2025-07-05 20:09:35 +00:00
Ladas552
c39f5f39c3 plugins/telescope-zf-native-nvim: init
Add support for [telescope-zf-native.nvim](https://github.com/natecraddock/telescope-zf-native.nvim), providing native telescope bindings to zf for sorting results .
2025-06-27 19:38:59 +00:00
sportshead
2b6f694b48 output: add extraPackagesAfter option
Allow users to add packages to the end of `PATH` in the neovim wrapper.
This is useful for LSP versions that might need to be overriden based on
the environment, e.g. `haskell-language-server` versions provided by a
project's devshell.
2025-06-08 22:14:58 +00:00
Stanislav Asunkin
65d35db5ca modules/performance: fix specifying combinePlugin.standalonePlugins as packages when byte compilation enabled
Previously, specifying plugins as packages in the
`performance.combinePlugins.standalonePlugins` option did not work when
the `performance.byteCompileLua` option was also enabled. This issue was
due to several package transformations performed by the
`byteCompileLua` which broke package comparison.

There are at least three methods to fix the issue:

- Change transformation order: combine plugins first, then byte-compile
  them.
- Compare every possible transformation when determining if plugins are
  standalone.
- Get the name of the package and use it for comparison.

The first method did not work because the current `byteCompileLuaDrv`
implementation does not support symlinks to directories. The second
method appears too fragile. This commit implements the third method, as
it requires minimal code changes and is straightforward. The downside is
that it might exclude multiple packages with the same name, although
this should be rare.
2025-06-02 18:15:32 +03:00
Andrey Petrov
1c5c991fda
modules/lsp/servers: Fix lua_ls example
Example was referring to `luals` instead of `lua_ls`
2025-05-25 11:29:19 -04:00
Matt Sturgeon
cbd5f7de5e
modules/lsp/onAttach: fix bufnr and document event arg
`:h event-args`: https://neovim.io/doc/user/api.html#event-args
`:h LspAttach`: https://neovim.io/doc/user/lsp.html#LspAttach

Fixes #3319
2025-05-13 18:45:00 +01:00
Stanislav Asunkin
49a7bb573a modules/top-level: change usages of import to callPackage 2025-05-12 17:39:01 +03:00
Stanislav Asunkin
75f2c1b1f1 modules/performance: ensure dependencies of lua packages also compiled
Previously only extraLuaPackages themselves were byte-compiled, not
theirs dependencies. This commit fixes that by compiling lua packages
recursively. It uses byte-compile-lua-lib.nix shared file.
Also this commit uses the shared stub lua libraries for extraLuaPackages
byte-compiling test.
2025-05-12 17:39:01 +03:00
Stanislav Asunkin
9474ce916a modules/performance: ensure all lua dependencies are byte-compiled
This commit replaces custom lua plugins in tests with shared stub
plugins from utils module.
After this change the test has started to fail. Debugging this issue
I found out that dependencies of plugins weren't processed.
This commit improves the test assertion to detect duplicated
dependencies in this case and fixes the underlying issue by also
processing dependencies.
2025-05-12 17:39:01 +03:00
Stanislav Asunkin
0d78a47792 modules/top-level/plugins: use mapNormalizedPlugins utils function 2025-05-12 17:39:01 +03:00
Stanislav Asunkin
2c6182351f modules/performance: add ability to byte-compile plugin lua dependencies
This commit adds byte compiling of plugin lua dependencies
(specifically propagatedBuildInputs). It's enabled by
`performance.byteCompileLua.luaLib` option.
2025-05-12 17:39:01 +03:00
Stanislav Asunkin
404e56066f modules/performance: add ability to byte compile extraLuaPackages
This commit adds `performance.byteCompileLua.luaLib` options. When
enabled it byte-compiles lua packages from extraLuaPackages option.
2025-05-12 17:39:01 +03:00
Austin Horstman
52c68b4da4 plugins/claude-code: add claude-code dependency 2025-05-08 10:35:31 +02:00
Matt Sturgeon
a45b5f372f modules/lsp: add onAttach option
Similar to `plugins.lsp.onAttach`, implement a "global" equivalent to
the per-server `on_attach` callback.

This is implemented using a `LspAttach` autoCmd.
2025-05-06 14:08:03 +01:00
Matt Sturgeon
5308425718
modules/lsp/servers: move to dedicated file/dir
Move the code related to the `lsp.servers` option into a dedicated module,
cleaning up `modules/lsp/default.nix`.
2025-05-05 23:43:30 +01:00
Matt Sturgeon
552dec0e55
modules/lsp/keymaps: init
Initial LSP keymaps option, inspired by `keymapsOnEvent` and
`plugins.lsp.keymaps`.

Users can define `lspBufAction` instead of `action` if they wish to use
a `vim.lsp.buf.<action>` callback.
2025-05-03 22:50:28 +01:00