LTeX Language Server: LSP language server for LanguageTool :mag::heavy_check_mark: with support for LaTeX :mortar_board:, Markdown :pencil:, and others
Describe the bug
When using coc.nvim with the coc-ltex module, I can not add words to the user's dictionary.
I usually run vim from whatever path I'm currently in, and I don't want random .vscode directories pop up all over my filesystem, so I have set the configuration targets to be user.
But then when I try to add a word to the dictionary, I get this exception:
2023-11-16T22:53:44.833 ERROR (pid:1287619) [server] - unhandledRejection Promise {
[36m<rejected>[39m TypeError: Cannot add property en-US, object is not extensible
at CommandHandler.<anonymous> (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17685:40)
at Generator.next (<anonymous>)
at /home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17111:71
at new Promise (<anonymous>)
at __webpack_modules__.1216.__awaiter (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17107:12)
at CommandHandler.addToLanguageSpecificSettingInternalSetting (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17671:16)
at CommandHandler.addToLanguageSpecificSetting (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17647:18)
at CommandHandler.addToDictionary (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17609:14)
at HR.execute (/home/user/.vim/plugged/coc.nvim/build/index.js:66:3095)
at BR.executeCommand (/home/user/.vim/plugged/coc.nvim/build/index.js:66:4200)
} TypeError: Cannot add property en-US, object is not extensible
at CommandHandler.<anonymous> (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17685:40)
at Generator.next (<anonymous>)
at /home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17111:71
at new Promise (<anonymous>)
at __webpack_modules__.1216.__awaiter (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17107:12)
at CommandHandler.addToLanguageSpecificSettingInternalSetting (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17671:16)
at CommandHandler.addToLanguageSpecificSetting (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17647:18)
at CommandHandler.addToDictionary (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17609:14)
at HR.execute (/home/user/.vim/plugged/coc.nvim/build/index.js:66:3095)
at BR.executeCommand (/home/user/.vim/plugged/coc.nvim/build/index.js:66:4200)
I have tried setting an external file to be used with
2023-11-16T22:54:45.990 ERROR (pid:1287619) [server] - unhandledRejection Promise {
[36m<rejected>[39m TypeError: Cannot assign to read only property 'en-US' of object '[object Object]'
at CommandHandler.<anonymous> (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17685:40)
at Generator.next (<anonymous>)
at /home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17111:71
at new Promise (<anonymous>)
at __webpack_modules__.1216.__awaiter (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17107:12)
at CommandHandler.addToLanguageSpecificSettingInternalSetting (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17671:16)
at CommandHandler.addToLanguageSpecificSetting (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17647:18)
at CommandHandler.addToDictionary (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17609:14)
at HR.execute (/home/user/.vim/plugged/coc.nvim/build/index.js:66:3095)
at BR.executeCommand (/home/user/.vim/plugged/coc.nvim/build/index.js:66:4200)
} TypeError: Cannot assign to read only property 'en-US' of object '[object Object]'
at CommandHandler.<anonymous> (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17685:40)
at Generator.next (<anonymous>)
at /home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17111:71
at new Promise (<anonymous>)
at __webpack_modules__.1216.__awaiter (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17107:12)
at CommandHandler.addToLanguageSpecificSettingInternalSetting (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17671:16)
at CommandHandler.addToLanguageSpecificSetting (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17647:18)
at CommandHandler.addToDictionary (/home/user/.config/coc/extensions/node_modules/[4mcoc-ltex[24m/dist/extension.js:17609:14)
at HR.execute (/home/user/.vim/plugged/coc.nvim/build/index.js:66:3095)
at BR.executeCommand (/home/user/.vim/plugged/coc.nvim/build/index.js:66:4200)
2023-11-16T22:54:46.258 INFO (pid:1287619) [attach] - receive notification: highlight []
Stepse to reproduce
Steps to reproduce the behavior:
Open file with grammar mistake in nvim
If required, enable coc-ltex with CocList extensions, select coc-ltex and enter
Wait for the diagnostics to populate
Do a coc-code action at cursor
Select Add to dictionary
Expected behavior
One of the following:
The external file listed in CocConfig is changed
CocConfig is changed
A file in ~/.config/Code/User/globalStorage/valentjn.vscode-ltex/ is created and changed
Describe the bug When using coc.nvim with the
coc-ltex
module, I can not add words to the user's dictionary.I usually run vim from whatever path I'm currently in, and I don't want random
.vscode
directories pop up all over my filesystem, so I have set the configuration targets to beuser
.But then when I try to add a word to the dictionary, I get this exception:
I have tried setting an external file to be used with
but then I get a different exception
Stepse to reproduce Steps to reproduce the behavior:
CocList extensions
, select coc-ltex and enterExpected behavior One of the following:
~/.config/Code/User/globalStorage/valentjn.vscode-ltex/
is created and changedSample document
LTeX configuration
LTeX LS log Paste the log (output) of LTeX LS here:
Version information List here the version information of the relevant software.
Linux <hostname> 5.15.0-84-generic #93-Ubuntu SMP Tue Sep 5 17:16:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
(Ubuntu Mate 22.04)13.1.0
(according to~/.config/coc/extensions/node_modules/coc-ltex/package.json
)Additional context/information Would enjoy documentation on how to set the path for the settings file.