mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 18:31:35 +00:00
Merge branch 'main' into fix-highlight-color-type
This commit is contained in:
commit
43421d5612
10 changed files with 91 additions and 28 deletions
|
@ -107,6 +107,8 @@
|
||||||
- Add `LazyFile` user event.
|
- Add `LazyFile` user event.
|
||||||
- Migrate language modules from none-ls to conform/nvim-lint
|
- Migrate language modules from none-ls to conform/nvim-lint
|
||||||
- Add tsx support in conform and lint
|
- Add tsx support in conform and lint
|
||||||
|
- Moved code setting `additionalRuntimePaths` and `enableLuaLoader` out of
|
||||||
|
`luaConfigPre`'s default to prevent being overridden
|
||||||
|
|
||||||
[diniamo](https://github.com/diniamo):
|
[diniamo](https://github.com/diniamo):
|
||||||
|
|
||||||
|
@ -343,3 +345,7 @@
|
||||||
[howird](https://github.com/howird):
|
[howird](https://github.com/howird):
|
||||||
|
|
||||||
- Change python dap adapter name from `python` to commonly expected `debugpy`.
|
- Change python dap adapter name from `python` to commonly expected `debugpy`.
|
||||||
|
|
||||||
|
[aionoid](https://github.com/aionoid):
|
||||||
|
|
||||||
|
- Fix [render-markdown.nvim] file_types option type to list, to accept merging.
|
||||||
|
|
|
@ -30,7 +30,16 @@
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim = {
|
vim = {
|
||||||
startPlugins = ["chatgpt-nvim"];
|
startPlugins = [
|
||||||
|
"chatgpt-nvim"
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
"nui-nvim"
|
||||||
|
"plenary-nvim"
|
||||||
|
];
|
||||||
|
|
||||||
|
# ChatGPT.nvim explicitly depends on Telescope.
|
||||||
|
telescope.enable = true;
|
||||||
|
|
||||||
pluginRC.chagpt = entryAnywhere ''
|
pluginRC.chagpt = entryAnywhere ''
|
||||||
require("chatgpt").setup(${toLuaObject cfg.setupOpts})
|
require("chatgpt").setup(${toLuaObject cfg.setupOpts})
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
inherit (lib.lists) isList;
|
inherit (lib.lists) isList;
|
||||||
inherit (lib.types) bool enum either package listOf str;
|
inherit (lib.types) bool enum either package listOf str nullOr;
|
||||||
inherit (lib.nvim.lua) expToLua toLuaObject;
|
inherit (lib.nvim.lua) expToLua toLuaObject;
|
||||||
inherit (lib.nvim.types) diagnostics mkGrammarOption mkPluginSetupOption;
|
inherit (lib.nvim.types) diagnostics mkGrammarOption mkPluginSetupOption;
|
||||||
inherit (lib.nvim.dag) entryAnywhere;
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
|
@ -117,7 +117,18 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
setupOpts = mkPluginSetupOption "render-markdown" {};
|
setupOpts = mkPluginSetupOption "render-markdown" {
|
||||||
|
file_types = lib.mkOption {
|
||||||
|
type = nullOr (listOf str);
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
List of buffer filetypes to enable this plugin in.
|
||||||
|
|
||||||
|
This will cause the plugin to attach to new buffers who
|
||||||
|
have any of these filetypes.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
19
modules/plugins/mini/cursorword/config.nix
Normal file
19
modules/plugins/mini/cursorword/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
|
||||||
|
cfg = config.vim.mini.cursorword;
|
||||||
|
in {
|
||||||
|
vim = mkIf cfg.enable {
|
||||||
|
startPlugins = ["mini-cursorword"];
|
||||||
|
|
||||||
|
pluginRC.mini-ai = entryAnywhere ''
|
||||||
|
require("mini.cursorword").setup(${toLuaObject cfg.setupOpts})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
9
modules/plugins/mini/cursorword/cursorword.nix
Normal file
9
modules/plugins/mini/cursorword/cursorword.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
|
in {
|
||||||
|
options.vim.mini.cursorword = {
|
||||||
|
enable = mkEnableOption "mini.cursorword";
|
||||||
|
setupOpts = mkPluginSetupOption "mini.cursorword" {};
|
||||||
|
};
|
||||||
|
}
|
6
modules/plugins/mini/cursorword/default.nix
Normal file
6
modules/plugins/mini/cursorword/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cursorword.nix
|
||||||
|
./config.nix
|
||||||
|
];
|
||||||
|
}
|
|
@ -11,6 +11,7 @@
|
||||||
./colors
|
./colors
|
||||||
./comment
|
./comment
|
||||||
./completion
|
./completion
|
||||||
|
./cursorword
|
||||||
./diff
|
./diff
|
||||||
./doc
|
./doc
|
||||||
./extra
|
./extra
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) map mapAttrs filter;
|
inherit (builtins) map mapAttrs filter;
|
||||||
inherit (lib.attrsets) mapAttrsToList;
|
inherit (lib.attrsets) mapAttrsToList;
|
||||||
inherit (lib.strings) concatLines concatMapStringsSep;
|
inherit (lib.strings) concatLines concatMapStringsSep optionalString;
|
||||||
inherit (lib.trivial) showWarnings;
|
inherit (lib.trivial) showWarnings;
|
||||||
inherit (lib.generators) mkLuaInline;
|
inherit (lib.generators) mkLuaInline;
|
||||||
inherit (lib.nvim.dag) entryAfter mkLuarcSection resolveDag entryAnywhere;
|
inherit (lib.nvim.dag) entryAfter mkLuarcSection resolveDag entryAnywhere;
|
||||||
|
@ -72,6 +72,14 @@ in {
|
||||||
dag = cfg.luaConfigRC;
|
dag = cfg.luaConfigRC;
|
||||||
mapResult = result:
|
mapResult = result:
|
||||||
concatLines [
|
concatLines [
|
||||||
|
(optionalString (cfg.additionalRuntimePaths != []) ''
|
||||||
|
vim.opt.runtimepath:append(${toLuaObject cfg.additionalRuntimePaths})
|
||||||
|
'')
|
||||||
|
(optionalString cfg.enableLuaLoader ''
|
||||||
|
if vim.loader then
|
||||||
|
vim.loader.enable()
|
||||||
|
end
|
||||||
|
'')
|
||||||
cfg.luaConfigPre
|
cfg.luaConfigPre
|
||||||
(concatMapStringsSep "\n" mkLuarcSection result)
|
(concatMapStringsSep "\n" mkLuarcSection result)
|
||||||
cfg.luaConfigPost
|
cfg.luaConfigPost
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
{
|
{lib, ...}: let
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib.options) mkOption literalMD literalExpression;
|
inherit (lib.options) mkOption literalMD literalExpression;
|
||||||
inherit (lib.strings) optionalString;
|
|
||||||
inherit (lib.types) str bool int enum attrsOf lines listOf either path submodule anything;
|
inherit (lib.types) str bool int enum attrsOf lines listOf either path submodule anything;
|
||||||
inherit (lib.nvim.types) dagOf;
|
inherit (lib.nvim.types) dagOf;
|
||||||
inherit (lib.nvim.lua) listToLuaTable;
|
|
||||||
|
|
||||||
cfg = config.vim;
|
|
||||||
in {
|
in {
|
||||||
options.vim = {
|
options.vim = {
|
||||||
enableLuaLoader = mkOption {
|
enableLuaLoader = mkOption {
|
||||||
|
@ -286,21 +278,7 @@ in {
|
||||||
|
|
||||||
luaConfigPre = mkOption {
|
luaConfigPre = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
default = ''
|
default = "";
|
||||||
${optionalString (cfg.additionalRuntimePaths != []) ''
|
|
||||||
-- The following list is generated from `vim.additionalRuntimePaths`
|
|
||||||
-- and is used to append additional runtime paths to the
|
|
||||||
-- `runtimepath` option.
|
|
||||||
vim.opt.runtimepath:append(${listToLuaTable cfg.additionalRuntimePaths})
|
|
||||||
''}
|
|
||||||
|
|
||||||
${optionalString cfg.enableLuaLoader ''
|
|
||||||
if vim.loader then
|
|
||||||
vim.loader.enable()
|
|
||||||
end
|
|
||||||
''}
|
|
||||||
'';
|
|
||||||
|
|
||||||
defaultText = literalMD ''
|
defaultText = literalMD ''
|
||||||
By default, this option will **append** paths in
|
By default, this option will **append** paths in
|
||||||
[](#opt-vim.additionalRuntimePaths)
|
[](#opt-vim.additionalRuntimePaths)
|
||||||
|
|
|
@ -1020,6 +1020,22 @@
|
||||||
"url": "https://github.com/echasnovski/mini.completion/archive/35130cebc63ace7d6e4583f349af8cd3f3141af7.tar.gz",
|
"url": "https://github.com/echasnovski/mini.completion/archive/35130cebc63ace7d6e4583f349af8cd3f3141af7.tar.gz",
|
||||||
"hash": "0h5z5i62cc780bzw60rbizngvpyl4vk7j858pndyi2g572plz929"
|
"hash": "0h5z5i62cc780bzw60rbizngvpyl4vk7j858pndyi2g572plz929"
|
||||||
},
|
},
|
||||||
|
"mini-cursorword": {
|
||||||
|
"type": "GitRelease",
|
||||||
|
"repository": {
|
||||||
|
"type": "GitHub",
|
||||||
|
"owner": "echasnovski",
|
||||||
|
"repo": "mini.cursorword"
|
||||||
|
},
|
||||||
|
"pre_releases": false,
|
||||||
|
"version_upper_bound": null,
|
||||||
|
"release_prefix": null,
|
||||||
|
"submodules": false,
|
||||||
|
"version": "v0.15.0",
|
||||||
|
"revision": "6683f04509c380e3147cca368f90bbdb99641775",
|
||||||
|
"url": "https://api.github.com/repos/echasnovski/mini.cursorword/tarball/v0.15.0",
|
||||||
|
"hash": "0vqr4hkzq13ap6giyyp8asn5g6nnm406piq1a07a5nmkfxiskp9v"
|
||||||
|
},
|
||||||
"mini-diff": {
|
"mini-diff": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue