neoclide / coc-tsserver

Tsserver extension for coc.nvim that provide rich features like VSCode for javascript & typescript
MIT License
1.05k stars 68 forks source link

Using .tpl file as .js #408

Closed curkan closed 1 year ago

curkan commented 1 year ago

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.

chemzqm commented 1 year ago

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

curkan commented 1 year ago

configure correct filetype

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

curkan commented 1 year ago

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

Maybe some settings need to be registered in nvim?

chemzqm commented 1 year ago

You need to make sure the buffer have correct filetype.

curkan commented 1 year ago

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