Open
Description
Description
Auto-indent affects the indentation of all lines within a template literal. It seems to me that template literal contents should not be changed at all. Additionally, indentation for lines following a template literal should not be affected by indentation of the contents of the template literal.
To Reproduce
- Run
vim --clean
(to test runtime file packaged with vim) set ft=typescript
- Paste the following
const string = `
when auto-indented, this line should not be changed
`;
const string = `
(arbitrary nonsense)`;
log('when auto-indented, this line should de-dented');
- Auto-indent line 2 (
2G==
). Observe that it is de-dented. It is expected to be unchanged. - Auto-indent line 7 (
7G==
). Observe that it is not de-dented. It is expected to be de-dented.
Environment:
- Vim: 8.1.2402
- OS: Fedora 30
- Terminal: Tilix
Additional context
(FYI, this issue is of interest to me because I currently maintain a "vim-html-template-literals" plugin that amends various js/ts syntax plugins to support html syntax inside of tagged template literals, which is useful when working with lit-html).
Metadata
Metadata
Assignees
Labels
No labels