-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
feat(cpp): Add <Leader>lw
keymap to switch between source and header
#900
Conversation
Review ChecklistDoes this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist: Proper conventional commit scoping:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See feedback
Caveat: The keybinding will stay for all LSP although only Clangd supports it. Ideally the keybinding should appear only for buffers Clangd is attached. |
We'll have to fix this. |
@rameshsanth I'm pretty sure we have the logic for it somewhere in astrocommunity. :) |
Marking this as a draft until we fix it. |
We should add an autocmd for cleaning up. vim.api.nvim_create_autocmd("lspattach", {
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
client.server_capabilities.semantictokensprovider = nil
end Should use same logic, just with the astrocore functionality instead. |
<Leader>lw
keymap to switch between source and header
Co-authored-by: Micah Halter <[email protected]>
Co-authored-by: Micah Halter <[email protected]>
@rameshsanth Can you test to see if this works as expected now? :) |
Issues resolved, now just waiting to hear back from user
Sorry I got busy at work. Thanks for completing this. it is working correctly. |
lw to sWitch between source and header.
"w" isn't assigned to any other key currently.
📑 Description
ℹ Additional Information
Caveat: The keybinding will stay for all LSP although only Clangd supports it. Ideally the keybinding should appear only for buffers Clangd is attached.