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

Onboarding with tutorial [Mac] #869

Closed
htzh opened this issue May 20, 2022 · 7 comments · Fixed by #1161
Closed

Onboarding with tutorial [Mac] #869

htzh opened this issue May 20, 2022 · 7 comments · Fixed by #1161
Assignees
Labels
vscode Issues related to Vscode plugin

Comments

@htzh
Copy link

htzh commented May 20, 2022

I tried to follow the tutorial after opam install on a Mac. I have observed the following problems:

  1. In vscode LSP server would not start until I created the lib_root directory in my opam switch. The plugin did attempt to mkdir so it is possibly a permission issue.

  2. Tutorial refers to tests.OK.logic. I resolved the issue by cloning the project and copying the tests package to the lib_root directory. (Just realized that tutorial.lp is part of tests.OK.)

  3. On Mac "Ctrl [Arrows]" don't work and there appear no other ways to interact with proof/goals in vscode. I believe the key combinations are captured by the system. E.g. Ctrl-Right-Arrow and Ctrl-Left-Arrow move between system windows.

I understand these are likely not your priorities so I am just reporting them in case it would help.

@fblanqui
Copy link
Member

Thank you very much @htzh for reporting these problems. This is very helpful to improve Lambdapi. Perhaps @firewall2142 could provide some workaround for problem 3. In Emacs, it is possible to redefine shortcuts. I am not sure how to do it in VSCode.
Concerning problem 1, could you please precise the Lambdapi version used?

@htzh
Copy link
Author

htzh commented May 21, 2022

I installed from opam and the version is 2.2.0.

I experimented a little more in vscode. If I cut away the proofs from the examples in tutorial.lp, I get indications of missing goals, unfinished proofs etc in the editor window. After I paste back the proofs these go away. So the basic interaction seems to be intact. However my goal window says No goals throughout.

@Alidra Alidra added the vscode Issues related to Vscode plugin label Feb 2, 2024
@mikemull
Copy link

I'm not sure if this is still an issue, but there are two workarounds i've found. First, Macos uses the the Ctrl- keys for "Mission Control", so one option is to go into System Settings/Keyboard, go to the Keyboard Shortcuts and either turn off or remap the various commands.

The second option is to change the keyboard shortcuts within VSCode (⌘K ⌘S gets you to the shortcuts). For example, I switched them to Option-h for ^←, Option-j for ^↓, etc to match the VI navigation keys.

@fblanqui
Copy link
Member

Thanks @mikemull . Indeed, concerning 3, one solution is to remap shortcuts to keys that are less commonly used both in Linux and in MacOS. @Alidra something to discuss at Fontainebleau on Thursday or Friday.
Concerning 2, the tutorial was not indicating that a file lambdapi.pkg must be created in the folder where you copy your tutorial.lp file. I fixed this a few weeks ago.
Concerning 1, is it still an issue?

@mikemull
Copy link

@fblanqui I did not experience the problem in item (1). The only remaining issue i'm having with the vscode extension is that the editor window loses the focus after each command. I hope to debug that this week to see if it's a general issue or just a problem with my setup.

@Alidra
Copy link
Member

Alidra commented Sep 23, 2024

Hi @mikemull. There is indeed an issue with the Vscode extension making the Goal panel to loose focus.
I will fix it and open an PR soon. I will let you know asap.

@Alidra
Copy link
Member

Alidra commented Dec 11, 2024

Regarding 3, What already seems to work by default are the following shortcuts :
Ctrl+fn+Right: go one step forward
Ctrl+fn+Left: go one step backward
Ctrl+Enter: go to the position of the cursor
Ctrl+Alt+c: toggle cursor mode (proof highlight follows the cursor or not)
Ctrl+Alt+w: toggle follow mode (proof highlight is always centered in the window when keybindings are pressed)
Shift+Alt+w: center proof highlight in the current window
What does not to work is
Ctrl+Up: go to the previous proof (or the beginning)
Ctrl+Down: go to the next proof (or the end)
There are roughly three options to deal with that:
1- Change the shortcuts for all users (MacOs, Linux and Windows) This has the advantage of working out of the box without the need for the user to customize anything but I find it a bit disruptive.
2- Manually set the shortcuts as in Linux/Windows and replace the one defined by default in MacOs which has the double disadvantage of requiring extra customization and disturb the navigation experience of many MacOs users.
3- Document the conflict and ask the user to define custom shortcuts for go to the previous/next proof and recommend for instance the combination Ctrl+option+Up/down (could also be Ctrl+fn+Up/Down but these already used for scrolling up/down in MacOs)

@Alidra Alidra mentioned this issue Dec 12, 2024
3 tasks
@Alidra Alidra linked a pull request Dec 12, 2024 that will close this issue
3 tasks
fblanqui pushed a commit that referenced this issue Dec 19, 2024
This PR Modifies the README.md of the Vscode extension to document the shortcuts of Lambdapi extension in Mac OS X as discussed in #869
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vscode Issues related to Vscode plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants