Skip to content

Commit

Permalink
Fix #48
Browse files Browse the repository at this point in the history
  • Loading branch information
cannorin committed Feb 4, 2022
1 parent b341da4 commit d12d806
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions autoload/fsharp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,17 @@ function! fsharp#OnCursorMove()
endfunction

function! fsharp#showF1Help()
let result = s:f1Help(expand('%:p'), line('.') - 1, col('.') - 1)
echo result
function! s:callback_showF1Help(result)
let result = a:result
if exists('result.result.content')
let content = json_decode(result.result.content)
if exists('content.Data')
let url = 'https://docs.microsoft.com/en-us/dotnet/api/' . substitute(content.Data, '#ctor', '-ctor', 'g')
echo url
endif
endif
endfunction
call s:f1Help(expand('%:p'), line('.') - 1, col('.') - 1, function("s:callback_showF1Help"))
endfunction

function! s:hover()
Expand Down

0 comments on commit d12d806

Please sign in to comment.