feat(root): allow custom functions as part of vim.g.root_spec

This commit is contained in:
Folke Lemaitre
2023-10-11 09:38:34 +02:00
parent f59cdff4d9
commit c33e7489ec
2 changed files with 23 additions and 3 deletions

View File

@ -6,7 +6,10 @@ vim.g.maplocalleader = "\\"
vim.g.autoformat = true
-- LazyVim root dir detection
-- Each entry can be a detector function like `lsp` or `cwd`, or a pattern like `.git` or `lua`.
-- Each entry can be:
-- * the name of a detector function like `lsp` or `cwd`
-- * a pattern or array of patterns like `.git` or `lua`.
-- * a function with signature `function(buf) -> string|string[]`
vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
local opt = vim.opt