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 vim-patch:9.1.0476: Cannot see matched text in popup menu 2024-06-15 04:47:23 +08:00
compiler vim-patch:0ddab58: runtime(java): Add a config variable for commonly used compiler options 2024-06-16 23:24:55 +02:00
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 vim-patch:79a14c0: runtime(keymap): include Georgian keymap 2024-06-14 23:58:27 +02:00
lua vim-patch:9.1.0551: filetype: htmlangular files are not properly detected 2024-07-10 09:31:48 +02:00
macros vim-patch:79230f027a25 2024-02-16 08:57:45 +01:00
pack/dist/opt Merge pull request #29413 from jiangyinzuo/vim-patch-9.1.0497 2024-06-20 12:29:47 +08:00
plugin vim-patch:94043780196c (#28831) 2024-05-18 15:53:26 +08:00
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 docs: misc (#28837) 2024-06-07 10:55:14 +08:00
CMakeLists.txt build: various fixes 2024-02-01 12:06:55 +01:00
delmenu.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
filetype.lua refactor: use vim._with where possible 2024-06-28 19:58:31 +02:00
ftoff.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
ftplugin.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
ftplugof.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
indent.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
indoff.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
macmap.vim
makemenu.vim vim-patch:9.1.0013: Modula2 filetype support lacking (#27020) 2024-01-16 17:45:57 +00:00
menu.vim vim-patch:e059fae10044 2023-08-24 11:33:06 +09:00
mswin.vim vim-patch:45da32964d6e 2024-03-14 15:04:31 +08:00
neovim.ico
nvim.appdata.xml NVIM v0.10.0 2024-05-16 14:34:32 +02:00
nvim.desktop
nvim.png
optwin.vim vim-patch:9.1.0469: Cannot have buffer-local value for 'completeopt' 2024-06-06 06:07:31 +08:00
synmenu.vim vim-patch:9.1.0013: Modula2 filetype support lacking (#27020) 2024-01-16 17:45:57 +00:00
windows_icon.rc feat(win32): embed executable icon 2024-07-02 13:05:16 +02:00