Comments (4)
The language client is already responsible to perform the necessary configuration changes, like the README says:
Some commands are handled by LTEX LS, while others must be handled by the language client. This is in contrast to the LSP specification, which recommends that the server handles all commands. However, handling of some commands by the client is necessary as these commands change the client configuration, which the LSP does not allow server-side.
For example, the documentation for _ltex.addToDictionary
(the command behind Add '...' to dictionary
) says:
_ltex.addToDictionary
is executed by the client when it should add words to the dictionary by adding them toltex.dictionary
.
It works like this: First, the language client requests code actions from the server. If there's an unknown word, then a code action with kind quickfix.ltex.addToDictionary
will be returned by LTEX LS. That code action contains the command _ltex.addToDictionary
and its necessary parameters (as documented). If the user runs the code action, the language client has to implement the command _ltex.addToDictionary
and do what LTEX LS expects it to do according to the docs.
In the case of VS Code, the language client vscode-ltex
implements these commands, not the editor (VS Code) itself. If the language client you use doesn't implement the commands, then this is a problem of the language client and not of LTEX LS.
There's also the custom request ltex/workspaceSpecificConfiguration
, which takes precedence over the configuration returned by workspace/configuration
. It allows to implement file-based dictionaries, so that the “normal” configuration (whatever format the editor is using; in the case of VS Code, it's settings.json
) doesn't get too cluttered.
from ltex-ls.
Oh I was confused since the documentation mentions ltex.dictionary
, which has a link to VSCode specific setting. OK, I will check lsp-ltex side to make this work. Thank you for the answer.
Maybe it's worthwhile to update README to make it less confusing? What do you think?
from ltex-ls.
the documentation mentions ltex.dictionary, which has a link to VSCode specific setting
Again, I'm not sure what you mean. The documentation of _ltex.addToDictionary
links to ltex.dictionary
, but the docs of ltex.dictionary
don't say anywhere that's a VS-Code-specific setting, because it isn't. Only the parts about multi-scope settings and external files are tagged as client-specific, as clearly marked with the striped line. That's because multi-scope settings and external files are implemented by the language client. Those are “bonus features” of vscode-ltex, if you will.
However, this has to be separated from the fact that _ltex.addToDictionary
has to be implemented by the client. If it doesn't, then that command obviously won't work at all. IMO, the README is pretty clear about that.
I'm not sure how to make the available info any clearer. What would your proposal look like?
from ltex-ls.
Oh sorry. It was indeed my misunderstanding. Thank you for your patience on my non-sense. I will close this issue.
from ltex-ls.
Related Issues (20)
- Support additional LaTeX commands and environments in ltex-ls
- Can not add words to dictionary
- Some way to change buffer's language.
- Build for BSD HOT 1
- Can we read credentials from a file?
- Allow only linting comments matching a pattern, e.g. `//!` and `///` in rust instead of `//`
- Sending workspace/configuration requests to client without capability
- Checking "!}" or "?}" with LanguageTool premium server in French.
- Version 16.0.0 doesn't work with PASSIVE_VOICE
- What is the default value of `LTEX_GLOBAL_STORAGE_PATH`? HOT 3
- language selection via \documentclass[german]{article} and similar
- ltex with html: Within source tag no html check
- Markdown inline footnotes
- `JAVA_HOME is not defined correctly`
- Add text (.txt) files support
- Linux binary archive changes destination owner when extracted
- restructuredText ltex.hiddenFalsePositive HOT 1
- High memory usage
- StringIndexOutOfBoundsException
- How to set Ltex language in vim
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ltex-ls.