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 IDEProposal
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