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, + }, + }, +}