mirror of
https://github.com/dense-analysis/ale.git
synced 2026-08-01 21:50:23 +08:00
Add eclipselsp jdt:// support for textDocument/definition (#4030)
This patch adds support for opening jdt:// links on "go to definition" requests returned by Java language servers. Co-authored-by: w0rp <devw0rp@gmail.com>
This commit is contained in:
@@ -357,13 +357,13 @@ Execute(LSP reference responses should be handled):
|
||||
\ 'id': 3,
|
||||
\ 'result': [
|
||||
\ {
|
||||
\ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
|
||||
\ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
|
||||
\ 'range': {
|
||||
\ 'start': {'line': 2, 'character': 7},
|
||||
\ },
|
||||
\ },
|
||||
\ {
|
||||
\ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/other_file')),
|
||||
\ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/other_file')),
|
||||
\ 'range': {
|
||||
\ 'start': {'line': 7, 'character': 15},
|
||||
\ },
|
||||
@@ -396,13 +396,13 @@ Execute(LSP reference responses should be put to quickfix):
|
||||
\ 'id': 3,
|
||||
\ 'result': [
|
||||
\ {
|
||||
\ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
|
||||
\ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/completion_dummy_file')),
|
||||
\ 'range': {
|
||||
\ 'start': {'line': 2, 'character': 7},
|
||||
\ },
|
||||
\ },
|
||||
\ {
|
||||
\ 'uri': ale#path#ToURI(ale#path#Simplify(g:dir . '/other_file')),
|
||||
\ 'uri': ale#path#ToFileURI(ale#path#Simplify(g:dir . '/other_file')),
|
||||
\ 'range': {
|
||||
\ 'start': {'line': 7, 'character': 15},
|
||||
\ },
|
||||
@@ -453,13 +453,13 @@ Execute(LSP reference requests should be sent):
|
||||
\ [
|
||||
\ [1, 'textDocument/didChange', {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#path#ToURI(expand('%:p')),
|
||||
\ 'uri': ale#path#ToFileURI(expand('%:p')),
|
||||
\ 'version': g:ale_lsp_next_version_id - 1,
|
||||
\ },
|
||||
\ 'contentChanges': [{'text': join(getline(1, '$'), "\n") . "\n"}]
|
||||
\ }],
|
||||
\ [0, 'textDocument/references', {
|
||||
\ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))},
|
||||
\ 'textDocument': {'uri': ale#path#ToFileURI(expand('%:p'))},
|
||||
\ 'position': {'line': 0, 'character': 2},
|
||||
\ 'context': {'includeDeclaration': v:false},
|
||||
\ }],
|
||||
|
||||
Reference in New Issue
Block a user