Skip to content

GitLab Next

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 43,114
    • Issues 43,114
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,374
    • Merge requests 1,374
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #22014
Closed
Open
Created Apr 24, 2018 by James Ramsay (ex-GitLab)@jramsay-gitlab🔴Contributor

Web IDE should respect .gitattribute settings

Problem

Many projects specify a .gitattributes file for various settings within their repository. Some of these settings are helpful in providing consistency for syntax highlighting, line endings and other settings when working with a project. While GitLab supports these settings in projects, the Web IDE does not read these settings.

Proposal

The Web IDE should systematically load a project's .gitattributes file and respect and apply any appropriate settings required during the editing experience.

Technical Details

The backend should provide the .gitattributes file to the Web IDE so that the frontend can apply read those settings. There will be an important order of operations aspect when support for the .editorconfig is also introduced. For additional details see: #22014 (comment 286457019)

Original Description GitLab supports setting the `gitlab-language` of a file using the `.gitattributes` file to force the syntax highlighting of blobs. We should also support this in the Web IDE

Proposal

Respect the gitlab-language attribute in the .gitattributes files

Links

https://docs.gitlab.com/ee/user/project/highlighting.html

https://docs.gitlab.com/ee/user/project/web_ide/index.html#comment-3869256360

Edited Feb 14, 2020 by Kai Armstrong
Assignee
Assign to
Time tracking