Hi Keita,
Ikumi Keita <[email protected]> writes:
> The largest obstacle is that TikZ option is quite complicated. :-(
> [...]
>
> Thus the standard key-value completion facility of AUCTeX isn't enough
> in my view to provide satisfactory support for TikZ options.
I agree, TikZ options are indeed too heavy for AUCTeX.
> I hope LSP servers can provide practical support for TikZ.
Give digestif[1] a roll; installation is really straight forward. And if
you have eglot, starting it should work OOTB.
> Ah, I see. You are talking about a separate topic of moving the point
> inside the empty "[]". Doesn't the suggested change break
> compatibility?
Not that I'm aware of. With the current implementation:
(defun LaTeX--env-parse-args (args)
"Helper function to insert arguments defined by ARGS."
(save-excursion
(LaTeX-find-matching-begin)
(end-of-line)
(let ((TeX-exit-mark (or TeX-exit-mark
(make-marker))))
(TeX-parse-arguments args))))
You can set `TeX-exit-mark' inside args which is parsed by
`TeX-parse-arguments', but it doesn't work since the code for moving to
that point is only available in `TeX-parse-macro' and not in
`LaTeX--env-parse-args'. Further, `save-excursion' would nullify a
point movement anyway.
Hence my suggestion which respects `TeX-exit-mark'; either set by a
function in `args' or the value returned by `point-marker'.
(defun LaTeX--env-parse-args (args)
"Helper function to insert arguments defined by ARGS."
(let ((TeX-exit-mark (or TeX-exit-mark
(point-marker))))
(TeX-parse-arguments args)
(goto-char (marker-position TeX-exit-mark))
(set-marker TeX-exit-mark nil)))
Where do you expect a potential breakage? Maybe I'm missing something?
Best, Arash
Footnotes:
[1] https://github.com/astoff/digestif