neovim/runtime
Christian Clason 7fa089f463 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

1ad194c0df

Co-authored-by: Dennis van den Berg <dennis.vandenberg@nedap.com>
2024-07-10 09:31:48 +02:00
..
autoload vim-patch:3146d63: runtime(netrw): fix remaining case of register clobber 2024-07-04 23:01:35 +02:00
colors
compiler
doc vim-patch:9.1.0554: :bw leaves jumplist and tagstack data around (#29639) 2024-07-10 10:35:12 +08:00
ftplugin vim-patch:9.1.0551: filetype: htmlangular files are not properly detected 2024-07-10 09:31:48 +02:00
indent vim-patch:11d5992: runtime(rust): use shiftwidth() in indent script 2024-07-04 23:01:35 +02:00
keymap
lua vim-patch:9.1.0551: filetype: htmlangular files are not properly detected 2024-07-10 09:31:48 +02:00
macros
pack/dist/opt
plugin
queries build(deps): drop unused bundled bash, python parsers and queries 2024-07-09 15:26:48 +02:00
spell
syntax vim-patch:9.1.0550: filetype: antlr4 files are not recognized 2024-07-10 09:31:48 +02:00
tools
tutor
CMakeLists.txt
delmenu.vim
filetype.lua refactor: use vim._with where possible 2024-06-28 19:58:31 +02:00
ftoff.vim
ftplugin.vim
ftplugof.vim
indent.vim
indoff.vim
macmap.vim
makemenu.vim
menu.vim
mswin.vim
neovim.ico
nvim.appdata.xml
nvim.desktop
nvim.png
optwin.vim
synmenu.vim
windows_icon.rc feat(win32): embed executable icon 2024-07-02 13:05:16 +02:00