InfoGrab DocsInfoGrab Docs

Neovim용 GitLab 플러그인 설치 및 설정

Neovim용 GitLab 플러그인을 설치하고 인증, 코드 제안 및 키 매핑을 구성하는 방법을 설명합니다.

사전 요구 사항: GitLab.com과 GitLab Self-Managed 모두, GitLab 버전 16.1 이상이 필요합니다. 많은 확장 기능이 이전 버전에서도 작동할 수 있지만, 지원되지 않습니다. GitLab Duo Code Suggestions 기능을 사용하려면 GitLab 버전 16.8 이상이 필요합니다. Neovim 버전 0.9 이상이 설치되어 있어야 합니다. NPM 이 설치되어 있어야 합니다. NPM은 Code Suggestions 설치에 필요합니다. 확장을 설치하려면 선택한 플러그인 관리자에 맞는 설치 단계를 따르세요: No plugin manager Run this command to include this project with packadd on startup: git clone https://gitlab.com/gitlab-org/editor-extensions/gitlab.vim.git ~/.local/share/nvim/site/pack/gitlab/start/gitlab.vim lazy.nvim Add this plugin to your [lazy.nvim](https://github.com/folke/lazy.nvim) configuration: { '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, }, }, } packer.nvim Declare the plugin in your [packer.nvim](https://github.com/wbthomason/packer.nvim) configuration: use { "git@gitlab.com:gitlab-org/editor-extensions/gitlab.vim.git", } GitLab 인증 # 이 확장을 GitLab 계정에 연결하려면 환경 변수를 구성하세요: 환경 변수 기본값 설명 GITLAB_TOKEN 해당 없음 인증된 요청에 사용할 기본 GitLab 개