Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to escape placeholders in forwardSearch.args #649

Closed
eburghar opened this issue Jun 14, 2022 · 2 comments
Closed

No way to escape placeholders in forwardSearch.args #649

eburghar opened this issue Jun 14, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@eburghar
Copy link

eburghar commented Jun 14, 2022

okular also use %f, %l for the inverse search command, and it has the possibility to configure the editor from the command line with the --editor-cmd argument.

But this is not working

{
  "texlab.forwardSearch.executable": "okular",
  "texlab.forwardSearch.args": ["--editor-cmd": "\"code -g \"%f\":%l\"", "--unique", "file:%p#src:%l%f"]
}

We can enclose an argument with " to prevent placeholders replacement but as the leading and trailing " are not removed from the argument, okular fails to launch the command.

A % would be preferable to escape %. I have a PR that permits this. Tell me if this makes sense.

{
  "texlab.forwardSearch.executable": "okular",
  "texlab.forwardSearch.args": ["--editor-cmd": "code -g \"%%f\":%%l", "--unique", "file:%p#src:%l%f"]
}
@pfoerster
Copy link
Member

Thanks for the report.

A % would be preferable to escape %.

I agree. The current replacing strategy cannot really handle this case so an escape character still lets the old configurations work while fixing this issue.

I have a PR that permits this. Tell me if this makes sense.

Sure! Thanks for contributing 👍

@pfoerster
Copy link
Member

Released with texlab 4.2.0

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jul 7, 2022
### Added

- Add support for escaping placeholders in forward search ([#649](latex-lsp/texlab#649))
- Add support for diagnostic filtering ([#323](latex-lsp/texlab#323))
- Add pre-built binaries for the following targets:
  - `aarch64-unknown-linux-gnu`
  - `armv7-unknown-linux-gnueabihf`
  - `x86_64-unknown-linux-musl`
  - `aarch64-pc-windows-msvc`
  - `i686-pc-windows-msvc`

### Fixed

- Parse incomplete server options correctly ([#651](latex-lsp/texlab#651))

## [4.1.0] - 12.06.2022

### Added

- Add server commands to clean build directory ([#607](latex-lsp/texlab#607))

### Changed

- Improve output when hovering over BibTeX strings
- Improve the heuristic for finding build artifacts ([#635](latex-lsp/texlab#635))

### Fixed

- Allow brackets in included file paths ([#639](latex-lsp/texlab#639))
- Allow commands in included file paths ([#641](latex-lsp/texlab#641))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants