mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-26 18:59:00 +02:00
feat(root): allow custom functions as part of vim.g.root_spec
This commit is contained in:
parent
27ceb433a9
commit
b5495eb38a
2 changed files with 23 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue