From cfc0e4b5cd738b0f8b64061381ea55d3e935a6dd Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Thu, 28 Dec 2023 17:14:30 +0100 Subject: semgrep user config --- scratch/semgrep/semgrep.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scratch/semgrep') diff --git a/scratch/semgrep/semgrep.el b/scratch/semgrep/semgrep.el index a93803b..fdfcfdb 100644 --- a/scratch/semgrep/semgrep.el +++ b/scratch/semgrep/semgrep.el @@ -26,6 +26,11 @@ ;; Silence byte-compiler. (defvar url-http-end-of-headers) +(defcustom semgrep-server-url "http://localhost:8080" + "Address where the Python server with the chromadb is listening." + :type 'url + :group 'semgrep) + (defun semgrep--connect (method data) (let ((url-request-method "POST") (url-request-extra-headers '(("Content-Type" . "application/json"))) @@ -33,7 +38,7 @@ (json-serialize `(,method ,data)) 'utf-8))) (with-current-buffer - (url-retrieve-synchronously "http://localhost:8080") + (url-retrieve-synchronously semgrep-server-url) (goto-char url-http-end-of-headers) (json-read)))) -- cgit v1.2.3