Giter Site home page Giter Site logo

Comments (20)

iamcco avatar iamcco commented on July 20, 2024

copy the config https://github.com/iamcco/diagnostic-languageserver/wiki/Linters#languagetool and change the args field.

from coc-diagnostic.

alex-popov-tech avatar alex-popov-tech commented on July 20, 2024

I did the changes, but seems like its using English instead of Russian ( ru-RU ):

Screen Shot 2019-05-24 at 10 02 43 AM

from coc-diagnostic.

iamcco avatar iamcco commented on July 20, 2024

Have a look the config option of coc-diagnostic, you have to config diagnostic-languageserver.linters instead of languageserver

from coc-diagnostic.

alex-popov-tech avatar alex-popov-tech commented on July 20, 2024

Yes, sorry. Did it, now recieving strange error message:
Screen Shot 2019-05-24 at 10 47 20 AM

from coc-diagnostic.

iamcco avatar iamcco commented on July 20, 2024

Don't know what happend with languagetool, test with command line?

from coc-diagnostic.

alex-popov-tech avatar alex-popov-tech commented on July 20, 2024

It works from command line :(

languagetool --language ru-RU test.md
Expected text language: Russian
Working on test.md...
1.) Line 1, column 0, Rule ID: UPPERCASE_SENTENCE_START
Message: Это предложение не начинается с заглавной буквы
Suggestion: Ухал
ухал грека чириз рику токие дела
^^^^

2.) Line 1, column 12, Rule ID: MORFOLOGIK_RULE_RU_RU
Message: Найдена орфографическая ошибка
Suggestion: чирик
ухал грека чириз рику токие дела
           ^^^^^

3.) Line 1, column 18, Rule ID: Cap_Letters_Name[1]
Message: Имя пишется с большой буквы: 'Рику'

Suggestion: Рику
ухал грека чириз рику токие дела
                 ^^^^
More info: http://ru.wikipedia.org/wiki/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D0%B1%D1%83%D0%BA%D0%B2%D0%B0

4.) Line 2, column 1, Rule ID: MORFOLOGIK_RULE_RU_RU
Message: Найдена орфографическая ошибка
Suggestion: токио; фокия; тёкшие; такие; тоцкие; токае; токая; токе; токи; токиец; токиек; токуя; тонкие; топкие; тория; товия; тощие; то кие; токи е
ухал грека чириз рику токие дела
                      ^^^^^
Time: 364ms for 1 sentences (2.7 sentences/sec)

from coc-diagnostic.

iamcco avatar iamcco commented on July 20, 2024

Can't not reproduce

image

from coc-diagnostic.

alex-popov-tech avatar alex-popov-tech commented on July 20, 2024

Strange...can you share your configurations and way you use languagetool?

from coc-diagnostic.

iamcco avatar iamcco commented on July 20, 2024

I just copy the default config and change the args to "args": [ "--language", "ru-RU", "-"]. Maybe nodejs's problem?

my languagetool version is version 4.4 (2018-12-27 10:19)

from coc-diagnostic.

alex-popov-tech avatar alex-popov-tech commented on July 20, 2024

I have languagetool 4.5... Can you share whole config please? I will try tu rollback languagetool to 4.4 now...

from coc-diagnostic.

iamcco avatar iamcco commented on July 20, 2024

this is my coc-settings.json

