aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_defaults.lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-07-09 19:58:02 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-07-10 09:31:48 +0200
commit7fa089f463dac83f256a8336ddb0adc9eae483a2 (patch)
tree2734fce32c870ec7940807e3ccc70196c5e6b1a8 /runtime/lua/vim/_defaults.lua
parent80530d07e75a98cdf65f1c731b031d05bc2f5087 (diff)
downloadrneovim-7fa089f463dac83f256a8336ddb0adc9eae483a2.tar.gz
rneovim-7fa089f463dac83f256a8336ddb0adc9eae483a2.tar.bz2
rneovim-7fa089f463dac83f256a8336ddb0adc9eae483a2.zip
vim-patch:9.1.0551: filetype: htmlangular files are not properly detected
Problem: filetype: htmlangular files are not properly detected Solution: Use the new htmlangular filetype for angular files, because since angular v17, those are no longer valid HTML files. (Dennis van den Berg) Since Angular 17, the new Control Flow Syntax is not valid HTML. This PR adds a new filetype detection for the HTML templates of Angular. It first checks the filename. The Angular convention is to use *.component.html for the template. However, this is not mandatory. If the filename does not match, it will check the contents of the file if it contains: - One of the Control-Flow blocks: @if, @for, @switch, @defer - A structural directive: *ngIf, *ngFor, *ngSwitch, *ngTemplateOutlet - Builtin Angular elements: ng-template or ng-content - String interpolation: {{ something }} This enables the Angular LSP to attach only to htmlangular filetypes, as well as language parsers, such as tree-sitter. closes: vim/vim#15190 https://github.com/vim/vim/commit/1ad194c0dfd82ca1e7a1b6f2fca89a487794158d Co-authored-by: Dennis van den Berg <dennis.vandenberg@nedap.com>
Diffstat (limited to 'runtime/lua/vim/_defaults.lua')
0 files changed, 0 insertions, 0 deletions