Skip to content

Commit 6edb8fd

Browse files
committed
feat: remove env file extension validation
Now if it ends in json it will try to parse it as json, else it will fallback on .env file parsing
1 parent 59afaac commit 6edb8fd

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

lua/rest-nvim/dotenv.lua

-9
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,6 @@ end
3333
---@param path string file path of dotenv file
3434
---@param bufnr number? buffer identifier, default to current buffer
3535
function M.register_file(path, bufnr)
36-
vim.validate({
37-
path = {
38-
path,
39-
function(p)
40-
return vim.endswith(p, ".env") or vim.endswith(p, ".json")
41-
end,
42-
"`.env` or `.json` filetype",
43-
},
44-
})
4536
bufnr = bufnr or 0
4637
vim.b[bufnr]._rest_nvim_env_file = path
4738
vim.notify("Env file '" .. path .. "' has been registered", vim.log.levels.INFO, { title = "rest.nvim" })

0 commit comments

Comments
 (0)