Skip to content

Commit

Permalink
fix: incorrect docstring for rooter settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Feb 20, 2024
1 parent 6a7f162 commit 36aa11d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,21 @@ local opts = {
-- "lsp" : lsp detection
-- string[] : a list of directory patterns to look for
-- fun(bufnr: integer): string|string[] : a function that takes a buffer number and outputs detected roots
detector = { "lsp", { ".git", "_darcs", ".hg", ".bzr", ".svn", "lua", "Makefile", "package.json" } },
detector = {
"lsp", -- highest priority is getting workspace from running language servers
{ ".git", "_darcs", ".hg", ".bzr", ".svn" }, -- next check for a version controlled parent directory
{ "lua", "MakeFile", "package.json" }, -- lastly check for known project root files
},
-- ignore things from root detection
ignore = {
servers = {}, -- list of language server names to ignore (Ex. { "efm" })
dirs = {}, -- list of directory patterns (Ex. { "~/.cargo/*" })
},
-- whether or not to disable automatic working directory updating (update with `:AstroRoot`)
autochdir = true,
-- automatically update working directory (update manually with `:AstroRoot`)
autochdir = false,
-- scope of working directory to change ("global"|"tab"|"win")
scope = "global",
-- whether or not to notify on every working directory change
-- show notification on every working directory change
notify = false,
},
-- Configuration table of session options for AstroNvim's session management powered by Resession
Expand Down
20 changes: 12 additions & 8 deletions lua/astrocore/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,23 @@
---}
---```
---@field git_worktrees AstroCoreGitWorktree[]?
---Enable git integration for detached worktrees
---Enable and configure project root detection
---Example:
--
---```lua
---rooter = {
--- autochdir = true,
--- detector = { "lsp", { ".git" } },
--- detector = {
--- "lsp", -- highest priority is getting workspace from running language servers
--- { ".git", "_darcs", ".hg", ".bzr", ".svn" }, -- next check for a version controlled parent directory
--- { "lua", "MakeFile", "package.json" }, -- lastly check for known project root files
--- },
--- ignore = {
--- dirs = {},
--- servers = {},
--- }
--- notify = false,
--- scope = "global",
--- servers = {}, -- list of language server names to ignore (Ex. { "efm" })
--- dirs = {}, -- list of directory patterns (Ex. { "~/.cargo/*" })
--- },
--- autochdir = false, -- automatically update working directory
--- scope = "global", -- scope of working directory to change ("global"|"tab"|"win")
--- notify = false, -- show notification on every working directory change
---}
---```
---@field rooter AstroCoreRooterOpts|false?
Expand Down

0 comments on commit 36aa11d

Please sign in to comment.