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

Fixed executable permissions of ltex-ls and Java binaries. Added automatic activation support for .amd files. #137

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

nalauder
Copy link

Description

Two issues were addressed in this PR:

  1. When using a Linux VSCode devcontainer, the executable flag for the downloaded ltex-ls and Java binaries were not set, resulting in an installation failure. This change checks whether the current system in not Windows, then uses the native chmod function to set the binary permissions to match those present in the archive files. This includes dynamically detecting the JDK path to allow for JDK updates without breaking the permission change process.
  2. We make extensive use of files with the .amd extension (markdown with some extras) and found it a pain to manually activate the extension every time VSCode was opened. Since there is no configurable way to have a custom file type to auto-activate, we've included the required file type in package.json.

Checklist

  • Have you read the guidelines on contributing code to LTEX?
  • Have you filled in all missing information in this pull request template?
  • Have you written new tests for your changes, if applicable?
  • Do your changes pass all code checks such as linting and tests?

Added the .amd extension to the list of extensions that automatically activates the extension and also added it to the default configuration list for enabling spellcheck.
Running extension in VSCode Linux devcontainers resulted in an error while installing where the executable did not have the execute permission. This change set the appropriate permissions once the executables are unpacked,
@spitzerd
Copy link
Contributor

Thank you for your contribution! I have never heard of .amd files. The activation event in package.json will only work if there is a corresponding extension in VS Code which provides a language support for .amd files. Is such an extension available?

@nalauder
Copy link
Author

There is not one publicly available, but we have one privately that does this and therefore allows us to use this tool with .amd.

I believe a better solution would be to figure out how to allow the automatic activation list user configurable, but I haven't had the time to look into that yet.

@spitzerd
Copy link
Contributor

There are already ideas to start LTeX+ based on user settings, see #108 (comment)

This is not a quick fix, but requires a significant redesign of the code. You can implement this logic, if you want.

Please remove the .amd code from your PR again, because there is no public extension to support this language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants