From 3f6943207a2529571bb8ef21c6162bc1db759fcb Mon Sep 17 00:00:00 2001 From: Mikolaj_Bien Date: Fri, 9 May 2025 14:35:28 +0200 Subject: [PATCH] feat: add gitlab plugin --- lua/plugins/gitlab.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lua/plugins/gitlab.lua diff --git a/lua/plugins/gitlab.lua b/lua/plugins/gitlab.lua new file mode 100644 index 00000000..5efd6694 --- /dev/null +++ b/lua/plugins/gitlab.lua @@ -0,0 +1,19 @@ +return { + 'https://gitlab.com/gitlab-org/editor-extensions/gitlab.vim.git', + -- Activate when a file is created/opened + event = { 'BufReadPre', 'BufNewFile' }, + -- Activate when a supported filetype is open + ft = { 'go', 'javascript', 'python', 'ruby' }, + cond = function() + -- Only activate if token is present in environment variable. + -- Remove this line to use the interactive workflow. + return vim.env.GITLAB_TOKEN ~= nil and vim.env.GITLAB_TOKEN ~= '' + end, + opts = { + statusline = { + -- Hook into the built-in statusline to indicate the status + -- of the GitLab Duo Code Suggestions integration + enabled = true, + }, + }, +}