astoff / digestif

A language server for TeX and friends
Other
255 stars 6 forks source link

coc.nvim setup #5

Closed oblitum closed 5 years ago

oblitum commented 5 years ago

Hi. I'm trying your server with coc.nvim and I'm not sure about the correct filetype mapping for the server, currently I've updated the wiki to the following, since it seems to provide better results than what was there:

let g:coc_filetype_map = {'plaintex': 'tex'}

Initially it was

let g:coc_filetype_map = {'tex': 'latext', 'plaintex': 'tex'}

I imagined 'latext' was a typo for 'latex', so I changed it to 'latex', but even then I was not getting completion for trivial commands like \documentclass, etc, only after removing the 'tex': 'latex' mapping that I was able to get this command. Still it is not being perfect regarding imported commands, for example, for \documentclass[11pt,a4paper,sans]{moderncv} (for resumes) I don't have completion for \cventry and others.

astoff commented 5 years ago

OK, this should be fixed now, and the filetype map is not needed anymore. Let me know if it works. (It's not really clear what languageId = "tex" means for the LSP, and for now the server assumes this is latex.)

As to moderncv, a data file like the ones here would need to be prepared (probably by hand). Contributions are welcome :-).

oblitum commented 5 years ago

Thanks.

As to moderncv, a data file like the ones here would need to be prepared (probably by hand). Contributions are welcome :-)

Ah OK, I thought this was automatic and data files were not needed, like in coc-vimtex.