hangyav / textlsp Goto Github PK
View Code? Open in Web Editor NEWLanguage server for text spell and grammar check with various tools.
License: GNU General Public License v3.0
Language server for text spell and grammar check with various tools.
License: GNU General Public License v3.0
Hi!
I was looking at the tree-sitter grammar from latex-lsp and found your video
https://asciinema.org/a/iRarWV0EoL3RGWM360r5KllgC
There, you seem to have synchronized two text side by side: the text and the parsing tree.
When moving on the text, the relevant element in the parsing tree gets highlighted.
Could you share what setup you used to have this?
It is related to one project of mine :)
The helix editor always sends a selection width of one character for codeAction
, because helix way is "always be selecting." This will always result in sending at least a range of 1 and textLSP returning the error Code action is not supported for range.
instead of corrections.
I'm trying to get a reStructuredText document (extention .rst
) to behave as text and be spell check, but I don't seem to get any checking done.
Is there a config for this or should any document type that isn't one that is known be processed as text?
I'm not sure which languages are supported by this extension. I have a markdown file in German, Using the config below, Most German words are marked as spelling mistakes, the proposes corrections are mostly nonsensical:
"das" -> "dms"
"aber" -> "Uber"
Are just a few examples. It would be useful if we could specify somehow what language we want to use, but I assume this comes down to which languages are supported by the backend.
textLSP = {
analysers = {
languagetool = {
enabled = true,
check_text = {
on_open = true,
on_save = true,
on_change = false,
},
},
gramformer = {
-- gramformer dependency needs to be installed manually
enabled = true,
gpu = false,
check_text = {
on_open = false,
on_save = true,
on_change = false,
},
},
hf_checker = {
enabled = false,
gpu = false,
quantize = 32,
model = "pszemraj/flan-t5-large-grammar-synthesis",
min_length = 40,
check_text = {
on_open = false,
on_save = true,
on_change = false,
},
},
hf_instruction_checker = {
enabled = true,
gpu = false,
quantize = 32,
model = "grammarly/coedit-large",
min_length = 40,
check_text = {
on_open = false,
on_save = true,
on_change = false,
},
},
hf_completion = {
enabled = true,
gpu = false,
quantize = 32,
model = "bert-base-multilingual-cased",
topk = 5,
},
-- openai = {
-- enabled = false,
-- api_key = "<MY_API_KEY>",
-- check_text = {
-- on_open = false,
-- on_save = false,
-- on_change = false,
-- },
-- model = "gpt-3.5-turbo",
-- max_token = 16,
-- },
-- grammarbot = {
-- enabled = false,
-- api_key = "<MY_API_KEY>",
-- -- longer texts are split, this parameter sets the maximum number of splits per analysis
-- input_max_requests = 1,
-- check_text = {
-- on_open = false,
-- on_save = false,
-- on_change = false,
-- },
-- },
},
documents = {
-- org = {
-- org_todo_keywords = {
-- "TODO",
-- "IN_PROGRESS",
-- "DONE",
-- },
-- },
txt = {
parse = true,
},
},
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.