{
  // coc settting
  "coc.preferences.snippets.enable": true,
  "coc.preferences.snippetStatusText": "🌈",
  "coc.preferences.formatOnType": false,
  "coc.preferences.formatOnSaveFiletypes": [
    "svg",    // coc-svg support svg format
    "dart",   // diagnostic-languageserver support dart format
    "elixir", // diagnostic-languageserver support elixir format
    "eelixir" // diagnostic-languageserver support elixir format
  ],
  // diagnostic
  "diagnostic.infoSign": "ღ",
  "diagnostic.hintSign": "ஐ",
  "diagnostic.warningSign": "⚠",
  "diagnostic.errorSign": "✖",
  "diagnostic.enable": true,
  "diagnostic.signOffset": 9999999,
  "diagnostic.highlightOffset": 9999999,
  "diagnostic.refreshOnInsertMode": true,
  // suggest
  "suggest.detailField": "abbr",
  "suggest.maxCompleteItemCount": 50,
  "suggest.maxPreviewWidth": 80,
  "suggest.triggerAfterInsertEnter": false,
  "suggest.detailMaxLength": 30,
  // html
  "html.suggest.angular1": false,   // angular1 is outdate, coc-angular support better
  // coc source
  "coc.source.word.filetypes": [
    "markdown",
    "gitcommit",
    "gina-commit"
  ],
  // snippets
  "snippets.ultisnips.enable": false,
  "snippets.textmateSnippetsRoots": [
    "~/.configrc/textmate-snippets"
  ],
  "snippets.extends": {
    "typescript": ["javascript"],
    "javascriptreact": ["javascript"]
  },
  // emment
  "emmet.showAbbreviationSuggestions": false,
  // prettier
  "prettier.eslintIntegration": true,
  "prettier.tslintIntegration": true,
  "prettier.stylelintIntegration": true,
  // eslint
  "eslint.filetypes": [
    "javascript",
    "javascript.jsx",
    "javascriptreact"
  ],
  "eslint.autoFix": true,
  "eslint.autoFixOnSave": true,
  // tslint
  "tslint.autoFixOnSave": true,
  // pairs
  "pairs.enableCharacters": [
    "(",
    "[",
    "{",
    "'",
    "\"",
    "`"
  ],
  // diagnostic-languageserver
  "diagnostic-languageserver.linters": {
    "languagetool": {
      "command": "languagetool",
      "debounce": 200,
      "args": [ "--language", "ru-RU", "-"],
      "offsetLine": 0,
      "offsetColumn": 0,
      "sourceName": "languagetool",
      "formatLines": 2,
      "formatPattern": [
        "^\\d+?\\.\\)\\s+Line\\s+(\\d+),\\s+column\\s+(\\d+),\\s+([^\\n]+)\nMessage:\\s+(.*)$",
        {
          "line": 1,
          "column": 2,
          "message": [4, 3]
        }
      ],
    }
  },
  "diagnostic-languageserver.filetypes": {
    "email": "languagetool",
    "markdown": [ "languagetool" ],
    "sh": "shellcheck",
    "elixir": ["mix_credo", "mix_credo_compile"],
    "eelixir": ["mix_credo", "mix_credo_compile"]
  },
  "diagnostic-languageserver.formatFiletypes": {
    "dart": "dartfmt",
    "elixir": "mix_format",
    "eelixir": "mix_format"
  },
  // git
  "git.enableGutters": false,
  "git.signOffset": 99,
  "git.branchCharacter": "⎇",
  "git.addedSign.text": "▏",
  "git.changedSign.text": "▏",
  "git.removedSign.text": "▏",
  "git.topRemovedSign.text": "‾",
  "git.changeRemovedSign.text": "≃",
  // imselect
  "imselect.defaultInput": "com.apple.keylayout.ABC",
  // languageserver
  "languageserver": {
    "sh": {
      "command": "bash-language-server",
      "args": ["start", "--stdio"],
      "filetypes": ["sh"],
      "cwd": "./",
      "initializationOptions": {},
      "ignoredRootPaths": ["~"],
      "settings": {}
    },
    "dart": {
      "command": "dart_language_server",
      "args": [],
      "filetypes": ["dart"],
      "cwd": "",
      "initializationOptions": {},
      "settings": {}
    },
    "dockerfile": {
      "command": "docker-langserver",
      "filetypes": ["dockerfile"],
      "args": ["--stdio"]
    },
    "golang": {
      "command": "bingo",
      "rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
      "filetypes": ["go"]
    }
  }
  // vim:ft=jsonc
}

from coc-diagnostic.

alex-popov-tech avatar alex-popov-tech commented on July 20, 2024

Which java and nodejs versions do you have?

from coc-diagnostic.

iamcco avatar iamcco commented on July 20, 2024

java:

java 11 2018-09-25
Java(TM) SE Runtime Environment 18.9 (build 11+28)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11+28, mixed mode)

nodejs: v10.11.0

from coc-diagnostic.

alex-popov-tech avatar alex-popov-tech commented on July 20, 2024

Can you share your terminal/nvim font settings?

from coc-diagnostic.

iamcco avatar iamcco commented on July 20, 2024

iTerm2:

image

from coc-diagnostic.

alex-popov-tech avatar alex-popov-tech commented on July 20, 2024

Still no luck...Any more ideas? :)

from coc-diagnostic.

iamcco avatar iamcco commented on July 20, 2024

No idea, maybe try update to latest neovim and coc. I use the latest neovim and coc.

from coc-diagnostic.

alex-popov-tech avatar alex-popov-tech commented on July 20, 2024

Coc should be latest, nvim was installed via brew install --head nvim...

from coc-diagnostic.

alex-popov-tech avatar alex-popov-tech commented on July 20, 2024

Will try again on fresh virtual macos, don't know what to do more

from coc-diagnostic.

alex-popov-tech avatar alex-popov-tech commented on July 20, 2024

Works on clean macos, closing the issue

from coc-diagnostic.

Related Issues (20)

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.