Giter Site home page Giter Site logo

hangyav / textlsp Goto Github PK

View Code? Open in Web Editor NEW
36.0 5.0 0.0 363 KB

Language server for text spell and grammar check with various tools.

License: GNU General Public License v3.0

Makefile 0.09% Python 99.91%
grammar-checker language-server language-server-protocol latex org-mode spellchecker artificial-intelligence pygls

textlsp's People

Contributors

dependabot[bot] avatar hangyav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

textlsp's Issues

helix editor unable to perform codeAction

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.

question: how to get other text files to identify as text

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?

Support for (natural) languages other than english

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,
        },
      },
    },

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.