@@ -11,6 +11,8 @@ local config = {
11
11
disable = {},
12
12
--- @type table<string , string>
13
13
parser_map = require (" rocks_treesitter.ft_parser_map" ),
14
+ --- @type string ?
15
+ config_path = nil ,
14
16
}
15
17
16
18
local api = require (" rocks.api" )
@@ -32,6 +34,11 @@ local api = require("rocks.api")
32
34
--- File types to disable highlighting for (lua + toml config)
33
35
--- or a function to conditionally disable highlighting (lua only)
34
36
--- @field disable ? string[] | fun ( lang : string , bufnr : integer ): boolean
37
+ ---
38
+ --- Specify a config path, relative to the base rocks config file, to
39
+ --- install treesitter rocks (ex. "rocks-treesitter.toml"). If not set, they will be added
40
+ --- to the base config file
41
+ --- @field config_path ? string
35
42
36
43
local toml_config = api .get_rocks_toml ()[" treesitter" ]
37
44
--- @type RocksTreesitterOpts
@@ -75,5 +82,6 @@ config.disable = type(opts.disable) == "function" and opts.disable
75
82
--- @diagnostic disable-next-line : assign-type-mismatch
76
83
config .auto_install = vim .F .if_nil (opts .auto_install , config .auto_install )
77
84
config .parser_map = vim .tbl_extend (" force" , config .parser_map , opts .parser_map or {})
85
+ config .config_path = vim .F .if_nil (opts .config_path )
78
86
79
87
return config
0 commit comments