From e7bea0618c69d0d9fae89172ef7a2ae67b2e3ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Mon, 1 Aug 2022 15:25:40 +0200 Subject: [PATCH] Add golang projectionist config --- symlinks/config/nvim/plugin/projectionist.lua | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/symlinks/config/nvim/plugin/projectionist.lua b/symlinks/config/nvim/plugin/projectionist.lua index 6496b1a..41fabb3 100644 --- a/symlinks/config/nvim/plugin/projectionist.lua +++ b/symlinks/config/nvim/plugin/projectionist.lua @@ -583,6 +583,25 @@ local clojure_config = { }, } +local golang_config = { + ["*"] = { + start = "go run .", + dispatch = "go test ./...", + }, + ["*.go"] = { + type = "source", + alternate = { + "{}_test.go", + }, + }, + ["*_test.go"] = { + type = "test", + alternate = { + "{}.go", + }, + }, +} + vim.g.projectionist_heuristics = { ["pubspec.yaml"] = flutter_config, ["requirements.txt|pyproject.toml"] = python_config, @@ -597,6 +616,7 @@ vim.g.projectionist_heuristics = { ["mint.json"] = mint_config, ["shard.yml"] = crystal_config, ["Cargo.toml"] = rust_config, + ["go.mod"] = golang_config, ["build.zig"] = zig_config, ["project.clj"] = lein_config, ["deps.edn"] = clojure_config,