Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lua/neoconf/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ local M = {}

---@class Config
M.defaults = {
-- Use cwd for neoconf root, prevents searching upwards outside the current project
root_use_cwd = false,
-- on_write callback
on_write = function() end,
-- name of the local settings files
local_settings = ".neoconf.json",
-- name of the global settings file in your Neovim config directory
Expand Down
4 changes: 4 additions & 0 deletions lua/neoconf/workspace.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
local Config = require("neoconf.config")
local Settings = require("neoconf.settings")
local Util = require("neoconf.util")

Expand All @@ -10,6 +11,9 @@ local M = {}

---@param opts WorkspaceFindOptions
function M.find_root(opts)
if Config.options.root_use_cwd then
return tostring(vim.uv.cwd())
end
opts = opts or {}

local buf = opts.buffer ~= 0 and opts.buffer or vim.api.nvim_get_current_buf()
Expand Down
Loading