mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
treewide: begin restructuring the module tree
This commit is contained in:
parent
e1835f6c46
commit
7c730a78e5
254 changed files with 749 additions and 664 deletions
20
modules/plugins/lsp/lspkind/config.nix
Normal file
20
modules/plugins/lsp/lspkind/config.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
config = mkIf (cfg.enable && cfg.lspkind.enable) {
|
||||
vim.startPlugins = ["lspkind"];
|
||||
vim.luaConfigRC.lspkind = entryAnywhere ''
|
||||
local lspkind = require'lspkind'
|
||||
local lspkind_opts = {
|
||||
mode = '${cfg.lspkind.mode}'
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/lsp/lspkind/default.nix
Normal file
6
modules/plugins/lsp/lspkind/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./lspkind.nix
|
||||
];
|
||||
}
|
16
modules/plugins/lsp/lspkind/lspkind.nix
Normal file
16
modules/plugins/lsp/lspkind/lspkind.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) enum;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
lspkind = {
|
||||
enable = mkEnableOption "vscode-like pictograms for lsp [lspkind]";
|
||||
|
||||
mode = mkOption {
|
||||
description = "Defines how annotations are shown";
|
||||
type = enum ["text" "text_symbol" "symbol_text" "symbol"];
|
||||
default = "symbol_text";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue