Skip to content

Allow autocomplete in ts and js files in string templates#121

Merged
predragnikolic merged 2 commits intomasterfrom
allow-autocomplete-in-string-templates
Jun 24, 2024
Merged

Allow autocomplete in ts and js files in string templates#121
predragnikolic merged 2 commits intomasterfrom
allow-autocomplete-in-string-templates

Conversation

@predragnikolic
Copy link
Copy Markdown
Member

closes #83

Kapture.2024-06-24.at.22.46.07.mp4

@predragnikolic predragnikolic merged commit 191b825 into master Jun 24, 2024
@predragnikolic predragnikolic deleted the allow-autocomplete-in-string-templates branch June 24, 2024 20:47
@rchl
Copy link
Copy Markdown
Member

rchl commented Jun 25, 2024

Maybe worth mentioning in the Readme that LSP-typescript should be disabled in projects using LSP-angular? Just a suggestion.

@predragnikolic
Copy link
Copy Markdown
Member Author

predragnikolic commented Jun 25, 2024

Hello Rafał, LSP-typescript should not be disabled.

LSP-angular doesn't conflict with LSP-typescript, it just enhances some places like inline template strings. LSP-angular just provides hover, completions in such specific places.

There are no duplicate completion items, or duplicate hovers when using it with LSP-typescript. Just to demonstrate, here is the completion request when triggered from the global scope. LSP-typescript will return completions, while LSP-angular will return null.

:: [10:14:57.954] --> LSP-typescript textDocument/completion (64): {'textDocument': {'uri': 'file:///Users/predrag/Documents/sandbox/angular-tour-of-heroes/src/app/app.component.ts'}, 'position': {'line': 18, 'character': 6}}
:: [10:14:57.954] --> LSP-angular textDocument/completion (38): {'textDocument': {'uri': 'file:///Users/predrag/Documents/sandbox/angular-tour-of-heroes/src/app/app.component.ts'}, 'position': {'line': 18, 'character': 6}}
:: [10:14:57.960] <<< LSP-angular (38) (duration: 5ms): None
:: [10:14:57.988] <<< LSP-typescript (64) (duration: 34ms): {'items': [{'label': 'bootstrapApplication', 'kind': 6, 'sortText': '11', 'data': {'cacheId': 1}, 'textEdit': {'newText': 'bootstrapApplication', 'insert': {'start': {'line': 18, 'character': 0}, 'end': {'line': 18, 'character': 6} ....I've trimmed this response, because my comment is too long (maximum is 65536 characters)... 'end': {'line': 18, 'character': 6}}}}], 'isIncomplete': False}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inline templates/error reporting doesn't work

2 participants