| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix(ltex): fix rnoweb support
Unfortunately language code `sweave` will not be understood by LTeX and
`rsweave` must be used, as can be seen in the source code here:
https://github.com/valentjn/ltex-ls/blob/16.0.0/src/main/kotlin/org/bsplines/ltexls/parsing/CodeFragmentizer.kt#L61
and here:
https://github.com/valentjn/ltex-ls/blob/16.0.0/src/main/kotlin/org/bsplines/ltexls/settings/Settings.kt#L185
LTeX will fall back to plaintext, but this will emit a warning and
provide slightly worse suggestions.
* fix(ltex): disable unnecessary xhtml mapping
This mapping does not do anything, the `get_language_id` function will
just return `xhtml` by default.
* feat(ltex): add plaintext mapping
LTeX will only understand `plaintext`:
https://github.com/valentjn/ltex-ls/blob/16.0.0/src/main/kotlin/org/bsplines/ltexls/parsing/CodeFragmentizer.kt#L70
though it will fall back to plain text when provided `text` as mapping,
but will output a warning when doing so.
Note that we do not enable the `text` filetype by default, as LTeX
itself does not do so. However, this filetype will not be useable
without this mapping anyway, so doing this makes using enabling this
manually slightly easier.
* fix(ltex): set ltex.enabled
LTeX is launched whenever the filetype is on the preset list, but will
then verify the language ID against its list and will refuse to run if
the language ID is not on the list. The default can be seen in
https://github.com/valentjn/ltex-ls/blob/16.0.0/src/main/kotlin/org/bsplines/ltexls/settings/Settings.kt#L175
and somewhat matches the supported markup languages list.
The issue resolved by this commit comes from the fact that LTeX will
accept several aliases for each language, for instance it will handle
`gitcommit` and `git-commit` the same way. However, only `git-commit`
appears on the default enabled list. Since there is no `gitcommit ->
git-commit` mapping in `language_id_mapping`, LTeX will ignore
`gitcommit`. This could also be solved by adding this mapping, however
setting a default value of `ltex.enabled` has smaller change of breaking
existing configuration. Same situation happens for `xhtml`.
* feat(ltex): enable in context, html and xhtml filetypes
ConTeXt was requested in #2663. LTeX is documented to enable it by
default, but this is not consistent with the default in the code:
https://github.com/valentjn/ltex-ls/blob/16.0.0/src/main/kotlin/org/bsplines/ltexls/settings/Settings.kt#L175
Regardless of this we will enable it by ourselves anyway.
We also enable HTML and XHTML as there already has been an attempt to
enable them previously, as there has been a mapping for `xhtml` in the
`language_id_mapping` array. HTML support is enabled in LTeX by default
anyway.
|