feat(root): customizable root detection and :LazyRoot command

This commit is contained in:
Folke Lemaitre 2023-10-11 08:59:18 +02:00
parent 5538ab2d64
commit 171a843edf
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
6 changed files with 126 additions and 38 deletions

View file

@ -5,6 +5,10 @@ vim.g.maplocalleader = "\\"
-- Enable LazyVim auto format
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`.
vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
local opt = vim.opt
opt.autowrite = true -- Enable auto write