Closed utrumo closed 4 years ago
I don't think tsserver is natively supporting html template literals right now. I have managed to get typescript-lit-html-plugin to work in coc.nvim. You might give that a shot.
My current setup to work on lit-html in vim is using the typescript-lit-html-plugin with coc-tsserver. Would be nice if it could detect string litterals and show coc-html suggestions in those parts. Dunno how impossible it is to get it working though.
My current setup to work on lit-html in vim is using the typescript-lit-html-plugin with coc-tsserver. Would be nice if it could detect string litterals and show coc-html suggestions in those parts. Dunno how impossible it is to get it working though.
How you make it work with vim and coc?
I just have all of them installed and they work. coc.nvim
and typescript-lit-html-plugin
with VimPlug, coc-tsserver
as an extension.
I just have all of them installed and they work.
coc.nvim
andtypescript-lit-html-plugin
with VimPlug,coc-tsserver
as an extension.
Can you show me config strings for vimPlug?
How do you add
"compilerOptions": {
"plugins": [
{
"name": "typescript-lit-html-plugin"
}
]
}
to coc-tslint tsconfig.json?
Would be nice if it could detect string litterals and show coc-html suggestions in those parts. Dunno how impossible it is to get it working though.
Yeah, I imagine that would be useful in some scenarios. I think someone would need to fork typescript-lit-html-plugin and first figure out how to enable it on ALL string literals. Enabling it intelligently for some literals but not others might be impossible.
(By the way, there is currently an experimental g:htl_all_templates
to add html syntax highlighting to ALL template string literals in vim.)
If typescript-lit-html-plugin were to add a section in their readme for using it with vim, I think it might look like this:
With NeoVim
Install coc.nvim and run
:CocInstall coc-tsserver
.Install the plugin and a copy of TypeScript in your workspace:
npm install --save-dev typescript-lit-html-plugin typescript
Then add a
plugins
section to yourtsconfig.json
orjsconfig.json
{ "compilerOptions": { "plugins": [ { "name": "typescript-lit-html-plugin" } ] } }
How can i make it work with https://github.com/neoclide/coc.nvim and https://github.com/neoclide/coc-tsserver?