Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 38,034
    • Issues 38,034
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1,347
    • Merge requests 1,347
  • Requirements
    • Requirements
    • List
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • 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
Backlog
Milestone
Backlog
Assign milestone
Time tracking