LaTeX-Workshop: Wrong column number from chktex (Tab) + character/byte skipping in actions

Hi,

Here is the interesting screenshot showing two issues: image

If I got the things correctly, chktex detected a common $...$ -> \(...\) TeX vs LaTeX thing starting at 13th character but it reported column number is 21 (because of its own setting TabSize = 8). When I remove the leading tab character, this is what happens: image

As you can see, codeaction suggestion is shifted by one character to the right-hand side, and clicking it does not make any change. The root cause for the misplacement is the character č in UTF8-encoded input file. Once I remove it, codeaction suggestion is placed correctly and the action successfully replaces $P(x,y)$ by \(P(x,y)\).

So, to conclude:

  1. [UX suggestion] Could LaTeX-Workshop consider TabSize = 8 setting from chktex?
  2. [Bug?] Is it really true that non-one-byte-characters are the root cause of the presented issue and can that be fixed?

Kind regards, Ivan

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (2 by maintainers)

Most upvoted comments

I had to change chktexrc itself.

On Fri, 24 May 2019, 21:43 Ivan Kokan, notifications@github.com wrote:

@ericrbg https://github.com/ericrbg Can you please explain how/where did you set TabSize for chktex in VSCode?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/James-Yu/LaTeX-Workshop/issues/829?email_source=notifications&email_token=AJBZUU5IFSD4AVLKTPWS2MTPXBHN3A5CNFSM4FXW5IWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWGQV5A#issuecomment-495782644, or mute the thread https://github.com/notifications/unsubscribe-auth/AJBZUU24EWXMMH6NHOWENZTPXBHN3ANCNFSM4FXW5IWA .

Let us keep track of the chktex tracker: https://savannah.nongnu.org/bugs/index.php?54750.

Unfortunately, it seems that neither of each can be handled from the extension side, though I will look into point 1.