mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-16 17:11:02 +00:00
Squash merge new-codeactions into custom
This commit is contained in:
parent
654ed242c1
commit
052582c30a
11 changed files with 67 additions and 61 deletions
|
|
@ -17,11 +17,16 @@ isMaximal: {
|
||||||
lspkind.enable = false;
|
lspkind.enable = false;
|
||||||
lightbulb.enable = true;
|
lightbulb.enable = true;
|
||||||
lspsaga.enable = false;
|
lspsaga.enable = false;
|
||||||
nvimCodeActionMenu.enable = isMaximal;
|
|
||||||
trouble.enable = true;
|
trouble.enable = true;
|
||||||
lspSignature.enable = true;
|
lspSignature.enable = true;
|
||||||
lsplines.enable = isMaximal;
|
lsplines.enable = isMaximal;
|
||||||
nvim-docs-view.enable = isMaximal;
|
nvim-docs-view.enable = isMaximal;
|
||||||
|
|
||||||
|
# Code Actions
|
||||||
|
code-actions = {
|
||||||
|
enable = true;
|
||||||
|
fastaction-nvim.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
debugger = {
|
debugger = {
|
||||||
|
|
@ -205,6 +210,7 @@ isMaximal: {
|
||||||
go = ["90" "130"];
|
go = ["90" "130"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
fastaction.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
assistant = {
|
assistant = {
|
||||||
|
|
|
||||||
17
flake.lock
generated
17
flake.lock
generated
|
|
@ -571,6 +571,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"plugin-fastaction-nvim": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1721396662,
|
||||||
|
"narHash": "sha256-L7na78FsE+QHlEwxMpiwQcoOPhtmrknvdTZfzUoDANI=",
|
||||||
|
"owner": "Chaitanyabsprip",
|
||||||
|
"repo": "fastaction.nvim",
|
||||||
|
"rev": "2384dea7ba81d2709d0bee0e4bc7a8831ff13a9d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Chaitanyabsprip",
|
||||||
|
"repo": "fastaction.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"plugin-fidget-nvim": {
|
"plugin-fidget-nvim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -1855,6 +1871,7 @@
|
||||||
"plugin-dracula": "plugin-dracula",
|
"plugin-dracula": "plugin-dracula",
|
||||||
"plugin-dressing-nvim": "plugin-dressing-nvim",
|
"plugin-dressing-nvim": "plugin-dressing-nvim",
|
||||||
"plugin-elixir-tools": "plugin-elixir-tools",
|
"plugin-elixir-tools": "plugin-elixir-tools",
|
||||||
|
"plugin-fastaction-nvim": "plugin-fastaction-nvim",
|
||||||
"plugin-fidget-nvim": "plugin-fidget-nvim",
|
"plugin-fidget-nvim": "plugin-fidget-nvim",
|
||||||
"plugin-flutter-tools": "plugin-flutter-tools",
|
"plugin-flutter-tools": "plugin-flutter-tools",
|
||||||
"plugin-gesture-nvim": "plugin-gesture-nvim",
|
"plugin-gesture-nvim": "plugin-gesture-nvim",
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,11 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plugin-fastaction-nvim = {
|
||||||
|
url = "github:Chaitanyabsprip/fastaction.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
plugin-lsp-signature = {
|
plugin-lsp-signature = {
|
||||||
url = "github:ray-x/lsp_signature.nvim";
|
url = "github:ray-x/lsp_signature.nvim";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,12 @@ in {
|
||||||
Tidalcycles language support has been removed as of 2024-06-06 as it was long unmaintained. If
|
Tidalcycles language support has been removed as of 2024-06-06 as it was long unmaintained. If
|
||||||
you depended on this functionality, please open an issue.
|
you depended on this functionality, please open an issue.
|
||||||
'')
|
'')
|
||||||
|
|
||||||
|
# 2024-07-20
|
||||||
|
(mkRemovedOptionModule ["vim" "lsp" "nvimCodeActionMenu"] ''
|
||||||
|
nvimCodeActionMenu has been deprecated and archived upstream. As of 0.7, code-actions will be
|
||||||
|
available under `vim.lsp.code-actions.enable` and `vim.lsp.code.actions.<plugin>.enable`.
|
||||||
|
Please take a look at the nvf manual for more details.
|
||||||
|
'')
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
# lsp plugins
|
# lsp plugins
|
||||||
./lspsaga
|
./lspsaga
|
||||||
./nvim-code-action-menu
|
|
||||||
./trouble
|
./trouble
|
||||||
./lsp-signature
|
./lsp-signature
|
||||||
./lightbulb
|
./lightbulb
|
||||||
|
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib.modules) mkIf;
|
|
||||||
inherit (lib.nvim.dag) entryAnywhere;
|
|
||||||
inherit (lib.nvim.binds) mkSetBinding addDescriptionsToMappings pushDownDefault;
|
|
||||||
inherit (lib.nvim.lua) toLuaObject;
|
|
||||||
|
|
||||||
cfg = config.vim.lsp;
|
|
||||||
|
|
||||||
self = import ./nvim-code-action-menu.nix {inherit lib;};
|
|
||||||
mappingDefinitions = self.options.vim.lsp.nvimCodeActionMenu.mappings;
|
|
||||||
mappings = addDescriptionsToMappings cfg.nvimCodeActionMenu.mappings mappingDefinitions;
|
|
||||||
in {
|
|
||||||
config = mkIf (cfg.enable && cfg.nvimCodeActionMenu.enable) {
|
|
||||||
vim = {
|
|
||||||
startPlugins = ["nvim-code-action-menu"];
|
|
||||||
|
|
||||||
maps.normal = mkSetBinding mappings.open ":CodeActionMenu<CR>";
|
|
||||||
|
|
||||||
binds.whichKey.register = pushDownDefault {
|
|
||||||
"<leader>c" = "+CodeAction";
|
|
||||||
};
|
|
||||||
|
|
||||||
pluginRC.code-action-menu = entryAnywhere ''
|
|
||||||
-- border configuration
|
|
||||||
vim.g.code_action_menu_window_border = ${toLuaObject config.vim.ui.borders.plugins.code-action-menu.style}
|
|
||||||
|
|
||||||
-- show individual sections of the code action menu
|
|
||||||
${lib.optionalString cfg.nvimCodeActionMenu.show.details "vim.g.code_action_menu_show_details = true"}
|
|
||||||
${lib.optionalString cfg.nvimCodeActionMenu.show.diff "vim.g.code_action_menu_show_diff = true"}
|
|
||||||
${lib.optionalString cfg.nvimCodeActionMenu.show.actionKind "vim.g.code_action_menu_show_action_kind = true"}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
{lib, ...}: let
|
|
||||||
inherit (lib.options) mkEnableOption;
|
|
||||||
inherit (lib.nvim.binds) mkMappingOption;
|
|
||||||
in {
|
|
||||||
options.vim.lsp = {
|
|
||||||
nvimCodeActionMenu = {
|
|
||||||
enable = mkEnableOption "nvim code action menu";
|
|
||||||
|
|
||||||
show = {
|
|
||||||
details = mkEnableOption "Show details" // {default = true;};
|
|
||||||
diff = mkEnableOption "Show diff" // {default = true;};
|
|
||||||
actionKind = mkEnableOption "Show action kind" // {default = true;};
|
|
||||||
};
|
|
||||||
|
|
||||||
mappings = {
|
|
||||||
open = mkMappingOption "Open code action menu [nvim-code-action-menu]" "<leader>ca";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -8,5 +8,6 @@
|
||||||
./illuminate
|
./illuminate
|
||||||
./breadcrumbs
|
./breadcrumbs
|
||||||
./borders
|
./borders
|
||||||
|
./fastaction
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
20
modules/plugins/ui/fastaction/config.nix
Normal file
20
modules/plugins/ui/fastaction/config.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf mkDefault;
|
||||||
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
|
||||||
|
cfg = config.vim.ui.fastaction;
|
||||||
|
in {
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
vim = {
|
||||||
|
ui.fastaction.setupOpts.register_ui_select = mkDefault true;
|
||||||
|
|
||||||
|
startPlugins = ["fastaction-nvim"];
|
||||||
|
pluginRC.fastaction-nvim = entryAnywhere "require('fastaction').setup(${toLuaObject cfg.setupOpts})";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./nvim-code-action-menu.nix
|
./fastaction-nvim.nix
|
||||||
./config.nix
|
./config.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
9
modules/plugins/ui/fastaction/fastaction-nvim.nix
Normal file
9
modules/plugins/ui/fastaction/fastaction-nvim.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
|
in {
|
||||||
|
options.vim.ui.fastaction = {
|
||||||
|
enable = mkEnableOption "overriding vim.ui.select with fastaction.nvim";
|
||||||
|
setupOpts = mkPluginSetupOption "fastaction" {};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue