Comments (5)
Yes, all unknown file types should be checked as plain text file. However, you need to set the .rst
file type in your config to be checked. What text editor do you use and how does your config look like?
from textlsp.
I'm using helix
I took the sample config from the README.md and converted to toml
. I'm not sure where to add an extension to be included in checked files.
[[language]]
name = "rst"
language-servers = ["esbonio-lsp", "text-lsp"]
language-id = "restructuredtext"
# other config removed for clarity
[language-server.text-lsp]
command = "C:/Python310/Scripts/textlsp"
[language-server.text-lsp.config.analysers.languagetool]
enabled=true
check_text={on_open=true,on_save=true,on_change=false}
[language-server.text-lsp.config.analysers.gramformer]
enabled=false
gpu=false
check_text={on_open=false,on_save=true,on_change=false}
[language-server.text-lsp.config.analysers.hf_checker]
enabled=true
gpu=false
model='pszemraj/flan-t5-large-grammar-synthesis'
min_length=40
check_text={on_open=false,on_save=true,on_change=false}
[language-server.text-lsp.config.analysers.hf_completion]
enabled=true
gpu=false
model='bert-base-multilingual-cased'
topk=5
[language-server.text-lsp.config.documents]
org={ org_todo_keywords=['TODO','IN_PROGRESS','DONE']}
txt={parse=true}
helix sends this to configure
{
"jsonrpc": "2.0",
"method": "workspace/didChangeConfiguration",
"params": {
"settings": {
"analysers": {
"gramformer": {
"check_text": {
"on_change": false,
"on_open": false,
"on_save": true
},
"enabled": false,
"gpu": false
},
"hf_checker": {
"check_text": {
"on_change": false,
"on_open": false,
"on_save": true
},
"enabled": true,
"gpu": false,
"min_length": 40,
"model": "pszemraj/flan-t5-large-grammar-synthesis"
},
"hf_completion": {
"enabled": true,
"gpu": false,
"model": "bert-base-multilingual-cased",
"topk": 5
},
"languagetool": {
"check_text": {
"on_change": false,
"on_open": true,
"on_save": true
},
"enabled": true
}
},
"documents": {
"org": {
"org_todo_keywords": [
"TODO",
"IN_PROGRESS",
"DONE"
]
},
"rst": {
"parse": true
},
"txt": {
"parse": true
}
}
}
}
}
from textlsp.
Your config looks good in general. The only issue is that in the config table you need to put everything (analysers and documents) under textLSP
, e.g.: [language-server.text-lsp.config.textLSP.analysers.languagetool]. It works for me using helix version 23.05 and the following minimal config:
[[language]]
name = "rst"
language-server = { command="textlsp", language-id = "restructuredtext" }
config = {textLSP={analysers={languagetool={enabled=true,check_text={on_open=true, on_save=true,on_change=false}}}}}
from textlsp.
ok, I was able to get diagnostics showing up with the fix to the config. (I also disabled the hf analysers because that seemed to be causing me issues)
Now, I'm getting Code action is not supported for range.
errors.
from textlsp.
Great!
What issues do you have with the HF analysers (is it hf_checker or hf_completion, or both)?
from textlsp.
Related Issues (5)
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 textlsp.