mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 15:35:30 +00:00
dev: pkgOrStr function to help decide lsp server cmd
This commit is contained in:
parent
b1184bab47
commit
105fe86f74
1 changed files with 7 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{lib}:
|
{lib}:
|
||||||
with lib; let
|
with lib; let
|
||||||
diagnosticSubmodule = {...}: {
|
diagnosticSubmodule = _: {
|
||||||
options = {
|
options = {
|
||||||
type = mkOption {
|
type = mkOption {
|
||||||
description = "Type of diagnostic to enable";
|
description = "Type of diagnostic to enable";
|
||||||
|
|
@ -28,4 +28,10 @@ in {
|
||||||
mkPackageOption pkgs ["${grammar} treesitter"] {
|
mkPackageOption pkgs ["${grammar} treesitter"] {
|
||||||
default = ["vimPlugins" "nvim-treesitter" "builtGrammars" grammar];
|
default = ["vimPlugins" "nvim-treesitter" "builtGrammars" grammar];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# helper function to return the desired value based on entry type in lsp server cmd
|
||||||
|
pkgOrStr = v:
|
||||||
|
if builtins.isString v
|
||||||
|
then v
|
||||||
|
else lib.getExe v;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue