Skip to content

Instantly share code, notes, and snippets.

View manzanit0's full-sized avatar

Javier García manzanit0

View GitHub Profile
@manzanit0
manzanit0 / init.lua
Created April 1, 2025 08:38
Neovim config
---@diagnostic disable: undefined-global
if vim.g.vscode then
return
end
-- encoding
vim.o.encoding = "utf-8"
vim.o.fileencoding = "utf-8"
@manzanit0
manzanit0 / http.lua
Last active July 17, 2025 07:41
HTTP request making pluging for neovim
local M = {}
local function parse_request_line(line)
local method, url, version = line:match("^(%S+)%s+(%S+)%s*(.*)")
if not method or not url then
return nil, "Invalid HTTP request line format"
end
if method:upper() ~= "GET" and method:upper() ~= "POST" and method:upper() ~= "PUT" and method:upper() ~= "DELETE" and method:upper() ~= "PATCH" then
return nil, "Unsupported HTTP method: " .. method