mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-29 03:50:09 +02:00
* barbar: package option * Base16: package option * gruvbox: package option * nord: package option * one: package option * onedark: package option * tokyonight: package option * nvim-cmp: package option * coq: package option * lspkind: package option * helpers: added package option to mkPlugin * fugitive: package option * gitgutter: package option * gitsigns: package option * neogit: package option * ledger: package option * nix: package option * plantuml-syntax: package option * treesitter-context: package option + formatting * treesitter-refactor: package option + formatting * treesitter: package option * zig: package option * null-ls: package option * null-ls/servers: package option * lsp-lines: package option * lspsaga: package option * trouble: package option * luasnip: added description for package option * airline: package option * lightline: package option * lualine: package option * telescope: package option * telescope/frecency: package option * telescope/fzf-native: package option * telescope/media-files: package option * comment-nvim: package option * vim-commentary: package option * dashboard: package option * easyescape: package option * emmet: package option * endwise: package option * floaterm: package option * goyo: package option * intellitab: package option * mark-radar: package option * notify: package option * nvim-autopairs: package option * nvim-tree: package option * project-nvim: package option * specs: package option * startify: package option * surround: package option * undotree: package option
73 lines
2.3 KiB
Nix
73 lines
2.3 KiB
Nix
{ pkgs, config, lib, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.plugins.telescope.extensions.frecency;
|
|
in
|
|
{
|
|
options.plugins.telescope.extensions.frecency = {
|
|
enable = mkEnableOption "Enable frecency";
|
|
|
|
package = mkOption {
|
|
type = types.package;
|
|
default = pkgs.vimPlugins.telescope-frecency-nvim;
|
|
description = "Plugin to use for telescope frecency";
|
|
};
|
|
|
|
dbRoot = mkOption {
|
|
type = types.nullOr types.str;
|
|
description = "Path to parent directory of custom database location. Defaults to $XDG_DATA_HOME/nvim";
|
|
default = null;
|
|
};
|
|
defaultWorkspace = mkOption {
|
|
type = types.nullOr types.str;
|
|
description = "Default workspace tag to filter by e.g 'CWD' to filter by default to the current directory";
|
|
default = null;
|
|
};
|
|
ignorePatterns = mkOption {
|
|
type = types.nullOr (types.listOf types.str);
|
|
description = "Patterns in this list control which files are indexed";
|
|
default = null;
|
|
};
|
|
showScores = mkOption {
|
|
type = types.nullOr types.bool;
|
|
description = "Whether to show scores generated by the algorithm in the results";
|
|
default = null;
|
|
};
|
|
workspaces = mkOption {
|
|
type = types.nullOr (types.attrsOf types.str);
|
|
description = "this table contains mappings of workspace_tag -> workspace_directory";
|
|
default = null;
|
|
};
|
|
showUnindexed = mkOption {
|
|
type = types.nullOr types.bool;
|
|
description = "Determines if non-indexed files are included in workspace filter results";
|
|
default = null;
|
|
};
|
|
deviconsDisabled = mkOption {
|
|
type = types.nullOr types.bool;
|
|
description = "Disable devicons (if available)";
|
|
default = null;
|
|
};
|
|
};
|
|
|
|
config = let
|
|
configuration = {
|
|
db_root = cfg.dbRoot;
|
|
default_workspace = cfg.defaultWorkspace;
|
|
ignore_patterns = cfg.ignorePatterns;
|
|
show_scores = cfg.showScores;
|
|
workspaces = cfg.workspaces;
|
|
show_unindexed = cfg.showUnindexed;
|
|
devicons_disabled = cfg.deviconsDisabled;
|
|
};
|
|
in mkIf cfg.enable {
|
|
extraPackages = [ pkgs.sqlite ];
|
|
extraPlugins = with pkgs.vimPlugins; [
|
|
cfg.package
|
|
sqlite-lua
|
|
];
|
|
|
|
plugins.telescope.enabledExtensions = [ "frecency" ];
|
|
plugins.telescope.extensionConfig."frecency" = configuration;
|
|
};
|
|
}
|