Skip to content

Unable to set up global config #23

@tbjgolden

Description

@tbjgolden

A few things has made getting this set up awkward/impossible:

  1. the settings aren't seemingly being registered properly, so I can't see the ext settings options (and they're greyed out in json settings)
  2. I have a use case where I'd like to set up a global textlint config in my home dir, and globally install textlint, so that I can use the same config for all of my projects - but I've been having issues. Even manually specifying the paths in the settings haven't helped.
❯ cat ~/.textlintrc.json                             
{
  "plugins": {},
  "filters": {},
  "rules": {
    "no-todo": true
  }
}

test.md in its own folder (in this case ~/Downloads)

# This is a markdown file

TODO: hello

This should error above.

settings

  "textlint.autoFixOnSave": true,
  "textlint.configPath": "/home/abc/.textlintrc.json",
  "textlint.nodePath": "/usr/lib/node_modules", // correct global loc
  "textlint.targetPath": "**",
  "textlint.languages": ["markdown", "plaintext"],
  "textlint.trace": "verbose"

logs

[Info  - 14:56:18] onDidChangeConfiguration {"languages":["markdown","plaintext"],"configPath":"/home/abc/.textlintrc.json","ignorePath":null,"nodePath":"/usr/lib/node_modules","run":"onSave","autoFixOnSave":true,"trace":"verbose","targetPath":"**"}
[Info  - 14:56:18] reConfigure
[Info  - 14:56:18] onDidOpen file:///home/abc/Downloads/test.md
[Info  - 14:56:18] sendStartProgress 0
[Info  - 14:56:18] validate file:///home/abc/Downloads/test.md
[Info  - 14:56:18] lookupEngine file:///home/abc/Downloads/test.md
[Info  - 14:56:18] lookupEngine file:///home/abc/Downloads/test.md not found
[Info  - 14:56:18] onDidChangeContent file:///home/abc/Downloads/test.md
onSave
[Info  - 14:56:18] sendOK
[Info  - 14:56:18] sendStopProgress 1
[Info  - 14:56:18] configureEngine file:///home/abc/Downloads
[Info  - 14:56:18] Module textlint resolve from /home/abc/Downloads
[Info  - 14:56:18] NODE_PATH value is: /usr/lib/node_modules
[Info  - 14:56:18] configureEngine file:///home/abc/Downloads
[Info  - 14:56:18] Module textlint resolve from /home/abc/Downloads
[Info  - 14:56:18] NODE_PATH value is: /usr/lib/node_modules
[Info  - 14:56:18] Module textlint got resolved to /usr/lib/node_modules/textlint/lib/src/index.js
[Info  - 14:56:18] Module textlint got resolved to /usr/lib/node_modules/textlint/lib/src/index.js
[Info  - 14:56:18] reConfigure:push file:///home/abc/Downloads/test.md
[Info  - 14:56:18] sendStartProgress 0
[Info  - 14:56:18] validate file:///home/abc/Downloads/test.md
[Info  - 14:56:18] lookupEngine file:///home/abc/Downloads/test.md
[Info  - 14:56:18] lookupEngine file:///home/abc/Downloads/test.md => file:///home/abc/Downloads
[Info  - 14:56:18] results
[{}]
[Info  - 14:56:18] sendDiagnostics file:///home/abc/Downloads/test.md
[Info  - 14:56:18] sendStopProgress 1
[Info  - 14:56:20] onCodeAction
{"textDocument":{},"range":{},"context":{}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions