File tree Expand file tree Collapse file tree 1 file changed +32
-3
lines changed
Expand file tree Collapse file tree 1 file changed +32
-3
lines changed Original file line number Diff line number Diff line change 1- # From home-manager: https://github.com/nix-community/home-manager/blob/master/modules/lib/booleans.nix
21{ lib } : let
32 inherit ( builtins ) isString getAttr ;
4- inherit ( lib . options ) mkOption ;
5- inherit ( lib . types ) bool ;
3+ inherit ( lib . options ) mkOption mkEnableOption ;
4+ inherit ( lib . types ) listOf bool str submodule attrsOf anything ;
5+ inherit ( lib . generators ) mkLuaInline ;
6+ inherit ( lib . meta ) getExe ;
67 inherit ( lib . nvim . attrsets ) mapListToAttrs ;
8+ inherit ( lib . nvim . types ) luaInline ;
79in {
810 diagnosticsToLua = {
911 lang ,
3234 type = bool ;
3335 description = "Turn on ${ desc } for enabled languages by default" ;
3436 } ;
37+
38+ lspOptions = submodule {
39+ freeformType = attrsOf anything ;
40+ options = {
41+ capabilities = mkOption {
42+ type = luaInline ;
43+ default = mkLuaInline "default_capabilities" ;
44+ description = "LSP capabilitiess to pass to lspconfig" ;
45+ } ;
46+
47+ on_attach = mkOption {
48+ type = luaInline ;
49+ default = mkLuaInline "default_capabilities" ;
50+ description = "Function to execute when an LSP server attaches to a buffer" ;
51+ } ;
52+
53+ filetypes = mkOption {
54+ type = listOf str ;
55+ description = "Filetypes to auto-attach LSP in" ;
56+ } ;
57+
58+ cmd = mkOption {
59+ type = listOf str ;
60+ description = "Command used to start the LSP server" ;
61+ } ;
62+ } ;
63+ } ;
3564}
You can’t perform that action at this time.
0 commit comments