neoclide/coc-tsserver

Using .tpl file as .js

curkan opened this issue · 5 comments

Hi how do I get coc-tsserver to parse the tpl file like a js file so it can use jumpDefinition etc?
now throws an error:
Error on notification jumpDefinition Error: definition provider not found for current buffer, your language server doesn't support it.

You need configure correct filetype, see :h filetype-detect

configure correct filetype

It didn't get any easier to be honest :D

You need configure correct filetype, see :h filetype-detect

Maybe some settings need to be registered in nvim?

You need to make sure the buffer have correct filetype.

You need to make sure the buffer have correct filetype.

did like this:
*autocmd BufNewFile,BufRead .tpl setlocal filetype=javascript

but in the tpl file there can be both html and javascript, what is the best way to do it so that both work?
image