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

Go to definition in a new tab #125

Open
ainar-g opened this issue Dec 14, 2018 · 2 comments
Open

Go to definition in a new tab #125

ainar-g opened this issue Dec 14, 2018 · 2 comments

Comments

@ainar-g
Copy link
Contributor

ainar-g commented Dec 14, 2018

First of all, thank you for a great plug-in. This is more of a question/documentation request.

Many people, myself included, usually wish to open the definition of an identifier in a new tab. This could be done with tags, but I can't figure out, how to use that with vim-lsc. Maybe an "official" way should be added to the readme?

@arp242
Copy link
Contributor

arp242 commented Mar 9, 2019

I did this with:

let g:lsc_auto_map = {'defaults': v:true, 'GoToDefinitionSplit': ''}
augroup my_lsc
	au!
	au BufNewFile,BufReadPost *
		\  if has_key(g:lsc_servers_by_filetype, &filetype) && lsc#server#filetypeActive(&filetype)
		\|     nnoremap <buffer> <C-w>]     :tab LSClientGoToDefinitionSplit<CR>
		\|     nnoremap <buffer> <C-w><C-]> :tab LSClientGoToDefinitionSplit<CR>
		\| endif
augroup end

You can also use :tab LSClientGoToDefinitionSplit, which is already documented in :help :LSClientGoToDefinitionSplit.

Not sure what the best place would be to document this?

@ainar-g
Copy link
Contributor Author

ainar-g commented Mar 9, 2019

This is amazing, works perfectly, thank you!

Not sure what the best place would be to document this?

I think README would be good place.

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

No branches or pull requests

2 participants