Commit graph

24 commits

Author SHA1 Message Date
Gaetan Lepage
db01a0dd97 modules: add env option 2025-03-24 18:50:29 +01:00
Gaetan Lepage
17905dec3d modules: let extraPlugins accept null values 2024-12-17 22:46:34 +01:00
Austin Horstman
1c9ba58aef
modules: cleanup with lib 2024-09-03 22:12:33 -05:00
Matt Sturgeon
6975ee09f5
modules/outputs: make type readOnly at the top-level
Instead of relying on `lib.mkForce` we can enforce this more strictly by
setting the option "readOnly".
2024-08-20 22:02:29 +01:00
Stanislav Asunkin
299d0406bb modules/output: refactor config generation
The motivation for this change was to avoid generating empty
config sections like

    vim.cmd([[

    ]])

To make a config generation cleaner several helper functions introduced:

* `hasContent` have been moved to helpers
* `concatNonEmptyLines` joins strings (which has content) separated with
  newlines
* `wrapVimscriptForLua` wraps a lua string for using in Vimscript, but
  only if the string has content, otherwise empty string is returned
* `wrapLuaForVimscript` wraps Vimscript for using in lua, but only if
  the string has content, otherwise empty string is returned

Added tests:

* testing that all possible config sections are present in the final
  generated config
* testing that the config files generated by empty `files` definitions
  don't have any content in it
2024-07-22 23:18:53 +02:00
Matt Sturgeon
086873bed9
modules: refactor extraFiles
Moved `extraFiles` from `modules/output.nix` into its own file `modules/files.nix`.

Users should now assign text to a `text` attribute, however they could
also assign a file path to a `source` attribute instead.

The old method of directly assigning a string still works, and is
coerced to the new type along with a deprecation warning.
2024-07-07 16:42:47 +01:00
traxys
62f32bfc71 treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
Gaetan Lepage
f2f97d844b misc: allow null in extraPackages 2024-04-24 08:10:51 +02:00
Peter Tonner
c795b2ee40 misc: fix python packages option name 2024-01-06 21:17:55 +01:00
Gaetan Lepage
d52f656a8b misc: fix python environment options 2024-01-06 20:11:22 +01:00
Gaetan Lepage
1ab5159acf modules: add python options to specify the python environment 2024-01-06 17:39:17 +01:00
Gaetan Lepage
b6724702b4 misc: refactor imports, prefer adding helpers to args rather than importing it 2023-11-06 16:33:39 +01:00
traxys
5a498edd14
modules/output: Allow to specify text to add as extra files (#343)
To enable some features (like adding tree-sitter queries) we need to add
files to specific directories in the runtime path (queries/lang/file.scm
for tree-sitter queries for example).

This commit adds support for specifying such files. You must be careful
to not have any collisions between `files` and `extraFiles`.
2023-04-21 20:04:58 +02:00
Luc Chabassier
a6eec507cc
Enable creation of other config files than init.lua (#246) 2023-04-20 22:41:37 +02:00
traxys
bd4384a2e5
plugin/luasnip: Add jsregexp lua dependency (#274)
The lua dependency is required to perform transforms (luasnip can
fallback to a simpler algorithm if it's absent). This requires us to
expose the `extraLuaPackages` option of makeNeovimConfig.
2023-03-18 22:44:34 +01:00
Gaétan Lepage
264de8cefb
added formatter + reformat existing codebase (#175) 2023-02-20 10:42:13 +00:00
*Kim Zick
a7fbb81224
options: add viAlias and vimAlias (#75) 2022-12-08 17:12:57 +00:00
Pedro Alves
1a89cd2107 (hopefully) fix #65 2022-11-08 11:19:38 +00:00
dfangx
3849a1de9a
Use init.lua instead of init.vim (#64)
* Use init.lua instead of init.vim

* fix standalone generation

Co-authored-by: cyrusng <cyrus.ng@protonmail.com>
Co-authored-by: Pedro Alves <pta2002@pta2002.com>
2022-11-07 15:59:10 +00:00
Pedro Alves
e8ab365a4a fix output module 2022-10-18 23:23:49 +01:00
Luc Chabassier
f2a103da30
Allow using global config with hm and nixos (#48)
* remove useless nixvim file

* reorganize flake outputs

* use global config file with home-manager and nixos
2022-10-17 14:08:17 +01:00
Pedro Alves
a38d531bf4 set colorscheme before setting globals (#46) 2022-10-17 10:21:37 +01:00
Luc Chabassier
1fe6ab0e08
make sure the runtimepath is set in NixOS 22.05 (#44) 2022-10-07 14:54:04 +01:00
Pedro Alves
4ddd3969e5
nixvim: support standalone nixvim
This represents a major rearchitecture for nixvim, so I'm leaving this up to track the progress for now, and to serve as a reference for any breaking changes during transition.

The main change is, of course, being able to use nixvim standalone. To do this, you should use the new build function, which takes in two arguments: the system architecture (e.g. x86_64-linux) and the configuration. For the new configuration, do not use the programs.nixvim. prefix.

For module development, the main change is that you should no longer prefix your modules with programs.nixvim..
2022-09-18 11:19:23 +01:00