Skip to content

How to configure your Notepad++ to use json_formatter.exe, version 2.0 #16

@GuardianDll

Description

@GuardianDll

Continuation of #13, with i think much better approach, since it is written on python, and has few nice features, like it automatically move you to the error location if error is found, or not move your screen at the beginning of the file when updated
Please report any issues that you find

Screenshots.

GIF 13-01-2024 19-30-53

Steps:

  1. Install PythonScript from plugin admin (i have installed on my screenshot)
    image
  2. Open Plugins - Open Plugins Folder
    image
  3. Open PythonScript - scripts, and unpack this archive here: DDA.zip. Alternatively download JSON_LINT_AND_ASTYLE if you need both linter and astyler
    image
  4. Open the folder, find the json_formatter_path, and replace the path it refers to with the path to your linter - in my case it's C:\Games\cddaDev\json_formatter.exe
    image
  5. Go to Plugins - Python Script - Configuration
    image
  6. The script itself is inside the DDA folder - pick it and press Add on the left, it'll make you able to bind shortcut on this script. Right part will add shortcut on your toolbar
    image
  7. Restart the notepad++
  8. Go to Settings - Shortcut Mapper, go to Plugin commands, and search JSON_LINT - that would be your script. Bind it to whatever key combination you want
  9. Go to Settings - Preferences - MISC.,turn on Update silently and turn off Scroll to the last line after update - thit will stop an annoying popup after reload, and hold the camera in the location you currently have

It doesn't behave good if linter point into a wrong place to resolve (which it does sometimes), but it is not something that can be resolved from the python side, and i assume there is a big reason our linter behave like this
Please report if you find something wrong

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions