Skip to content

Commit

Permalink
feat: remove env file extension validation
Browse files Browse the repository at this point in the history
Now if it ends in json it will try to parse it as json, else it will fallback on .env file parsing
  • Loading branch information
sgatu committed Sep 14, 2024
1 parent 59afaac commit 6edb8fd
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions lua/rest-nvim/dotenv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ end
---@param path string file path of dotenv file
---@param bufnr number? buffer identifier, default to current buffer
function M.register_file(path, bufnr)
vim.validate({
path = {
path,
function(p)
return vim.endswith(p, ".env") or vim.endswith(p, ".json")
end,
"`.env` or `.json` filetype",
},
})
bufnr = bufnr or 0
vim.b[bufnr]._rest_nvim_env_file = path
vim.notify("Env file '" .. path .. "' has been registered", vim.log.levels.INFO, { title = "rest.nvim" })
Expand Down

0 comments on commit 6edb8fd

Please sign in to comment.