-
Notifications
You must be signed in to change notification settings - Fork 943
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(typescript): only set ts keymaps for tsserver
- Loading branch information
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2128bf3
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.
Out of curiosity…. Is there also a way to override standard key maps such as ‘K’? For example would like to remap K for Rust to RustHoverActions… tried it with a custom init like you, but looks like the default mappings are always take preference…
2128bf3
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.
@appelgriebsch That commit was actually wrong 😄
The first parameter to
on_attach
is the lsp client, not server name, so you need to check forclient.name
instead.I fixed it in cce3129
I also moved it from
init()
inside the setup function, butinit()
should also work.2128bf3
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.
I have RustHoverActions binded here, you could remap it in a fork of your own
of course dont forget
in your config
also, not to toot my own horn but I do think rust-tools would benefit a lot of ppl, #24 is up-to-date with the extras spec, but the keymap can be changed to whatever is more natural/"fits better" for ppl :)
2128bf3
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.
@amaanq you should check if the client is rust. You're also overriding the default cmp keymap for completion (
<c-space>
)2128bf3
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.
Oops..guess I should change that for myself after all
Edit: Thanks! Fixed here
2128bf3
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.
updated my rust-lang module to enable K for RustHoverActions as well as crates documentation with much success. Thanks a lot!